卸载Ubuntu10.04默认安装的apache2
2013-04-27 00:35
302 查看
搭建postgreSQL+Nginx+php的环境后,重启Nginx的时候发现80端口被占用。通过查看端口占用情况,发现apache2占用了80端口,于是kill 掉apache2进程,但奇怪的是,杀掉一个apache2 进程后,会再出现一个apache2进程,进程号递增。
root@ubuntu:/home/onmyway/php-5.4.12# netstat -anpt | grep 80
tcp 0 0 127.0.0.1:50505 0.0.0.0:* LISTEN 1800/prosvc
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 12752/apache2
root@ubuntu:/home/onmyway/php-5.4.12# kill -9 12752
root@ubuntu:/home/onmyway/php-5.4.12# netstat -anpt | grep 80
tcp 0 0 127.0.0.1:50505 0.0.0.0:* LISTEN 1800/prosvc
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 12753/apache2
我记得并没有安装过apache,原来Ubuntu10.04默认安装了apache。于是apt-get remove apache,但是提示没有安装apache。如下:
root@ubuntu:/home/onmyway/php-5.4.12# 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 278 not upgraded.
于是继续百度...抱着尝试的念头,先执行下面这一步:
# apt-get remove apache2.2-common
可以执行。但是发现系统中仍然有apache相关文件,并且进程还在。于是又去执行 apapt-get remove apache2
这次提示信息不一样了!!!
root@ubuntu:/home/onmyway/php-5.4.12# apt-get remove apache2
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package apache2 is not installed, so not removed
The following packages were automatically installed and are no longer required:
apache2-utils libaprutil1-dbd-sqlite3 apache2.2-bin libaprutil1-ldap
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 276 not upgraded.
还等什么,马上执行这条命令!
root@ubuntu:/home/onmyway/php-5.4.12# apt-get autoremove
执行完这条命令,再查看端口占用情况,发现80端口仍然被apache2进程占用,并且相关文件仍然还在。再执行一次apt-get autoremove,再查看,还是被占用。
于是使用了一直想用的办法,reboot
reboot后查看80端口,占用进程是Nginx!!!
所以,到头来,我也不知道怎么就可以了...
root@ubuntu:/home/onmyway/php-5.4.12# netstat -anpt | grep 80
tcp 0 0 127.0.0.1:50505 0.0.0.0:* LISTEN 1800/prosvc
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 12752/apache2
root@ubuntu:/home/onmyway/php-5.4.12# kill -9 12752
root@ubuntu:/home/onmyway/php-5.4.12# netstat -anpt | grep 80
tcp 0 0 127.0.0.1:50505 0.0.0.0:* LISTEN 1800/prosvc
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 12753/apache2
我记得并没有安装过apache,原来Ubuntu10.04默认安装了apache。于是apt-get remove apache,但是提示没有安装apache。如下:
root@ubuntu:/home/onmyway/php-5.4.12# 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 278 not upgraded.
于是继续百度...抱着尝试的念头,先执行下面这一步:
# apt-get remove apache2.2-common
可以执行。但是发现系统中仍然有apache相关文件,并且进程还在。于是又去执行 apapt-get remove apache2
这次提示信息不一样了!!!
root@ubuntu:/home/onmyway/php-5.4.12# apt-get remove apache2
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package apache2 is not installed, so not removed
The following packages were automatically installed and are no longer required:
apache2-utils libaprutil1-dbd-sqlite3 apache2.2-bin libaprutil1-ldap
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 276 not upgraded.
还等什么,马上执行这条命令!
root@ubuntu:/home/onmyway/php-5.4.12# apt-get autoremove
执行完这条命令,再查看端口占用情况,发现80端口仍然被apache2进程占用,并且相关文件仍然还在。再执行一次apt-get autoremove,再查看,还是被占用。
于是使用了一直想用的办法,reboot
reboot后查看80端口,占用进程是Nginx!!!
所以,到头来,我也不知道怎么就可以了...
相关文章推荐
- ubuntu server 10.04 apache2:安装webalizer、awstats
- ubuntu中apt-get的默认安装路径。安装、卸载以及查看的方法总结
- Ubuntu10.04server安装配置记1,2,3(安装分区,SSH,SUN-JAVA6-JDK安装,TOMCAT6 ,APACHE2安装)
- Ubuntu中安装和卸载apache2
- ubuntu中安装和卸载apache2
- ubuntu中apache2的安装与卸载
- ubuntu 10.04 apt 安装apache2 php
- ubuntu中安装和卸载apache2、php、mysql
- ubuntu 中安装和卸载apache2
- ubuntu下apache2 安装 配置 卸载 CGI设置 SSL设置
- 将Ubuntu 10.04默认安装的php5.3.2降级到php5.2.x
- ubuntu下apache2 安装 配置 卸载 CGI设置 SSL设置
- ubuntu下apache2 安装 配置 卸载 CGI设置 SSL设置
- ubuntu中安装和卸载apache2
- ubuntu下apache2 安装 配置 卸载 CGI设置 SSL设置
- ubuntu中apt-get的默认安装路径。安装、卸载以及查看的方法总结
- ubuntu中apt-get的默认安装路径。安装、卸载以及查看的方法总结
- ubuntu下apache2 安装 配置 卸载 CGI设置 SSL设置
- ubuntu下apache2 安装 配置 卸载 CGI设置 SSL设置
- Ubuntu 10.04 安装 Redmine 2.0 与 Apache2 集成配置