CentOS 7 - 安裝Nginx

Nginx是一個高性能的Web服務軟件。相比Apache HTTP Server更加的輕量級和靈活,是在WEB及服務端開發中必不可少的工具。nginx

本文咱們將介紹CentOS 7下Nginx的安裝。bash

  1. 添加倉庫
sudo yum install epel-release
複製代碼
  1. 安裝Nginx
sudo yum install nginx
複製代碼
  1. 啓動Nginx
sudo systemctl start nginx
複製代碼
  1. 若是系統使用了防火牆(firewall),執行下面命令容許http/https
sudo firewall-cmd --permanent --zone=public --add-service=http 
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload
複製代碼
相關文章
相關標籤/搜索