Nginx load Balancing Chapter One, Nginx installation

Source: Internet
Author: User
Tags ftp nginx load balancing

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/

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.