缘由:同时安装了nginx和apache,使用了apache,但重启后nginx占用了80 port,须要取消nginx的自启动nginx
取消niginx的自启动apache
尝试方法1(来源网络): 安装/使用 sysv-rc-conf网络
sysv-rc-conf 是界面操做,reboot查看无效进程
尝试方法2: 修改/etc/init.d/,/etc/rc0.d/,/etc/rc1.d/,/etc/rc2.d/,/etc/rc3.d/,/etc/rc4.d/,rem
/etc/rc5.d/,/etc/rc6.d/,/etc/rc.local/ 下nginx相关的文件。get
尝试方法3: 使用update-rc.d命令:it
update-rc.d -f nginx removeio
3个方法都无效,reboot后nginx还在,缘由未知,实际环境是为eecloud,不知道是否和有关系date
决定删除nginxselect
1. 使用: apt-get remove nginx, reboot后,nginx进程还在
2. 使用命令: 1. apt-get --purge remove nginx
2. apt-get autoremove
3. dpkg --get-selections|grep nginx,查看有nginx-common,nginx-core
4. 删除这2个包: apt-get remove nginx-common apt-get remove nginx-core
5. 找到nginx相关的文件: find / -name nginx*
6. 删除这些相关的文件和目录
重启后,终于清静啦