默认安装路径: /usr/local/nginx
nginx工作原理: nginx是多线程web服务器,一个master进程,多个worker进程.启动时master进程去校验nginx.con配置文件,根据里面要求去创建worker进程;master进程接收client请求并分发给worker进程去实现
./nginx -t 校验nginx.con配置语法
./nginx -s reload 不重启nginx,重新加载nginx.conf,会使worker进程PID变化,master不变.restart后master的PID也会变
./nginx -s stop 停止nginx
./nginx 启动nginx
./nginx -v 查看版本
./nginx -V 查看已安装的模块
通过yum安装的nginx,通过systemctl start nginx去管理
nginx命令
于 2023-02-06 22:27:42 首次发布