搭建一个最基本的环境,很简单依次执行以下命令:
代码
sudo su
sudo apt-get install apache2
sudo apt-get install mysql-server [password]
sudo apt-get install php5 libapache2-mod-php5 php5-mysql
sudo apt-get install phpmyadmin [password]
vi /var/www/phpinfo.php
添加<?php phpinfo(); ?>到phpinfo.php
重启apache2命令:
sudo /etc/init.d/apache2 restart
zww:
apt-get install curl libcurl3 libcurl3-dev php5-curl
经后开发可能用到的内容:
sudo apt-get install php5-gd
sudo apt-get install libapache2-mod-auth-mysql
sudo apt-get install mysql-client
sudo apt-get install libapache2-svn
在/etc/init.d/apache2/mods-enabled/php5.conf中添加下面一行
AddType application/x-httpd-php .php .phtml .php3