Install nginx and linuxnginx in linux
Centos6.5 64-bit for linux
Nginx is 1.4.7
Download the corresponding version from http://nginx.org/download/
Unzip tar-zxvf nginx-1.4.7.tar.gz
Set the configuration information :. /configure -- prefix =/usr/local/nginx (if you do not execute this command, make may report an error [make: No targets specified and no makefile found stop ])
Make Compilation
Make install Installation
Execute./configure -- prefix =/usr/local/nginx. errors may occur.
[Error:]./configure: error: the HTTP rewrite module requires the PCRE library.
[Solution:] install pcre-devel to solve the problem.Yum-y install pcre-devel
[Error:]/configure: error: the HTTP cache module requires md5 functions
From OpenSSL library. You can either disable the module by using
-- Without-http-cache option, or install the OpenSSL library into the system,
Or build the OpenSSL library statically from the source with nginx by using
-- With-http_ssl_module -- with-openssl = <path> options.
[Solution:] yum-y install openssl-devel
Then start/usr/nginx/sbin/nginx
After modifying the nginx. conf file, check whether the file configuration is correctly executed:/usr/nginx/sbin/nginx-t.
If nginx is restarted, do not kill the process and restart it. Run/usr/nginx/sbin/nginx-s reload.
The
Then the installation is successful !!!