$ sudo yum install gcc gcc-c++ automake autoconf libtool make
配置源码安装依赖
PCRE - 支持正则表达式,nginx core 和 rewrite 模块依赖
1 2 3 4 5 6
$ wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.42.tar.gz $ tar -zxf pcre-8.42.tar.gz $ cd pcre-8.42 $ ./configure $ make $ sudo make install
zlib - header 压缩, Gzip模块依赖
1 2 3 4 5 6
$ wget http://zlib.net/zlib-1.2.11.tar.gz $ tar -zxf zlib-1.2.11.tar.gz $ cd zlib-1.2.11 $ ./configure $ make $ sudo make install
openSSL - 支持https协议, SSL和其他模块依赖
1 2 3 4 5 6
$ wget http://www.openssl.org/source/openssl-1.1.1b.tar.gz $ tar -zxf openssl-1.1.1b.tar.gz $ cd openssl-1.1.1b $ ./Configure linux-x86_64 --prefix=/usr $ make $ sudo make install
下载解压源码
1 2 3
$ wget http://nginx.org/download/nginx-1.15.11.tar.gz $ tar xzf nginx-1.15.11.tar.gz $ cd nginx-1.15.11