Ubuntu configuration NginX + PHP + FastCGI + MySQL is so simple

Source: Internet
Author: User
# 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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.