无法在Mac OSx Yosemite 10.10上停止apache [英] Unable to stop apache on Mac OSx Yosemite 10.10

查看:118
本文介绍了无法在Mac OSx Yosemite 10.10上停止apache的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用自制软件在apache2.4上安装了php56.一切都找到了,除了我无法停止apache或完全重启它.

I have installed php56 with apache2.4 using homebrew. Everything is find except I am unable to stop apache or restart it completely.

这应该停止apache:sudo apachectl -k stop

This should stop apache: sudo apachectl -k stop

但是当我grep进程列表时,我看到:ps ax|grep httpd

But when I grep the process list I see: ps ax|grep httpd

7269 ?? Ss 0:00.17 /usr/sbin/httpd -D FOREGROUND 7270 ?? S 0:00.02 /usr/sbin/httpd -D FOREGROUND 7273 ?? S 0:00.00 /usr/sbin/httpd -D FOREGROUND

7269 ?? Ss 0:00.17 /usr/sbin/httpd -D FOREGROUND 7270 ?? S 0:00.02 /usr/sbin/httpd -D FOREGROUND 7273 ?? S 0:00.00 /usr/sbin/httpd -D FOREGROUND

即使杀死也不能阻止它:sudo killall httpd 它会杀死httpd,但是会在一段时间后重新启动:ps ax|grep httpd

Even killing does not stops it: sudo killall httpd which kills httpd but after a while it restarts: ps ax|grep httpd

7684 ?? Rs 0:00.13 /usr/sbin/httpd -D FOREGROUND 7686 s003 S+ 0:00.00 grep httpd

7684 ?? Rs 0:00.13 /usr/sbin/httpd -D FOREGROUND 7686 s003 S+ 0:00.00 grep httpd

过一会儿:ps ax|grep httpd

7684 ?? Ss 0:00.15 /usr/sbin/httpd -D FOREGROUND 7687 ?? S 0:00.00 /usr/sbin/httpd -D FOREGROUND 7690 s003 S+ 0:00.00 grep httpd

7684 ?? Ss 0:00.15 /usr/sbin/httpd -D FOREGROUND 7687 ?? S 0:00.00 /usr/sbin/httpd -D FOREGROUND 7690 s003 S+ 0:00.00 grep httpd

在理想情况下:

开始:brew services start apache2

停止:brew services stop apache2

问题是为什么httpd服务会自动启动,并且此bug是否有修复程序?

The question is why httpd service is autostarted and is there is a fix for this bug ?

推荐答案

我怀疑是否已将LaunchDaemon或LaunchAgent设置为KeepAlive.

I suspect that there is either a LaunchDaemon or LaunchAgent that has been set to KeepAlive.

此外,加载apache时是否使用过sudo brew services?如果是这样,则常规brew services仅与用户代理而非系统进行交互.

Also, did you use sudo brew services when you loaded apache? If so, regular brew services interact with just the user agents, not the system.

这篇关于无法在Mac OSx Yosemite 10.10上停止apache的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆