阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

Ubuntu 14.04 LTS Server 安装 LAMP Server

150次阅读
没有评论

共计 4763 个字符,预计需要花费 12 分钟才能阅读完成。

LAMP 是 Linux、Apache、MySQL、PHP 的简称。本教程使用的 Ubuntu 14.04 LTS Server 64 位的系统,安装 Apache2 web 服务、PHP5 支持(mod_php)和 MySQL。

使用 SSH 连接到服务器,切换到 ROOT 账户:

sudo su

在正式安装之前更换一下源,国内的服务器,替换到国内源,为防止意外,先备份源:

cp /etc/apt/sources.list /etc/apt/sources.list_backup

在用 vi 编辑:

vi /etc/apt/sources.list

我比较喜欢中科大的源,比较快,共享一下:

deb http://debian.ustc.edu.cn/ubuntu/ trusty main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ trusty-security main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ trusty main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse

跟新源:

apt-get update

1、安装数据库 MySQL 5

apt-get install mysql-server mysql-client

系统提示设置密码:

Ubuntu 14.04 LTS Server 安装 LAMP Server

 

Ubuntu 14.04 LTS Server 安装 LAMP Server

————————————– 分割线 ————————————–

Ubuntu 13.04 安装 LAMP\Vsftpd\Webmin\phpMyAdmin 服务及设置 http://www.linuxidc.com/Linux/2013-06/86250.htm

CentOS 5.9 下编译安装 LAMP(Apache 2.2.44+MySQL 5.6.10+PHP 5.4.12) http://www.linuxidc.com/Linux/2013-03/80333p3.htm

RedHat 5.4 下 Web 服务器架构之源码构建 LAMP 环境及应用 PHPWind http://www.linuxidc.com/Linux/2012-10/72484p2.htm

LAMP 源码环境搭建 WEB 服务器 Linux+Apache+MySQL+PHP http://www.linuxidc.com/Linux/2013-05/84882.htm

LAMP+Xcache 环境搭建 http://www.linuxidc.com/Linux/2014-05/101087.htm

————————————– 分割线 ————————————–

New password for the MySQL“root”user:<– 输入你的 root 密码
Repeat password for the MySQL“root”user:<– 在输入一次

2、安装 Apache:

apt-get install apache2

然后浏览器访问:

Ubuntu 14.04 LTS Server 安装 LAMP Server

默认目录:/var/www/html,配置文件:/etc/apache2/apache2.conf

3、安装 PHP:

apt-get install php5 libapache2-mod-php5

再重启 apache2

service apache2 restart

4、测试 PHP,建立一个探针文件:

vi /var/www/html/info.php

内容如下:

<?php
phpinfo();
?>

更多详情见请继续阅读下一页的精彩内容 :http://www.linuxidc.com/Linux/2014-06/102919p2.htm

5、让 php5 支持 MySQL

apt-cache search php5
apt-get install php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl

重启 apache:

service apache2 restart

6、安装 XCache 优化缓存

apt-get install php5-xcache

重启 apache:

service apache2 restart

7、安装 phpmyadmin 管理 Mysql:

apt-get install phpmyadmin

Ubuntu 14.04 LTS Server 安装 LAMP Server

选择第一个, 然后是设置 phpmyadmin:

Ubuntu 14.04 LTS Server 安装 LAMP Server

Ubuntu 14.04 LTS Server 安装 LAMP Server

更多 Ubuntu 相关信息见 Ubuntu 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=2

LAMP 是 Linux、Apache、MySQL、PHP 的简称。本教程使用的 Ubuntu 14.04 LTS Server 64 位的系统,安装 Apache2 web 服务、PHP5 支持(mod_php)和 MySQL。

使用 SSH 连接到服务器,切换到 ROOT 账户:

sudo su

在正式安装之前更换一下源,国内的服务器,替换到国内源,为防止意外,先备份源:

cp /etc/apt/sources.list /etc/apt/sources.list_backup

在用 vi 编辑:

vi /etc/apt/sources.list

我比较喜欢中科大的源,比较快,共享一下:

deb http://debian.ustc.edu.cn/ubuntu/ trusty main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ trusty-security main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ trusty main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse

跟新源:

apt-get update

1、安装数据库 MySQL 5

apt-get install mysql-server mysql-client

系统提示设置密码:

Ubuntu 14.04 LTS Server 安装 LAMP Server

 

Ubuntu 14.04 LTS Server 安装 LAMP Server

————————————– 分割线 ————————————–

Ubuntu 13.04 安装 LAMP\Vsftpd\Webmin\phpMyAdmin 服务及设置 http://www.linuxidc.com/Linux/2013-06/86250.htm

CentOS 5.9 下编译安装 LAMP(Apache 2.2.44+MySQL 5.6.10+PHP 5.4.12) http://www.linuxidc.com/Linux/2013-03/80333p3.htm

RedHat 5.4 下 Web 服务器架构之源码构建 LAMP 环境及应用 PHPWind http://www.linuxidc.com/Linux/2012-10/72484p2.htm

LAMP 源码环境搭建 WEB 服务器 Linux+Apache+MySQL+PHP http://www.linuxidc.com/Linux/2013-05/84882.htm

LAMP+Xcache 环境搭建 http://www.linuxidc.com/Linux/2014-05/101087.htm

————————————– 分割线 ————————————–

New password for the MySQL“root”user:<– 输入你的 root 密码
Repeat password for the MySQL“root”user:<– 在输入一次

2、安装 Apache:

apt-get install apache2

然后浏览器访问:

Ubuntu 14.04 LTS Server 安装 LAMP Server

默认目录:/var/www/html,配置文件:/etc/apache2/apache2.conf

3、安装 PHP:

apt-get install php5 libapache2-mod-php5

再重启 apache2

service apache2 restart

4、测试 PHP,建立一个探针文件:

vi /var/www/html/info.php

内容如下:

<?php
phpinfo();
?>

更多详情见请继续阅读下一页的精彩内容 :http://www.linuxidc.com/Linux/2014-06/102919p2.htm

正文完
星哥说事-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-20发表,共计4763字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中