mac 关闭apache httpd 开机启动
作者:互联网
mac默认安装了apache,随机启动会占用80端口,导致nginx启动不了,需要关闭apache(httpd)服务,取消随机启动。
执行命令
查询80端口被谁占用了
sudo lsof -i:80
关闭随机启动
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
开启随机启动
sudo launchctl load -w /System/Library/LaunchDaemons/org.apache.httpd.plist
启动apache
sudo apachectl start
重启apache
sudo apachectl restart
停止apache
sudo apachectl stop
标签:httpd,启动,sudo,apachectl,mac,apache,80 来源: https://www.cnblogs.com/famensaodiseng/p/11124274.html