網站首頁 學習教育 IT科技 金融知識 旅遊規劃 生活小知識 家鄉美食 養生小知識 健身運動 美容百科 遊戲知識 綜合知識
當前位置:趣知科普吧 > IT科技 > 

linux下nginx安裝與配置詳解

欄目: IT科技 / 發佈於: / 人氣:2.68W

產品型號:Thinkpad E15

系統版本:centos8

透過yum安裝nginx服務

linux下nginx安裝與配置詳解

[root@xuegod63 ~]# yum install -y epel-release  #安裝epel源

[root@xuegod63 ~]# yum install -y nginx  #安裝nginx

[root@xuegod63 ~]# systemctl start nginx  #啓動nginx

[root@xuegod63 ~]# iptables -F  #清空防火牆

開啟瀏覽器,訪問虛擬機的IP位址:http://192.168.1.63/

可以訪問,成功,說明nginx安裝成功了。

總結:

1. yum install -y epel-release

2. yum install -y nginx

3. systemctl restart nginx