This article is from: Workshop
From: http://www.ptubuntu.com/2009/04/2157.html
The installation platform is based on Ubuntu 9. 04. Use apt-get for simple installation. You need to prepare the source before installation. You also need to install the library g ++ vim ssh links because you need to use these tools.
The figure below shows my successful configuration.
1 Install Tools
# Apt-get install g ++ vim links ssh
2. Install MySQL 5.0
# Apt-get install mysql-server mysql-client
During the installation process, you will be prompted to enter the MYSQL database password:
New password for the MySQL "root" user: <-Yourrootsqlpassword: Your MYSQL password
Repeat password for the MySQL "root" user: <-Yourrootsqlpassword Your MYSQL password
3. Install Nginx
# Apt-get install nginx
Start nginx:
#/Etc/init. d/nginx start
Enter your IP address in IE: http: // myip
Root @ ptubuntu :~ # Links ls.ptubuntu.com
Here, you have installed nginx. Next we will configure it. It will be automatically started when the system is started.
Root @ ptubuntu :~ # Update-rc.d nginx ults
Tip: System startup links for/etc/init. d/nginx already exist.
4. Install PHP5
Root @ ptubuntu :~ # Apt-get install php5-cgi php5-mysql php5-curl php5-gd php5-idn php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-pspell php5-recode
Next, configure the php. ini file. You 'd better back up the file before you make some configuration files.
Root @ ptubuntu :~ # Cd/etc/php5/cgi/
Root @ ptubuntu:/etc/php5/cgi # ls
Conf. dPhp. ini
Root @ ptubuntu:/etc/php5/cgi # cp php. ini php. ini. bak
Root @ ptubuntu:/etc/php5/cgi # vi php. ini
Add the next line to the php. ini file.
Cgi. fix_pathinfo = 1
Install lighttpd
Root @ ptubuntu: # apt-get install lighttpd
After the installation, remove the Automatic startup program so that it does not start automatically.
Root @ ptubuntu: # update-rc.d-f lighttpd remove
Removing any system startup links for/etc/init. d/lighttpd...
/Etc/rc0.d/K09lighttpd
/Etc/rc1.d/K09lighttpd
/Etc/rc2.d/S91lighttpd
/Etc/rc3.d/S91lighttpd
/Etc/rc4.d/S91lighttpd
/Etc/rc5.d/S91lighttpd
/Etc/rc6.d/K09lighttpd
Enable PHP FastCGI to set listening port 9000 for local users andWww-data, Run the following program:
Root @ ptubuntu: #/usr/bin/spawn-fcgi-a 127.0.0.1-p 9000-u www-data-g www-data-f/usr/bin/php5-cgi-P/var/run/ fastcgi-php.pid
Show spawn-fcgi.c.197: child spawned successfully: PID: 29470
Modify the rc. local file. Back up a file first.
Root @ ptubuntu :~ # Cp/etc/rc. local.
Root @ ptubuntu :~ # Vi/etc/rc. local
Add
/Usr/bin/spawn-fcgi-a 127.0.0.1-p 9000-u www-data-g www-data-f/usr/bin/php5-cgi-P/var/run/fastcgi-php.pid
5 configure Nginx
Root @ ptubuntu:/etc/nginx # cp nginx. conf nginx. conf. bak
Root @ ptubuntu:/etc/nginx # vi nginx. conf
Modify as follows:
[...]
Worker_processes5;
[...]
Keepalive_timeout2;
[...]