Mac OS X取消Apache(httpd)開機啟動(轉載)

來源:互聯網
上載者:User

標籤:user   group   佔用   login   系統   nbsp   replace   .com   code   

啟動服務時提示Apache啟動失敗,80連接埠被佔用.查看進程發現存在幾個httpd. OS X內建Apache,可是預設是沒有啟動的.我也沒有開啟Web共用,怎麼就開機啟動了呢?

不知道是不是因為安裝了別的什麼軟體導致的.一般的開機啟動項可以在System Preferences–Users&Groups–Login Items中添加或刪除.可是在這裡也沒有發現Apache相關的啟動項.於是Google到了下面一個可行的方法,開啟終端,執行下面的命令.

sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist

 

如果哪天你想讓它開機啟動了,則將unload 改為 load:

sudo launchctl load -w /System/Library/LaunchDaemons/org.apache.httpd.plist

launchd是Mac OS下,用於初始化系統內容的關鍵進程。類似Linux下的init, rc.此方法同樣也適用于禁用系統的一些服務,比如印表機,藍芽等.

 

 

原文地址:http://blog.163.com/l1_jun/blog/static/14386388201601832545368/

Mac OS X取消Apache(httpd)開機啟動(轉載)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.