華為云centos7.6安裝Nginx
1.安裝gcc
yum -y install gcc automake autoconf libtool make

2.安裝g++
yum install gcc gcc-c++

3.下載PCRE 源碼包
cd /usr/local/src
wget https://netix.dl.sourceforge.net/project/pcre/pcre/8.40/pcre-8.40.tar.gz


4.解壓下載好的pcre
Nginx不支持pcre2版本!
tar -zxvf pcre-8.40.tar.gz

5.安裝pcre2
cd pcre-8.40
./configure?
make?
make install



6.安裝zlib庫
cd /usr/local/src?
wget http://www.zlib.net/zlib-1.2.13.tar.gz
tar -zxvf zlib-1.2.13.tar.gz?
./configure?
make?
make install


7.安裝openssl
cd /usr/local/src?
wget https://www.openssl.org/source/openssl-1.1.1t.tar.gz
tar -zxvf openssl-1.1.1t.tar.gz
8.安裝Nginx
cd?/usr/local/src?
wget http://nginx.org/download/nginx-1.13.7.tar.gz
tar -zxvf nginx-1.13.7.tar.gz?
cd cd nginx-1.13.7
./configure?
make?
make install

9.啟動(dòng)Nginx
cd usr/local/nginx/sbin?
./nginx

10.查看是否啟動(dòng)成功
netstat -lnpt

11.配置端口和ip地址
linux 下修改路徑/usr/local/nginx/conf/nginx.conf
vim /usr/local/nginx/conf/nginx.conf

12.重啟Nginx
cd /usr/local/nginx/sbin/
./nginx -s reload
