Nginx needs to rely on the following 3 packages
- Gzip module requires zlib library (download: http://www.zlib.net/) zlib-1.2.8.tar.gz
- Rewrite module requires pcre library (download: http://www.pcre.org/) pcre-8.21.tar.gz
- The SSL feature requires the OpenSSL library (download: http://www.openssl.org/) openssl-1.0.1.tar.gz
Note: If installed with the source code, the following Nginx installation needs to specify the –with-pcre corresponding compression package path, if the binary package installation does not need to specify
Dependent package One-click Installation:
"Development Tools""Development Libraries" 此命令可以一键安装开发工具包
SOURCE Installation:
openssl: tar -xzvf openssl-1.0.1.tar.gz cd openssl-1.0.1 ./config(注意) && make && make installpcre: tar -xzvf pcre-8.21.tar.gz cd pcre-8.21 ./configure && make && make installzlib: tar -xzvf zlib-1.2.8.tar.gz cd zlib-1.2.8 ./configure && make && make install
Nginx installation command: Nginx each version download address: http://nginx.org/download/
#注意 \ 前面至少一个有空格./configure --prefix=/home/renwh/nginx--with-http_ssl_module \--with-pcre=../pcre-8.21 \ #指向解压的源码目录--with-zlib=../zlib-1.2.8 \ #指向解压的源码目录--with-openssl=../openssl-1.0.1 \ #指向解压的源码目录
Note: The compiled nginx can be/home/renwh/nginx-v (the specific path to install the main) to see the compile time parameters
Then you just need to make,make install.
Reference Link: http://www.cnblogs.com/siqi/p/3572695.html
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
The above describes the Nginx installation notes, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.