: This article describes how to install nginx. if you are interested in the PHP Tutorial, refer to it. Nginx depends on the following three packages
- The gzip module requires the zlib library (Download: http://www.zlib.net/) zlib-1.2.8.tar.gz
- The rewrite module requires a pcre library (Download: http://www.pcre.org/) pcre-8.21.tar.gz
- Ssl features require openssl library (Download: http://www.openssl.org/) openssl-1.0.1.tar.gz
Note: If the source code is used for installation, you must specify the path of the compressed package corresponding to-with-pcre during nginx installation. if the binary package is used for installation, you do not need to specify
One-click installation of dependency packages:
Yum-y install zlib-devel openssl -- devel pcre-develyum-y groupinstall "Development Tools" "Development Libraries" this command can install the Development kit with one click
Source code installation:
Openssl: tar-xzvf openssl-1.0.1.tar.gz cd openssl-1.0.1. /config (note) & make installpcre: tar-xzvf pcre-8.21.tar.gz cd pcre-8.21. /configure & make installzlib: tar-xzvf zlib-1.2.8.tar.gz cd zlib-1.2.8. /configure & make install
Nginx installation command: nginx versions: http://nginx.org/download/
# Note \ there must be at least one leading space. /configure -- prefix =/home/renwh/nginx -- with-http_ssl_module \ -- with-pcre = .. /pcre-8.21 \ # point to the decompressed source directory -- with-zlib = .. /zlib-1.2.8 \ # point to the decompressed source code directory -- with-openssl = .. /openssl-1.0.1 \ # point to the decompressed Source Code Directory
Note: after compiling nginx, you can view the parameters during compilation through/home/renwh/nginx-V (the specific path is mainly installed ).
Then you only need make and make install.
Reference: http://www.cnblogs.com/siqi/p/3572695.html
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.
The above describes the nginx installation notes, including some content, and hope to help those who are interested in the PHP Tutorial.