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