# Preparations: #1. Install Ubuntu (nonsense). I use javastuserver9.04, and I have not installed any initial services. #2. Set the update source to a Chinese website, that is, edit sources. list, I set mirrors.163.com, CN99 is also good. #3. Update the system, that is, sudoapt-getupdatesudosu # Be sure to run in administrator mode.
# Preparations:
#1. Install Ubuntu (nonsense). I am using Ubuntu Server 9.04 and have not installed any initial services.
#2. Set the update source to the Chinese website, that is, edit sources. list. I set mirrors.163.com and CN99.
#3. update the system, that is, sudo apt-get update.
Sudo su # Be sure to run in administrator Mode
Apt-get install nginx
Apt-get install php-cgi php-mysql php-gd
Apt-get install mysql-server
Apt-get install rcconf
Apt-get install lighttpd
Update-rc.d-f lighttpd remove
# You can also use rcconf to remove lighttpd.
Vi/etc/nginx/sites-available/default
# Modify the row of index to index. php index.html index.htm;
# Remove the following comments:
Location ~ \. Php $ {
Fastcgi_pass 127.0.0.1: 9000;
Fastcgi_index index. php;
Fastcgi_param SCRIPT_FILENAME/var/www/nginx-default/$ fastcgi_script_name;
Include/etc/nginx/fastcgi_params;
}
Vi/etc/rc. local
# Add spawn-fcgi-f/usr/bin/php-cgi-a 127.0.0.1-p 9000-C 10-u www-data-g www-data
Shutdown-r now # execute the script in rc. local after restart to start the Fast CGI process.
After restart
Run the w3m localhost result (phpinfo)
This article is from the CSDN blog. For more information, see the source:Http://blog.csdn.net/yangzhuoluo/archive/2009/06/13/4267119.aspx