zoukankan      html  css  js  c++  java
  • Nginx03---重装

    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的结果:
    stephen@stephen-OptiPlex-390:~$ dpkg --get-selections|grep nginx
    nginx install
    nginx-common install
    nginx-core 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-core
    这样就可以完全卸载掉nginx包括配置文件

    2.查看nginx正在运行的进程,如果有就kill掉,然后重装  

    2.看下nginx还有没有启动,一般执行完1后,nginx还是启动着的,如下:
    
    stephen@stephen-OptiPlex-390:~$ ps -ef |grep nginx
    root 7875 2317 0 15:02 ? 00:00:00 nginx: master process /usr/sbin/nginx
    www-data 7876 7875 0 15:02 ? 00:00:00 nginx: worker process
    www-data 7877 7875 0 15:02 ? 00:00:00 nginx: worker process
    www-data 7878 7875 0 15:02 ? 00:00:00 nginx: worker process
    www-data 7879 7875 0 15:02 ? 00:00:00 nginx: worker process
    stephen 8321 3510 0 15:20 pts/0 00:00:00 grep --color=auto nginx
      
    3.kill nginx进程
    sudo kill -9 7875 7876 7877 7879
      
    4.全局查找与nginx相关的文件
    sudo find / -name nginx*
      
    5.依依删除4列出的所有文件
    sudo rm -rf file
      
    6. 再次重装
    sudo apt-get update
    sudo apt-get install nginx

     

  • 相关阅读:
    Visual GC(监控垃圾回收器)
    垃圾收集(GC)中如何确定哪些内存是"垃圾
    Java for循环和foreach循环的性能比较
    <mvc:annotation-driven />做了什么
    聊一聊分布式锁的设计
    String类对象的比较
    Java 中 Comparable 和 Comparator 比较
    系统对接API调用
    深入理解Java中的组合和继承
    面向对象设计七大原则
  • 原文地址:https://www.cnblogs.com/BlueFire-py/p/10841058.html
Copyright © 2011-2022 走看看