nginx-1.12.2 安装包下载地址:https://download.csdn.net/download/meng564764406/11072412
# 需要联网下载使用并使用root
yum install -y gcc gcc-c++
# 以下使用普通用户或者root用户均可,最好建立nginx用户
cd ~/soft
tar -xvf nginx-1.12.2.tar.gz
tar -xvf openssl-1.0.1t.tar.gz
tar -xvf pcre-8.39.tar.gz
tar -xvf zlib-1.2.11.tar.gz
cd ~/soft/pcre-8.39
./configure --prefix=~/install/pcre-8.39
make && make install
cd ~/soft/zlib-1.2.11
./configure --prefix=~/install/zlib-1.2.11
make && make install
cd ~/soft/openssl-1.0.1t
./config --prefix=~/install/openssl-1.0.1t
make && make install
cd ~/soft/nginx-1.12.2
./configure --prefix=~/install/nginx-1.12.2 --with-http_stub_status_module --with-http_sub_module --with-http_ssl_module --with-http_realip_module --with-pcre=~/soft