安裝apache2, php5, mysql, phpmyadmin:
sudo apt-get install apache2 libapache2-mod-php5 php5 php5-gd mysql-server php5-mysql phpmyadmin php5-cli php-pear
安裝完成後,怎麼也不能解析php文件,經過一番查找,解決如下:
microdict@ibm-t60:~$ cd /etc/apache2/mods-enabled/
microdict@ibm-t60:/etc/apache2/mods-enabled$ sudo ln -s ../mods-available/php5.load php5.load
microdict@ibm-t60:/etc/apache2/mods-enabled$ sudo ln -s ../mods-available/php5.conf php5.conf
microdict@ibm-t60:/etc/apache2/mods-enabled$ sudo /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
apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName [ OK ]
microdict@ibm-t60:/etc/apache2/mods-enabled$
原文連接:http://www.newdict.com/blog/2007/10/15/ubuntu-710%E4%B8%8Bapache2-%E4%B8%8D%E8%83%BD%E8%A7%A3%E9%87%8Aphp%E7%A8%8B%E5%BA%8F%E7%9A%84%E8%A7%A3%E5%86%B3%E5%8A%9E%E6%B3%95/