#1.下载安装包
wget http://nginx.org/download/nginx-1.23.1.tar.gz
#2.解压
tar zxvf nginx-1.23.1.tar.gz
cd /nginx/nginx-1.23.1
#3.编译安装
yum -y install pcre-devel
yum -y install openssl openssl-devel
./configure --prefix=/usr/local/nginx
make && make install
#4.运行
cd /usr/local/nginx/sbin
./nginx
#重启
nginx -s reload
网友评论