赞
踩
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew search nginx
brew install nginx
#默认是最新版本
#指定版本安装方式为:nginx@版本号
eg:brew install nginx@1.12.2
brew uninstall nginx
brew uninstall nginx@版本号
brew info nginx
#网页目录: /usr/local/var/www
#默认配置文件:/usr/local/etc/nginx/nginx.conf
#会被加载的配置文件: /usr/local/etc/nginx/servers/
brew list
brew services start nginx
brew services stop nginx
brew services restart nginx
nginx #启动nginx
nginx -s reload #重新加载配置文件 ,热加载配置文件
nginx -s quit #:推荐 待nginx进程处理任务完毕进行停止
nginx -s stop #:先查出nginx进程id再使用kill命令强制杀掉进程。
ps aux|grep nginx
ps -ef|grep nginx
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。