我想从开发版本切换到稳定版本。
我从源代码安装了 nginx:
./configure
make
sudo make install
我尝试过sudo make uninstall
,但没有成功。
如何卸载 nginx?
答案1
卸载:
sudo rm -f -R /usr/local/nginx && rm -f /usr/local/sbin/nginx
来源:
http://articles.slicehost.com/2007/12/3/ubuntu-gutsy-installing-nginx-from-source
答案2
先停止服务:
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
答案3
这对我有帮助:
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
并做了。
答案4
cd /usr/ports/www/nginx
make deinstall