linux与mac还是有很大区别,导致一些服务重启不太一样
apache
sudo apachectl -k restart/start/stop
nginx
ps -ef | grep nginx 查到直接杀死吧
nginx -s reload|reopen|stop|quit
测试配置是否有语法错误
nginx -t
php
brew services restart php56
brew services start josegonzalez/php/php56
据说要废弃,没废弃前先用着吧
mysql
mysql.server start | stop | restart
用户目录下 /Users/miller/Library/LaunchAgents
cd ~/Library/LaunchAgents 这里是默认开机启动的service也可以从别处拷贝过来,或者删掉: brew install的soft ,会在对应目录有相应 plist,copy 到这即可
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist 启动服务
launchctl unload -w .... 关闭服务
mac电脑 耳机线控听网易云音乐歌曲时候, 按耳机, 就会打开关闭itunes ,特繁琐
关闭
launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist
打开
launchctl load -w /System/Library/LaunchAgents/com.apple.rcd.plist重启声音驱动sudo kextunload /System/Library/Extensions/AppleHDA.kext
sudo kextload /System/Library/Extensions/AppleHDA.kext
注意:本文归作者所有,未经作者允许,不得转载