很显然,我是服务器pipe理的新手。 我的目标是达到使用Web服务所需的知识。
我玩我的Debian服务器,我搞砸了Apache2; 现在我想完全*从服务器中删除它,然后重新安装它作为新的。
*完全是我的意思完全是日志,configuration,设置,一切!
我按照freedom_is_chaos在这个答案中提出的步骤,我猜apache2不再安装,因为如果我做apt-get remove apache2 ,我得到这个:
# apt-get remove apache2 Reading package lists... Done Building dependency tree Reading state information... Done Package apache2 is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded. # dpkg --remove apache2 dpkg - warning: ignoring request to remove apache2 which isn't installed. # dpkg --purge apache2 dpkg - warning: ignoring request to remove apache2 which isn't installed.
然后,我重新启动了服务器,并且:
# netstat -plant Active Internet connections (servers and established) [...] tcp6 0 0 :::80 :::* LISTEN 3467/apache2 [...]
WTF? 是apache2还在吗? 所以它看起来:
# /etc/init.d/apache2 stop Stopping web server: apache2.
但:
# update-rc.d remove apache2 update-rc.d: /etc/init.d/remove: file does not exist
那么,我的服务器发生了什么? 我怎样才能完全和真正的从我的服务器中删除apache2?
编辑:通常情况下,问题是椅子和键盘之间;)
我不知道怎么做,但是当我用服务器configuration“玩”的时候,我错误地安装了apache2.2, dpkg -l | grep 'apache' dpkg -l | grep 'apache'向我展示了一些其他的libs仍然安装; 一旦我删除它们,我已经能够完全删除并重新安装apache2(使用--purge选项)。
你可以试试
sudo apt-get remove apache2 --purge
并为删除rc.d文件尝试
sudo update-rc.d apache2 remove -f
干得好:
sudo aptitude purge ~iapache2
虽然这已经足够了:
sudo update-rc.d apache2 disable