首页 » Linux » Configure » Ubuntu 14.04–LAMP的安装和配置

Ubuntu 14.04–LAMP的安装和配置

 
查看ubuntu版本信息:cat /etc/issue
lsb_release -a
1:更新源列表
sudo apt-get update
2:安装PHP
sudo apt-get install php5
让Apache支持php
sudo apt-get install libapache2-mod-php5
安装php5-gd模块
sudo apt-get install php5-gd
4:在/var/www/html下创建info.php文件
<?php
phpinfo();
?>
chmod -R 777 /var/www/html
5:安装apache
apt-get install apache2
6:测试Apache是否可以解析
127.0.0.1/info.php
7:安装MYSQL
sudo apt-get install mysql-server
安装完成后 netstat -tap |grep mysql 显示监听端口即可
8:安装相关的PHP与Mysql的扩展包
sudo apt-get install php5-mysql php5-curl php5-intl php-pear php5-imagick php5-imap php5-mcrypt
9:选装phpmyadmin
sudo apt-get install phpmyadmin
安装完成后需要将phpmyadmin的文件夹复制到www文件下进行管理:sudo cp /usr/share/phpmyadmin /var/www -a
sudo ln -s /usr/share/phpmyadmin /var/www/html
远程无法访问phpmyadmin
vi /etc/phpmyadmin/apache.conf
# Disallow web access to directories that don’t need it
<Directory /usr/share/phpmyadmin/libraries>
Order Deny,Allow
Deny from All
Allow from ALL 添加此行
</Directory>
<Directory /usr/share/phpmyadmin/setup/lib>
Order Deny,Allow
Deny from All
</Directory>

原文链接:Ubuntu 14.04–LAMP的安装和配置,转载请注明来源!

0