-
下载安装包
http://nginx.org/en/download.html -
命令安装
yum -y install gcc-c++ pcre pcre-devel zlib zlib-devel openssl openssl-devel
tar -xvf nginx-1.19.7.tar.gz //解压tar包
cd nginx-1.19.7 //进入目录
./configure --prefix=/usr/local/nginx && make && make install //执行命令
./nginx -c /usr/local/nginx/conf/nginx.conf //指定配置文件启动
./nginx -s stop
./nginx -s quit
./nginx -s reload //重启nginx服务
./nginx -t 验证nginx配置文件是否正确
不常在线,回复不及时,有问题可加微信讨论,微信号:li_994154714