Cent7二句話快速安裝nginx服務器


Cent7二句話快速安裝nginx服務器

第一句:刪除原來版本nginx

[rot@host1]# yum remove nginx

Cent7二句話快速安裝nginx服務器

第二句:安裝源中的nginx,可以選擇版本 yum install nginx ==1.8x

[rot@host1]# yum install nginx

這就安裝好了,可以進行nginx文件配置,在下的邊路徑上。


Cent7二句話快速安裝nginx服務器


[rot@host1]# vi /etc/nginx/nginx.conf

啟動和重啟命令如下:

[rot@host1]# /usr/sbin/nginx -c /etc/nginx/nginx.conf #第一次啟動 或者 啟動報錯時使用

[rot@host1]# /usr/local/nginx/sbin/nginx -s reload #重啟


分享到:


相關文章: