zoukankan      html  css  js  c++  java
  • Ubuntu 下nginx 的卸载 与重新装

    由于本人把自己服务器的nginx 给玩坏了,不得已选择卸载重新安装,(先让我哭一会)

    然后我把/usr/sbin/nginx  和/etc/nginx 和/usr/share/nginx 和 /usr/share/man/man1/nginx.1.gz的文件夹给删了

    然后去重新装 执行这个命令:apt-get install nginx  

    发现老是报:

    nginx is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 14 not upgraded.

    大概意思就是nginx已经存在还是没有删除掉。可能存在了一些配置什么东西的,反正我们是没有把nginx删干净

    然后我又去网上找了好多资料,他们大多数都是说 把那几个文件夹删了 就可以,

    然而对于我来说 并没有卵用。好吧!继续在网上早解决的办法,找到一个我试一个。然后就找到下面的方法了:

     
    rm -rf /etc/nginx
    rm -rf /usr/sbin/nginx
    rm /usr/share/man/man1/nginx.1.gz
    apt-get remove nginx* (apt-get remove --purge nginx)
     
    sudo apt-get remove nginx #Removes all but config files.
    sudo apt-get purge nginx #Removes everything.
     
    重新安装:

    To recreate it, first uninstall using purge to remove even configuration files and records:

    apt-get purge nginx nginx-common nginx-full
    

    then reinstall:

    apt-get install nginx
    

    if above doesn't work for you

    You can also try using --force-confmiss option of dpkg.

    sudo dpkg --force-confmiss -i /var/cache/apt/archives/nginx-common_*.deb

     
     
    我的问题就是按照上面的解决了, 感谢万能的网络
  • 相关阅读:
    SpringMVC拦截器
    SpringMVC异常
    SpringMVC文件上传
    SpringMVC返回值类型
    JVM字节码
    使用Apache JMeter进行测试
    Tomcat优化
    垃圾收集器
    GC常见算法
    VisualVM远程连接Tomcat
  • 原文地址:https://www.cnblogs.com/qcwblog/p/5725210.html
Copyright © 2011-2022 走看看