Archive for the ‘install’ Category

Install PHP+Nginx+Fastcgi+Mysql under Ubuntu

Tuesday, December 1st, 2009

1. Install LAMP:(just for easy)
In Synaptic Package Manage, choose Edit->Marks Packages by Task…->LAMP

2. Don't let Apache use port 80
Modify
/etc/apache2/ports.conf
/etc/apache2/sites-available/default

3. Install Nginx
sudo apt-get install nginx

4. Restart you system
Visit http://127.0.0.1/ and display "Welcome to nginx!"

5. Modify Nginx configuration
Modify
/etc/nginx/sites-available/default
Enable these lines:

location ~ \.php$ {
    fastcgi_pass   127.0.0.1:9000;
    fastcgi_index  index.php;
    fastcgi_param  SCRIPT_FILENAME  /your/root/path/$fastcgi_script_name;
    include /etc/nginx/fastcgi_params;
}

6. Restart nginx
sudo /etc/init.d/nginx restart

5. Install php5-cgi and spawn-fcgi
sudo apt-get install php5-cgi spawn-fcgi

6. Start fastcgi
spawn-fcgi -a 127.0.0.1 -p 9000 -C 10 -u www-data -f /usr/bin/php-cgi

7. Visit http://127.0.0.1/phpinfo.php
you need to have a phpinfo.php first :-)

ubuntu8.10设置记录

Sunday, March 1st, 2009

Try Trac project management system

Saturday, August 9th, 2008

ubuntu8.04设置记录

Wednesday, June 4th, 2008

在windows下搭建SVN服务器

Sunday, April 6th, 2008