如何卸载nginx(从源代码安装)?


13

我想从开发版本切换到稳定版本。

我从以下来源安装了nginx:

./configure
make
sudo make install

我试过了,sudo make uninstall 但是没有用。

如何卸载nginx?


重复:superuser.com/questions/281920/…(无法投票关闭来自其他网站的重复内容,但投票关闭
处于

Answers:



5

首先停止服务:

sudo service nginx stop

我们的源代码编译文件:

sudo rm -rf /etc/nginx /etc/default/nginx /usr/sbin/nginx* /usr/local/nginx /var/run/nginx.pid /var/log/nginx

apt-get版本随附的Debian脚本:

sudo rm -rf /etc/init.d/nginx /etc/logrotate.d/nginx /var/lib/update-rc.d/nginx

您的静态内容:

sudo rm -rf /var/www

禁用启动守护程序:

sudo update-rc.d -f nginx disable

来源http://elinux.org/RPi_Nginx_Webserver


/ etc / nginx是通过软件包管理实用程序之一安装的软件包,可以使用相同的工具将其删除。
Eng7

0

这对我有帮助:

 make deinstall clean


 ;make===>  Deinstalling for nginx
 ===>   Deinstalling nginx-1.6.2_1,2
 Updating database digests format: 100%
 Checking integrity... done (0 conflicting)
 Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

 Installed packages to be REMOVED:
    nginx-1.6.2_1,2

 The operation will free 1 MiB.
 [1/1] Deinstalling nginx-1.6.2_1,2...
 [1/1] Deleting files for nginx-1.6.2_1,2: 100%
 ===>  Cleaning for nginx-1.6.2_1,2

并做了。


-1
cd /usr/ports/www/nginx
make deinstall

OP不会说它在FreeBSD主机上
雏菊
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.