First, the experimental environment
CentOS6.5
Software: nginx-1.6.2.tar.gz
Second, the experimental steps
1) Install the software that Nginx relies on
Yum-y Install Pcre Pcre-devel
Yum-y Install OpenSSL Openssl-devel
Rpm-qa pcre Pcre-devel OpenSSL openssl-devel
2) Create Nginx user, specify shell type, and do not create home directory
Useradd nginx-s/sbin/nologin/-M
If not added users will have the following error:
Nginx: [Emerg] Getpwnam ("Nginx") failed
Nginx:configuration file/application/nginx1.6.2/conf/nginx.conf Test Failed
Workaround: Add Users again
3) Download the nginx-1.6.2.tar.gz and unzip the nginx-1.6.2.tar.gz, then compile and install
Wget-o/home/chen/tools/http://nginx.org/download/nginx-1.6.2.tar.gz
Tar XF nginx-1.6.2.tar.gz
CD nginx-1.6.2
./configure--prefix=/application/nginx1.6.2--user=nginx--group=nginx--with-http_ssl_module--with-http_stub_ Status_module
Make && make Installl
Ln-s/application/nginx1.6.2/application/nginx
/application/nginx/sbin/nginx-t
/application/nginx/sbin/nginx-s Reload
Third, configure the local and Windows Hosts file, access in the browser
650) this.width=650; "style=" float:left; "src=" http://s3.51cto.com/wyfs02/M01/82/DC/ Wkiol1djto7ad1vdaaay0kacnmy340.png-wh_500x0-wm_3-wmp_4-s_1021986501.png "title=" Nginx Build success Diagram "alt=" Wkiol1djto7ad1vdaaay0kacnmy340.png-wh_50 "/>
For detailed steps and detailed knowledge of Nginx click: http://purify.blog.51cto.com/10572011/1770397
This article is from "Wake up your not alarm clock but dream" blog, please be sure to keep this source http://purify.blog.51cto.com/10572011/1790148
Build Nginx Server nginx-1.6.2.tar.gz