1. #tar XF nginx-1.4.2.tar.gz
2, #cd nginx-1.4.2
3, #./configure--prefix=/usr/local/nginx--conf-path=/etc/nginx
Executive post: error:the HTTP rewrite module requires the PCRE library. is a description of the missing Pcre-devel package,
# RPM-QA |grep pcre result pcre-7.8-6.el6.x86_64, missing Pcre-devel package visible
To see if pcre-devel exists: Yum list pcre*, the results are as follows:
Installed Packages
pcre.x86_64 7.8-6.el6 @anaconda-ce ntos-201303020151.x86_64/6.4
Available Packages
pcre.i686 7.8-6.el6 base_local
pcre-devel.i686 7.8-6.el6 base_local
pcre-devel.x86_64 7.8-6.el6 base_local
pcre-static.x86_64 7.8-6.el6 base_local
Visible exists.
4. #yum Install Pcre-devel
5, and then in the execution #./configure--prefix=/usr/local/nginx--conf-path=/etc/nginx,
The execution results show a configuration summary: Config summary
+ Using System PCRE Library
+ OpenSSL Library is not used
+ md5:using System Crypto Library
+ sha1:using System Crypto Library
+ Using System zlib Library
Nginx path prefix: "/usr/local/nginx"
Nginx binary file: "/usr/local/nginx/sbin/nginx"
Nginx configuration prefix: "/etc"
Nginx configuration file: "/etc/nginx"
Nginx pid file: "/usr/local/nginx/logs/nginx.pid"
Nginx error log file: "/usr/local/nginx/logs/error.log"
Nginx HTTP access log file: "/usr/local/nginx/logs/access.log"
Nginx HTTP client request body Temporary files: "Client_body_temp"
Nginx HTTP proxy temporary files: "Proxy_temp"
Nginx http fastcgi temporary files: "Fastcgi_temp"
Nginx http Uwsgi temporary files: "Uwsgi_temp"
Nginx http scgi temporary files: "Scgi_temp"
This time there is no error, indicating that the execution of configure script success.
6. Compiling #make
7. Installing #make Install
8, Ls/usr/local/nginx, the result is: HTML logs sbin
Ls/etc/nginx, the result is null: Installation failed. Because the Master profile name is not specified nginx.conf
9, uninstall: Rm-rf/usr/local/nginx
Rm-rf/etc/nginx
10, again in the implementation of #./configure--prefix=/usr/local/nginx--conf-path=/etc/nginx/nginx.conf
The execution results show a configuration summary: Config summary
+ Using System PCRE Library
+ OpenSSL Library is not used
+ md5:using System Crypto Library
+ sha1:using System Crypto Library
+ Using System zlib Library
Nginx path prefix: "/usr/local/nginx"
Nginx binary file: "/usr/local/nginx/sbin/nginx"
Nginx configuration prefix: "/etc/nginx"
Nginx configuration file: "/etc/nginx/nginx.conf"
Nginx pid file: "/usr/local/nginx/logs/nginx.pid"
Nginx error log file: "/usr/local/nginx/logs/error.log"
Nginx HTTP access log file: "/usr/local/nginx/logs/access.log"
Nginx HTTP client request body Temporary files: "Client_body_temp"
Nginx HTTP proxy temporary files: "Proxy_temp"
Nginx http fastcgi temporary files: "Fastcgi_temp"
Nginx http Uwsgi temporary files: "Uwsgi_temp"
Nginx http scgi temporary files: "Scgi_temp"
Compare the differences with the previous configuration summary:
Nginx configuration prefix: "/etc/nginx"
Nginx configuration file: "/etc/nginx/nginx.conf"
11, compile and install: #make && make install, first implement make, then execute make install successfully
12, Ls/usr/local/nginx, the result is: HTML logs sbin
Ls/etc/nginx, the result is:
fastcgi.conf fastcgi_params koi-utf mime.types nginx.conf scgi_params uwsgi_ Params Win-utf
Fastcgi.conf.default fastcgi_params.default koi-win mime.types.default nginx.conf.default scgi_params.default uwsgi_ Params.default
13, Nginx Start:
#netstat-TNL, results no 80:
#cd/usr/local/nginx
#./nginx
#netstat-TNL, the result is 80, indicating a successful start:
TCP 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
#在浏览器中访问http://192.168.127.147/may not be accessible, the firewall may not be turned off.
#service iptables Stop
Again visit http://192.168.127.147/finally access to haha
Compiling and installing nginx-1.4.2