1.先執行指令:
sudo apt-get --purge remove nginx
sudo apt-get autorem
dpkg --get-selections|grep nginx羅列出與nginx相關的軟體, nginx-common deinstall 然後sudo apt-get --purge remove nginx-common 這樣就可以完全卸載掉nginx包含設定檔2.ps -ef |grep nginx 看下nginxnginx還有沒有啟動,一般執行完1後,nginx還是啟動的,如下:
bkxmgx@ubuntu:/$ ps -ef |grep nginxroot 4061 2418:0 master processsbin/nginxnobody 4062 4061 0 Mar11 ? 00:00:00 nginx: worker process3.kill nginx進程
sudo kill -9 🎜> / -name nginx*/usr/local/src/nginx-1.7.9/usr/local/src/nginx-1.7.9/objs/src /nginx.o
/usr/local/src/nginx-1.7.9/objs/nginx.8
/usr/local/src/nginx-1.7.9/objs/nginx
/usr/local/src/nginx-1.7.9/src/http/modules/perl/nginx.xs
/usr/local/src/nginx-1.7.9/src /http/modules/perl/nginx.pm
/usr/local/src/nginx-1.7.9/src/core/nginx.c
/usr/local/src/nginx -1.7.9/src/core/nginx.h
/usr/local/src/nginx-1.7.9/man/nginx.8
/usr/local/src/nginx -1.7.9/conf/nginx.conf
/usr/local/src/nginx-1.7.9/contrib/vim/syntax/nginx.vim
/usr/local/src /nginx-1.7.9/contrib/vim/ftdetect/nginx.vim
/usr/local/src/nginx-1.7.9/contrib/vim/indent/nginx.vim
/usr/local/nginx
/usr/local/nginx/logs/nginx.pid
/usr/local/nginx/conf/nginx.conf.default
/usr/local/nginx/conf/nginx.conf/usr/local/nginx/sbin/nginx/home/bkxmgx/nginx.conf/home/bkxmgx/nginx.conf/home /bkxmgx/nginx-1.7.9.tar.gz/home/bkxmgx/桌面/nginx.conf/home/bkxmgx/桌面/nginx~/home/bkxmgx/桌面/nginx~/ home/bkxmgx/桌面/nginx5.依依刪除4所有列出的檔案
sudo rm -r /usr/local/src/nginx-1.7.9sudo rm -r /usr/local/nginxsudo o/o/r. nginx/logs/nginx.pidsudo rm -r /usr/local/nginx/conf/nginx.conf.defaultsudo rm -r /defaultsudo rm -r / nginx.confsudo rm -r /usr/local/nginx/sbin/nginxsudo rm -r /home/bkxmgx/nginx.confsudo rm -r /home/bkxmgx/桌面/nginx~sudo rm -r /home/bkxmg
這樣就徹底刪除nginx了
以上就介紹了 徹底刪除nginx,包括了方面的內容,希望對PHP教程有興趣的朋友有所幫助。