Download and decompress the installation package
Wget http://nginx.org/download/nginx-1.14.2.tar.gz tar – ZVXF nginx – 1.14.2. Tar. Gz
The decompressed installation package directory is displayed
CD nginx - 1.14.2
compile
./configure --prefix=/usr/local/nginx
An error occurred when executing./config to install nginx on centos7. checkingfor OS
+ Linux 2.6.32-431.el6.x86_64 x86_64
checking forC compiler ... Yum -y install GCC GCC c++ autoconf automake make yum -y install GCC GCC c++ autoconf automake makeCopy the code
Configure: error: The HTTP rewrite module requires the pcre library. You can either./configure: Error: The HTTP rewrite module requires the pcre librarydisable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the sourcewith nginx by using --with-pcre=<path> option. The devel package for PCRE, pcre-devel, needs to be installed. Install zlib zlib-devel openssl openssl--devel pcre pcre-develCopy the code
OpenSSL library is not used. Yum install OpenSSL *Copy the code
Compile and install
make&make install