Ubuntu下Nginx的安装和卸载

环境是Ubuntu 16.04

安装:

sudo apt-get update
sudo apt-get install nginx

卸载:

sudo apt-get --purge remove nginx  # 删除nginx,–purge包括配置文件

dpkg --get-selections|grep nginx    #罗列出与nginx相关的软件

sudo apt-get remove nginx nginx-common # 卸载删除除了配置文件以外的所有文件。

sudo apt-get purge nginx nginx-common # 卸载所有东东,包括删除配置文件。

sudo apt-get autoremove # 在上面命令结束后执行,主要是卸载删除Nginx的不再被使用的依赖包。

sudo apt-get remove nginx-full nginx-common #卸载删除两个主要的


sudo  find  /  -name  nginx*   #全局查找与nginx相关的文件

sudo rm -rf file          #删除文件

 参考:https://blog.csdn.net/u010571844/article/details/50819704

原文地址:https://www.cnblogs.com/sdadx/p/10297273.html