下载源码包
wget http://nginx.org/download/nginx-1.20.1.tar.gz
解压
tar -zvxf nginx-1.20.1.tar.gz
安装依赖
yum -y install gcc gcc-c++ zlib-devel
预编译
./configure --prefix=/usr/local/nginx
编译安装
make && make install
开启服务,进入安装目录
./nginx
重启服务(修改配置后)
./nginx -s reload
原创文章,作者:Maggie-Hunter,如若转载,请注明出处:https://blog.ytso.com/272989.html