Now many domestic large web sites have adopted the Nginx as a Web server, after all, nginx in high concurrency, low resource consumption, reverse proxy, and so has a good performance, now I also with the public, study under the Nginx, by the way load balance.
System environment, rhel6.5 x86_64, to Nginx official website (http://nginx.org/) looked, found that the main line version has been to 1.7.3, because it is a test, so the stable version of the 1.6.0 (http://nginx.org/ download/nginx-1.6.0.tar.gz)
Extract files:
Tar zxvf nginx-1.6.0
Because the Nginx rewrite relies on the Pcre library, you need to compile the installation Pcre library on the Linux system and download the Pcre library first:
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.34.tar.gz
Extract files:
Tar zxvf pcre-8.34.tar.gz
Configuration
./configure--enable-utf8
I am prompted here Configure:error:You need ac++ compiler for C + + support, it seems that Pcre is compiled by C + +, install C + + compilation tools,
Yum install-y gcc gcc-c++
And then configure Pcre
./configure--enable-utf8
Compile and install Pcre
Make && make install
Here Pcre Library Setup completes, then switch to Nginx directory to continue the installation Nginx
./configure--prefix=/usr/local/nginx--user=nginx--group=nginx--with-http_stub_status_module--with-http_gzip_ Static_module
-with-pcre=/usr/local/pcre-8.34/
The premise is to increase the number of Nginx this user and user groups, of course, you can also specify other users
If you receive a prompt to install the gzip library,
Modifying the./configure plus the--without-http_gzip_module in the hint, the GZIP module is temporarily unavailable in the test.
Finally compile the installation
Make && make install
At this point, the Nginx installation completes, and the bottom boot Nginx test is successful.
First switch to the sbin in the Nginx installation directory, and then start Nginx
Nginx-c/home/nginx/tools/nginx/conf/nginx.conf
Back to the column page: http://www.bianceng.cnhttp://www.bianceng.cn/Servers/web/