天天看點

yum安裝nginx

安裝過程

#擷取nginx的yum源,從官方擷取到的     #>rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm     #安裝nginx     #> yum install -y nginx           
yum安裝nginx

常用指令

#檢查nginx服務狀态     #> systemctl status nginx     #> ps -axu|grep nginx     [root@ckmike /]# ps -axu|grep nginx     root       7719  0.0  0.0  46344   976 ?        Ss   05:13   0:00 nginx: master process nginx     nginx      7720  0.0  0.1  46752  1940 ?        S    05:13   0:00 nginx: worker process     root       7725  0.0  0.0 112708   976 pts/0    R+   05:14   0:00 grep --color=auto nginx     [root@ckmike /]#      #啟動服務     #> nginx     #>systemctl start nginx     #重新開機服務     #>nginx -s reload     #>systemctl restart nginx     #檢查配置是否有問題     #>nginx -t     #關閉ngixn服務     #>systemctl stop nginx     #>nginx -s stop     #> kill -s [pid]           

更多指令請進入官網學習。

繼續閱讀