1.下载4个压缩包:
pcre,rewrite模块要用到,下载地址:https://ftp.pcre.org/pub/pcre/
zlib,gzip模块要用到,下载地址:http://www.zlib.net/zlib-1.2....
openssl,ssl模块用到,下载地址:https://www.openssl.org/source/
Nginx,下载地址:http://nginx.org/en/download....
2.将它们放到/usr/local/下
3.安装pcre
# cd /usr/local/ # tar -zxvf pcre-8.38.tar.gz # cd pcre-8.38 # ./configure # make # make install@H_502_0@4.安装zlib
# cd /usr/local/ # tar -zxvf zlib-1.2.11.tar.gz # cd zlib-1.2.11 # ./configure # make # make install@H_502_0@5.安装openssl
# cd /usr/local/ # tar -zxvf openssl-1.0.2l.tar.gz # cd openssl-1.0.2l # ./configure # make # make install@H_502_0@6.安装Nginx
# cd /usr/local/ # tar -zxvf Nginx-1.12.1.tar.gz # cd Nginx-1.12.1 # ./configure --prefix=/usr/local/Nginx --with-pcre=/usr/local/pcre-8.38 --with-zlib=/usr/local/zlib-1.2.11 --with-openssl=/usr/local/openssl-1.0.2l # make # make install@H_502_0@7.安装完成,启动Nginx
# /usr/local/Nginx/sbin/Nginx@H_502_0@8.访问服务器ip查看是否成功,完 @H_502_0@笔记:中间如果有报错You need a C++ compiler for C++ support,需要安装gcc+:
# yum install -y gcc gcc-c++原文链接:https://www.f2er.com/centos/375675.html