새로 설치 한 10.9이고 기본 Apache 서버는 org.apache.httpd: Already loaded각 시작 후입니다. 자동 시작을 비활성화하는 방법이 있습니까?
답변
OS X은 launchctl부팅시 시작되는 데몬을 제어 합니다 .
Apache를 중지하고 비활성화하려면
- 터미널 열기
-
다음 명령을 입력하십시오 (
sudo요청할 때 로그인 암호를 입력하십시오 ).sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
launchctl의 -w옵션 에 대한 몇 마디
이 -w옵션은 Apache 중지 / 비활성화를위한 은색 총알입니다. launchctl다음 설명에 따라 서비스를 언로드하지 못하게하는 구성 설정에 관계없이 작업을 수행하도록 지시 합니다 man launchctl.
-w Overrides the Disabled key and sets it to false or true for the load and
unload subcommands respectively. In previous versions, this option would
modify the configuration file. Now the state of the Disabled key is stored
elsewhere on- disk in a location that may not be directly manipulated by any
process other than launchd.
(OS X Mavericks (10.9)에서 “디스크상의 다른 위치”는 /private/var/db/launchd.db/com.apple.launchd/overrides.plist입니다.)
-w당신이 아파치를 시작하면 옵션은 필수 불가결 apachectl start: 설명 된 바와 같이 이 수퍼 유저의 대답 . apachectlApache를 시작할뿐만 아니라 다음 /private/var/db/launchd.db/com.apple.launchd/overrides.plist과 같이 수정 합니다.
<key>org.apache.httpd</key>
<dict>
<key>Disabled</key>
<false/>
</dict>
이 특별한 경우에는 다음을 사용할 수도 있습니다 apachectl.
sudo apachectl stop
Apache를 중지하고로 설정 Disabled합니다 true.