手机看片精品高清国产日韩,色先锋资源综合网,国产哺乳奶水91在线播放,乱伦小说亚洲色图欧洲电影

nginx 操作,啟動(dòng)、停止、重啟

2016-08-17 17:05:59 15958

查看nginx進(jìn)程看看有沒有啟動(dòng),并可以查看進(jìn)程ID

Shell代碼  收藏代碼

  1. [root@ uu]# ps -ef|grep nginx  

  2. root     20538     1  0 13:51 ?        00:00:00 nginx: master process /opt/nginx/sbin/nginx  

  3. root     20539 20538  0 13:51 ?        00:00:00 nginx: worker process  

  4. root     20540 20538  0 13:51 ?        00:00:00 nginx: worker process  

  5. root     24132     1  0 15:03 ?        00:00:00 nginx: master process sbin/nginx  

  6. nobody   24133 24132  0 15:03 ?        00:00:00 nginx: worker process  

  7. root     24552 20113  0 15:12 pts/2    00:00:00 grep nginx  

  8. [root@ uu]#   

 
停止nginx,其實(shí)就是殺掉進(jìn)程,但是要注意不能用kill -9 進(jìn)程id,因?yàn)閚ginx啟動(dòng)時(shí)有子進(jìn)程,所以要用下面方式殺死

Shell代碼  收藏代碼

  1. [root@ uu]# ps -ef|grep nginx  

  2. root     20538     1  0 13:51 ?        00:00:00 nginx: master process /opt/nginx/sbin/nginx  

  3. root     20539 20538  0 13:51 ?        00:00:00 nginx: worker process  

  4. root     20540 20538  0 13:51 ?        00:00:00 nginx: worker process  

  5. root     20544     1  0 13:51 ?        00:00:00 nginx: master process /opt/nginxcs/sbin/nginx  

  6. nobody   24052 20544  0 15:02 ?        00:00:00 nginx: worker process    

  7. root     24066 20113  0 15:02 pts/2    00:00:00 grep nginx  

  8. [root@ uu ]# kill 20544  

  9. [root@ uu]# ps -ef|grep nginx  

  10. root     20538     1  0 13:51 ?        00:00:00 nginx: master process /opt/nginx/sbin/nginx  

  11. root     20539 20538  0 13:51 ?        00:00:00 nginx: worker process  

  12. root     20540 20538  0 13:51 ?        00:00:00 nginx: worker process  

  13. root     24104 20113  0 15:03 pts/2    00:00:00 grep nginx  

  14.   


啟動(dòng)nginx

Shell代碼  收藏代碼

  1. [root@ uu]# ps -ef|grep nginx  

  2. root     20538     1  0 13:51 ?        00:00:00 nginx: master process /opt/nginx/sbin/nginx  

  3. root     20539 20538  0 13:51 ?        00:00:00 nginx: worker process  

  4. root     20540 20538  0 13:51 ?        00:00:00 nginx: worker process  

  5. root     24104 20113  0 15:03 pts/2    00:00:00 grep nginx  

  6. [root@ uu]# sbin/nginx   

  7. [root@ uu]# ps -ef|grep nginx  

  8. root     20538     1  0 13:51 ?        00:00:00 nginx: master process /opt/nginx/sbin/nginx  

  9. root     20539 20538  0 13:51 ?        00:00:00 nginx: worker process  

  10. root     20540 20538  0 13:51 ?        00:00:00 nginx: worker process  

  11. root     24132     1  0 15:03 ?        00:00:00 nginx: master process sbin/nginx  

  12. nobody   24133 24132  0 15:03 ?        00:00:00 nginx: worker process  

  13. root     24139 20113  0 15:03 pts/2    00:00:00 grep nginx  

  14.   

 






提交成功!非常感謝您的反饋,我們會(huì)繼續(xù)努力做到更好!

這條文檔是否有幫助解決問題?

非常抱歉未能幫助到您。為了給您提供更好的服務(wù),我們很需要您進(jìn)一步的反饋信息:

在文檔使用中是否遇到以下問題: