Homebrew是一款超级好用的包管理工具,可以实现快速搭建各种开发环境。
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install mysql
配置文件:`/usr/local/etc/my.cnf`
启动:`brew services start mysql`
停止:`brew services stop mysql`
重启:`brew services restart mysql`
brew install nginx
配置文件:`/usr/local/etc/nginx/`
启动:`brew services start nginx `
停止:`brew services stop nginx `
重启:`brew services restart nginx`
brew install php-[version]
配置文件:`/usr/local/etc/php/`
启动PHP-FPM:`sudo php-fpm -D`
停止PHP-FPM:`sudo kill -INT cat /usr/local/var/run/php-fpm.pid`
重启PHP-FPM:`sudo kill -USR2 cat /usr/local/var/run/php-fpm.pid`