http://nginx.org/en/download.html
gcc pcre-devel zlib-devel openssl openssl-devel
yum list installed | grep "软件名或者包名"
yum -y install gcc pcre-devel zlib-devel openssl openssl-devel
1. 解压
tar -zxvf nginx-1.18.0.tar.gz
2. 进入nginx
cd nginx-1.18.0
3. 配置
./configure --prefix=/usr/local/nginx-1.18.0
4. make
make
make install
./sbin/nginx
./sbin/nginx -s reload
./sbin/nginx -s stop
其它命令
nginx -c /特定目录/nginx.conf
nginx -s reload
执行这个命令后,master进程会等待worker进程处理完当前请求,然后根据最新配置重新创建新的worker进程,完成Nginx配置的热更新。nginx -s stop
nginx -s quit
执行该命令后,Nginx在完成当前工作任务后再停止。nginx -t
nginx -t -c /特定目录/nginx.conf
nginx -v
原文:https://www.cnblogs.com/lishen2021/p/14676143.html