Nginx Deployment Process

Source: Internet
Author: User
Tags fpm install php php download regular expression centos

Before introducing Nginx, we first appreciate a technology:

FastCGI is a dynamic, open and secure network server interface technology. is upgraded by the CGI (Common Gateway Interface) technology.

CGI is the graphical application process that is loaded repeatedly to complete the response, while fastcgi starts multiple CGI and keeps the process resident, making fastcgi more efficient than CGI.

Support for FASTCGI Web servers are: Nginx,apache (need to join MOD_FASTCGI module, and only support single process so the effect is general), LIGHTTPD, IIS, etc.

Here we build: centos+nginx+mysql+php

Nginx Profile: It is the Russian Igor Sysoev (Igor). Saisoyev) writes a high-performance HTTP and reverse proxy server. Nginx should be a dark horse in Web server software, and it has been an extraordinary performance since birth.

CentOS Install Php,openbsd install Nginx to achieve distributed installation.

Pcre Downloads: http;//pcre.org (enables Nginx to support regular expression rewrite rules)

Nginx Download: http://www.nginx.net

To install the Pcre library first:

Tar ZXVF pcre-8.21.tar.gz

cd/pcre-8.21

./configure

Make && make install

Install Nginx:

Tar ZXVF nginx-1.2.0.tar.gz

cd/nginx-1.2.0

./configure–prefix=/usr/local/nginx (Specify installation directory)

Make && make install

Note: Can be performed during installation./configure–help describes the detailed installation options

Nginx configuration file:/usr/local/nginx/conf/nginx.conf

Start Nginx:cd/usr/local/nginx/sbin

./nginx

Ps–aux|grep nginx View Process

Visit: HTTP://IP

Close Nginx:cd/usr/local/nginx/logs

Cat Nginx.pid

Kill–quit Process Number

Reboot Nginx:kill–hup Process Number Of course we can also use the following command to restart Nginx

Kill-hup ' Cat/usr/local/nginx/sbin/nginx.pid '

Install PHP:

PHP Download Address: http://www.php.net/

PHP-FPM Download Address: http://php-fpm.org/(is a patch for PHP, better support Nginx)

Install PHP:

Tar php-5.2.17.tar.gz

GZIP–CD php-5,2,17-fpm-0.5.14.diff.gz| Patch–d php-5.2.17–p1 the patch into PHP

Cd php-25.2.17

./configure–prefix=/opt/php-5.2.17–enable-fastcgi–enable-fpm

More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/Servers/web/

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.