騰訊雲 Centos 安裝nginx

  • 添加CentOS 7 EPEL 倉庫
sudo yum instal lepel-release
  • 安裝Nginx
sudo yum install nginx
  • 啓動Nginx
sudo systemctl start nginx
  • 啓動防火牆
sudo systemctl start firewalld.service
  • 允許HTTP和HTTPS傳輸
sudo firewall-cmd --permanent --zone=public --add-service=http
sudo firewall-cmd --permanent --zone=public --add-service=https

sudo firewall-cmd --reload

在瀏覽器中輸入服務器ip地址,看到類似 Welcome to nginx 字樣,則表示安裝成功
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章