安装nginx
brew install nginx
创建启动文件夹
mkdir -p ~/Library/LaunchAgents
将安装好的nginx的目录下plist文件复制到启动文件夹
cp /usr/local/opt/nginx/nginx版本/homebrew.mxcl.nginx.plist ~/Library/LaunchAgents/
加载启动文件
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist
查看启动情况 brew services list
Name Status User File
gearman started gaeaming ~/Library/LaunchAgents/homebrew.mxcl.gearman.plist
mysql@5.7 started gaeaming ~/Library/LaunchAgents/homebrew.mxcl.mysql@5.7.plist
nginx started gaeaming ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist
php none
php@7.4 started /usr/local/opt/php@7.4/homebrew.mxcl.php@7.4.plist
redis none
文章评论