Nginx Mac笔记

安装

brew install nginx

可能出现问题:

Error: /usr/local is not writable. You should change the
ownership and permissions of /usr/local back to your
user account:
  sudo chown -R $(whoami) /usr/local
fatal: could not create leading directories of '/usr/local/Library/Taps/homebrew/homebrew-core': Permission denied

解决办法:

先卸载brew:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

再重装:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

简单命令

启动

nginx

停止

nginx -s stop

重启

nginx -s reload
posted @ 2019-01-12 19:14  海角在眼前  阅读(330)  评论(0编辑  收藏  举报