lamp在Ubuntu server下安装没有lnmp那么复杂,不过也会出点小问题:
安装命令:apt-get install apache2 mysql-server mysql-client php5 php5-gd php5-mysql
出现一下错误:
Failed to fetch http://mirrors.163.com/ubuntu/pool/main/p/php5/php5-common_5.3.3-1ubuntu9.1_i386.deb 404 Not Found [IP: 123.58.173.106 80]
解决办法:
apt-get update
重启apache时报错:
root@ubuntu:~# /etc/init.d/apache2 restart
* Restarting web server apache2 apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName
… waiting apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName
解决办法:
vim /etc/apache2/apache2.conf
添加一行
#Server Name
ServerName 127.0.0.1
另外附赠一个小常识:
vim 编辑的时候按下CTRL+S(习惯在windows下编辑保存快捷键):
不过该功能在linux下是停止向终端输入,解除方法按下CTRL+Q
注意:当按下CTRL+S时不要开另外终端结束它,否则永远无法解锁,直到重启机器。