Quick setup of Nginx2.6 + PHP5.2.6 + MySQL5.0 in Ubuntu8.10

Source: Internet
Author: User
Nginx's high efficiency is a good name. Recently I want to use it to replace Apache on Ubuntu8.10 server, so I did a test on the local machine. The following steps are recorded! Step 1, install mysqlsudoapt-getinstallmysql-server step 2, install sudoapt-getinstallphp5-cliphp5-cgiphp5-mysqlphp5-gdphp such as php-cgi and gd library

Nginx's high efficiency is out of the name. Recently I want to use it to replace Apache on the Ubuntu 8.10 server, so I did a test on the local machine.

The following steps are recorded!
Step 1: Install mysql
Sudo apt-get install mysql-server

Step 2: install php-cgi and the gd library required
Sudo apt-get install php5-cli php5-cgi php5-mysql php5-gd

Step 3: Install nginx
Sudo apt-get install nginx

Step 4: get spawn-fcgi from lighttpd
Apt-get install lighttpd
Cp/usr/bin/spawn-fcgi ./
Apt-get remove lighttpd
Cp spawn-fcgi/usr/bin/
Sudo vi/usr/bin/php-fastcgi
#! /Bin/sh
/Usr/bin/spawn-fcgi-a 127.0.0.1-p 9000-C 10-u www-data-g www-data-f/u sr/bin/php-cgi

# Note-C 10 indicates that 10 php-cgi processes are enabled!
Sudo chmod 755/usr/bin/php-fastcg
Sudo vi/etc/init. d/init-fastcgi
C ++ code
#! /Bin/bash
PHP_SCRIPT =/usr/bin/php-fastcgi
RETVAL = 0
Case "$1" in
Start)
$ PHP_SCRIPT
RETVAL =$?
;;
Stop)
Killall-9 php5-cgi
RETVAL =$?
;;
Restart)
Killall-9 php5-cgi
$ PHP_SCRIPT
RETVAL =$?
;;
*)
Echo "Usage: php-fastcgi {start | stop | restart }"
Exit 1
;;
Esac
Exit $ RETVAL
Chmod 755/etc/init. d/php-fastcgi
Enable spawn-fcgi
/Etc/init. d/php-fastcgi start
Write boot start!
Update-rc.d php-fastcgi defaults
View the php-cgi process
Ps ax | grep php5-cgi

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.