mac homebrewインストールnginx、php、mysql

983 ワード

1.homebrewのインストール
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

2.nginxのインストール
brew install nginx
nginx -s reload|reopen|stop|quit #      |  |  |   nginx

nginx-t#構成に構文エラーがあるかどうかをテスト
ヒントpidがなくなったら、この言葉で
    nginx -c "/usr/local/etc/nginx/nginx.conf"
nginx 
起動:brew services start nginx停止:brew services stop nginx再起動:brew services restart nginx
3.PHP 7を取り付ける
brew install php70 --without-apache --with-fpm

php 
起動:brew services start php停止:brew services stop php再起動:brew services restart php
4.mysqlのインストール
brew install mysql

cp /usr/local/opt/mysql/support-files/my-default.cnf /etc/my.cnf
brew services start mysql(起動)brew services stop mysql(停止)
mysql   
起動:brew services start mysql停止:brew services stop mysql再起動:brew services restart mysql