Centos7 安装 nginx 基于 yum

1, 添加 nginx 储存库 

yum -y install epel-release

2, 安装 nginx

yum -y install nginx

3, 查看安装版本号

nginx -v

4,几个常用命令

启动服务器                                     

niginx                   

检查配置文件是否书写正确       

nginx -t                 

加载新配置文件(相当于重启)

nginx -s reload    

立即关闭

nginx -s stop      

完成所有请求后停止

nginx -s quit     

重新打开日志文件    

nginx -s reopen 

猜你喜欢

转载自www.cnblogs.com/lovling/p/9197572.html
今日推荐