famensaodiseng

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

分类:

技术点:

相关文章:

  • 2021-12-15
  • 2021-08-15
  • 2021-12-06
  • 2022-02-04
  • 2021-12-16
  • 2022-02-07
  • 2021-10-20
猜你喜欢
  • 2021-08-08
  • 2021-12-06
  • 2021-12-08
  • 2021-11-15
  • 2021-12-14
  • 2021-09-04
相关资源
相似解决方案