UbuntuServer10.04 + Nginx + MySQL + PHP + Zend website setup

Source: Internet
Author: User
Write down the process of setting up an LNMP website. I hope it will be helpful to anyone who wants to set up the website. If you have any better solutions, please come up with me. The reason why Nginx is useless to Apache is that Nginx is more efficient, especially for low-configuration servers, such as servers I set up on machines with a unit of 256 memory. 1. Install cmdtuserver10.04. The installation language is selected as en and the time zone is chongqing. The service only installs ssh, and all others are installed by default. Tip: After the installation process is complete,

Write down the process of setting up an LNMP website. I hope it will be helpful to anyone who wants to set up the website. If you have any better solutions, please come up with me.

The reason why Nginx is useless to Apache is that Nginx is more efficient, especially for low-configuration servers, such as servers I set up on machines with a unit of 256 memory.

1. Install Ubuntu Server 10.04. The installation language is selected as en and the time zone is chongqing. The service only installs ssh, and all others are installed by default.
Tip: After the above installation is complete, it is recommended to log on to the server with another computer. putty can be used in Windows, and the Linux system can directly use commands on the terminal:

Code:
Ssh Login Name @ Server ip Address

Because you need to input a lot of commands and Code for the following process, you can directly paste www.linuxidc.com on the client.
2. Add Source:

Code:
Sudo vi/etc/apt/sources. list

Add as follows:

Code:
Deb http://archive.ubuntu.com/ubuntu/ lucid main restricted universe multiverse
Deb http://archive.ubuntu.com/ubuntu/ lucid-security main restricted universe multiverse
Deb http://archive.ubuntu.com/ubuntu/ lucid-updates main restricted universe multiverse
Deb http://archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse
The deb-src http://archive.ubuntu.com/ubuntu/ lucid main restricted universe multiverse
The deb-src http://archive.ubuntu.com/ubuntu/ lucid-security main restricted universe multiverse
The deb-src http://archive.ubuntu.com/ubuntu/ lucid-updates main restricted universe multiverse
Deb-src http://archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse

3. Update

Code:
Sudo apt-get update

4. Install the website system

Code:
Sudo apt-get install mysql-server mysql-client nginx php5-cgi php5-mysql php5-curl php5-gd php5-idn php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-pspell

5. Install lighttpd and remove the service

Code:
Sudo apt-get install lighttpd
Sudo update-rc.d-f lighttpd remove

6. Start fastcgi Process

Code:
Sudo/usr/bin/spawn-fcgi-a 127.0.0.1-p 9000-u www-data-g www-data-f/usr/bin/php5-cgi-C 4-P/var /run/fastcgi-php.pid

7. Set boot to start fastcgi Process

Code:
Sudo vi/etc/rc. local

Add next line

Code:
/Usr/bin/spawn-fcgi-a 127.0.0.1-p 9000-u www-data-g www-data-f/usr/bin/php5-cgi-C 4-P/var/ run/fastcgi-php.pid

8. Create a website and log directory (my personal directory is ubuntu. Use the following command to replace ubuntu with your personal directory)

Code:
Mkdir/home/ubuntu/www
Mkdir/home/ubuntu/log

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.