Centos7安裝nignx

Centos7安裝nignx


  1. 安裝epel源,默認源有好多軟件無法安裝

    sudo yum install epel-release

  2. 安裝nignx

    sudo yum install nginx

  3. 啓動nignx

    sudo systemctl start nginx

  4. 關閉nignx

    sudo systemctl enable nginx

  5. 加入開機啓動

    sudo systemctl enable nginx

服務配置

  • 服務器根路徑 /usr/share/nginx/html
  • 默認配置文件路徑 /etc/nginx/conf.d/default.conf
  • 虛擬服務器配置路徑 /etc/nginx/conf.d/*.conf
  • 全局配置路徑 /etc/nginx/nginx.conf
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章