當前位置:編程學習大全網 - 網站源碼 - linux徹底刪除nginx

linux徹底刪除nginx

linux徹底刪除nginx

原因:nginx無法啟動了,配置出現問題,因此卸載刪除配置後重裝

nginx重裝後啟動成功

1.先執行壹下命令:

1.1 刪除nginx,–purge包括配置文件

sudo apt-get --purge remove nginx

1.2 自動移除全部不使用的軟件包

sudo apt-get autoremove

1.3 羅列出與nginx相關的軟件

dpkg --get-selections|grep nginx

執行1.3的結果:

dpkg --get-selections|grep nginx

nginx install

nginx-common install

nginx-full install

1.4 刪除1.3查詢出與nginx有關的軟件

sudo apt-get --purge remove nginx

sudo apt-get --purge remove nginx-common

sudo apt-get --purge remove nginx-full

這樣就可以完全卸載掉nginx包括配置文件

2.查看nginx正在運行的進程,如果有就kill掉

ps -ef |grep nginx

1.看下nginx還有沒有啟動,壹般執行完1後,nginx還是啟動著的,如下:

ps -ef |grep nginx

3.kill nginx進程

sudo kill -9 進程ID

4.全局查找與nginx相關的文件

sudo find / -name nginx*

5.依依刪除4列出的所有文件

sudo rm -rf file

這樣就徹底刪除nginx了

  • 上一篇:逆水寒楚相玉要回答問題嗎
  • 下一篇:量化因子和比例因子公式
  • copyright 2024編程學習大全網