1:安装依赖包
yum -y install gcc pcre-devel zlib-devel openssl openssl-devel
2:下载Nginx安装包
wget https://nginx.org/download/nginx-1.16.1.tar.gz
3:解压
tar -zxvf nginx-1.16.1.tar.gz
4:进入nginx根目录
cd nginx-1.16.1
5: 安装到/usr/local/nginx目录
./configure --prefix=/usr/local/nginx
6:编译并安装
make && make install