官网 https://nginx.org/en/download.html
yum -y install gcc pcre-devel zlib-devel openssl openssl-devel
#下载
wget https://nginx.org/download/nginx-1.19.5.tar.gz
# 解压
tar -zxvf nginx-1.19.5.tar.gz
#进入nginx目录
cd nginx-1.19.5
# 配置
./configure
# make
make && make install
#测试是否安装成功
cd /usr/local/nginx/
./sbin/nginx –t
#启动nginx
cd /usr/local/nginx/sbin
./nginx