Nginx卸載重裝問題


1.刪除nginx,-purge包括配置文件

sudo apt-get --purge remove nginx

 

2.移除全部不使用的軟件包

sudo apt-get autoremove

 

3.羅列出與nginx相關的軟件並刪除

dpkg --get-selections|grep nginx

sudo apt-get --purge remove nginx

sudo apt-get --purge remove nginx-common

sudo apt-get --purge remove nginx-core

 

 

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

ps -ef |grep nginx

 

sudo kill -9 XXX

 

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

sudo  find  /  -name  nginx*

sudo rm -rf file

 

6.刪除列出的所有文件

sudo rm -rf file

 

7.重裝nginx

sudo apt-get update
sudo apt-get install nginx

 

nginx的其他內容

 

測試nginx配置是否正確

sudo nginx -t

nginx 重啟

sudo service nginx restart


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM