Brew Installation Nginx
brew install nginx
Installing PHP56
brew tap homebrew/dupesbrew tap josegonzalez/homebrew-phpbrew install php56 --with-imap --with-tidy --with-debug --with-mysql --with-fpmsudo vim ~/.zshrc#在这个文件最后添加下列语句:PATH="$(brew --prefix php56)/bin:$PATH"PATH="$(brew --prefix php56)/sbin:$PATH"PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"#保存文件后,source下这个文件,使刚刚添加的环境变量生效source ~/.zshrc
Installing php71
brew unlink php56 #清除php56的软链,此操作对软件本身毫无影响brew install php71切换环境:brew unlink php56brew link php71sudo vim ~/.zshrc#在这个文件最后添加下列语句:export PATH="$(brew --prefix php71)/bin:$PATH"export PATH="$(brew --prefix php71)/sbin:$PATH"export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"#保存文件后,source下这个文件,使刚刚添加的环境变量生效source ~/.zshrc
Brew Install MySQL
mysql
Mac View Network Monitoring
LISTEN
Brew Installation Redis
brew install redis
Brew Installation Redis Extension
brew install php71-redis
Brew Installation MongoDB
brew install mongodb
Brew Installation MongoDB Extension
brew install php71-mongodb
Brew Services Startup Program
brew services list #可以查看当前已管理的服务,并且可看到启动状态,然后可以通过 start,stop等启动和关闭对应软件sudo brew services start nginx其他方法启动nginx sudo nginx sudo nginx -s stop sudo nginx -s reload brew services start php71brew services start mysqlbrew services start redisbrew services start mongodb
Mac Build MNMP Environment