Centos7Yum安装配置指定版本nginx


1、安装

rpm -ivh http://nginx.org/packages/centos/7/x86_64/RPMS/nginx-1.14.2-1.el7_4.ngx.x86_64.rpm

 

2、启动

# systemctl start nginx
// 验证是否启动成功
# curl http://127.0.0.1:80
// 正常会返回html代码

 

3、设置开机启动服务

 systemctl enable nginx

 

4、常用命令

// 服务状态
# systemctl status nginx
// 服务启动
# systemctl start nginx
// 服务停止
# systemctl stop nginx
// 服务重启
# systemctl restart nginx

 

  

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM