强烈建议不要直接在 Mac 上安装这些东西,而是使用 vagrant。Vagrant Boxes 下载页面
安装
brew install nginx php mysql # 安装的版本为 nginx-1.17.1、php-7.3.6、mysql-8.0.16 mysql_secure_installation # 初始化 mysql # “brew link php”时会报“/usr/local/sbin is not writable.”,网上办法是改权限,建议不要听、直接无视。 # Mac 自带有 php,需要修改环境变量优先使用 brew 安装的: export PATH=/usr/local/Cellar/php/7.3.6_1/bin:$PATH
手动启动
nginx & php-fpm & mysql.server start
手动停止
nginx -s quit & pkill php-fpm & mysql.server stop
开机自动启动
brew services start nginx brew services start php # 不是 php-fpm brew services start mysql
配置文件
http://localhost:8080/ Docroot: /usr/local/var/www/ /usr/local/etc/nginx/nginx.conf /usr/local/etc/php/7.3/php.ini /usr/local/etc/php/7.3/php-fpm.conf /usr/local/etc/php/7.3/php-fpm.d/www.conf # 这里边有 php 的运行身份
其它
xcode-select --install # 可能需要安装这个
安装日志
$mbp user:Library >>> brew install nginx php mysql ==> Installing dependencies for nginx: openssl and pcre ==> Installing nginx dependency: openssl ==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2s.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/c4/c4a762d719c2be74ac686f1aafabb32f3c5d5ff3a98935c4925a1ddb9c750ee1?__gda__=exp=1563170240~hmac=e75782 ######################################################################## 100.0% ==> Pouring openssl-1.0.2s.mojave.bottle.tar.gz ==> Caveats A CA file has been bootstrapped using certificates from the SystemRoots keychain. To add additional certificates (e.g. the certificates added in the System keychain), place .pem files in /usr/local/etc/openssl/certs and run /usr/local/opt/openssl/bin/c_rehash openssl is keg-only, which means it was not symlinked into /usr/local, because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries. If you need to have openssl first in your PATH run: echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile For compilers to find openssl you may need to set: export LDFLAGS="-L/usr/local/opt/openssl/lib" export CPPFLAGS="-I/usr/local/opt/openssl/include" For pkg-config to find openssl you may need to set: export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig" ==> Summary 🍺 /usr/local/Cellar/openssl/1.0.2s: 1,795 files, 12.0MB ==> Installing nginx dependency: pcre ==> Downloading https://homebrew.bintray.com/bottles/pcre-8.43.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/08/08e7414a7641d1e184c936537ff67f72f52649374d2308b896d4146ccc2c08fe?__gda__=exp=1563170250~hmac=118f93 ######################################################################## 100.0% ==> Pouring pcre-8.43.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/pcre/8.43: 204 files, 5.5MB ==> Installing nginx ==> Downloading https://homebrew.bintray.com/bottles/nginx-1.17.1.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/a1/a1114fd86181db06ebb31c5f3fb5e666fafb3d10e0e65ed0f327f1d15be1336e?__gda__=exp=1563170256~hmac=584361 ######################################################################## 100.0% ==> Pouring nginx-1.17.1.mojave.bottle.tar.gz ==> Caveats Docroot is: /usr/local/var/www The default port has been set in /usr/local/etc/nginx/nginx.conf to 8080 so that nginx can run without sudo. nginx will load all files in /usr/local/etc/nginx/servers/. To have launchd start nginx now and restart at login: brew services start nginx Or, if you don't want/need a background service you can just run: nginx ==> Summary 🍺 /usr/local/Cellar/nginx/1.17.1: 25 files, 2MB ==> `brew cleanup` has not been run in 30 days, running now... Removing: /usr/local/Cellar/openssl/1.0.2p... (1,785 files, 12.3MB) Removing: /usr/local/Cellar/pcre/8.42... (204 files, 5.3MB) Removing: /Users/user/Library/Logs/Homebrew/pcre2... (64B) Removing: /Users/user/Library/Logs/Homebrew/fish... (64B) Pruned 0 symbolic links and 3 directories from /usr/local ==> Installing dependencies for php: apr, apr-util, argon2, aspell, autoconf, brotli, c-ares, libidn, libmetalink, libssh2, jansson, jemalloc, libev, libevent, nghttp2, openldap, rtmpdump, curl-openssl, libtool, unixodbc, freetds, libpng, freetype, gettext, libffi, gdbm, readline, sqlite, xz, python, glib, gmp, icu4c, jpeg, libpq, libsodium, libzip, tidy-html5, libtiff and webp ==> Installing php dependency: apr ==> Downloading https://homebrew.bintray.com/bottles/apr-1.7.0.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/3a/3a245185ed7280d1a19e7c639786b4c21dd0088878be8ac87ca58510eb5c9cc1?__gda__=exp=1563170266~hmac=4d7e5d ######################################################################## 100.0% ==> Pouring apr-1.7.0.mojave.bottle.tar.gz ==> Caveats apr is keg-only, which means it was not symlinked into /usr/local, because Apple's CLT package contains apr. If you need to have apr first in your PATH run: echo 'export PATH="/usr/local/opt/apr/bin:$PATH"' >> ~/.bash_profile ==> Summary 🍺 /usr/local/Cellar/apr/1.7.0: 59 files, 1.4MB ==> Installing php dependency: apr-util ==> Downloading https://homebrew.bintray.com/bottles/apr-util-1.6.1_1.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/e4/e4927892e16a3c9cf0d037c1777a6e5728fef2f5abfbc0af3d0d444e9d6a1d2b?__gda__=exp=1563170270~hmac=250037 ######################################################################## 100.0% ==> Pouring apr-util-1.6.1_1.mojave.bottle.tar.gz ==> Caveats apr-util is keg-only, which means it was not symlinked into /usr/local, because Apple's CLT package contains apr. If you need to have apr-util first in your PATH run: echo 'export PATH="/usr/local/opt/apr-util/bin:$PATH"' >> ~/.bash_profile ==> Summary 🍺 /usr/local/Cellar/apr-util/1.6.1_1: 54 files, 777.5KB ==> Installing php dependency: argon2 ==> Downloading https://homebrew.bintray.com/bottles/argon2-20171227.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/0b/0b01daa08f731fa6d107aa26fbc52a5ef8cd8c9bc78e700409aa47d070b92cf9?__gda__=exp=1563170277~hmac=6acf23 ######################################################################## 100.0% ==> Pouring argon2-20171227.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/argon2/20171227: 11 files, 590.2KB ==> Installing php dependency: aspell ==> Downloading https://homebrew.bintray.com/bottles/aspell-0.60.6.1_1.mojave.bottle.1.tar.gz ==> Downloading from https://akamai.bintray.com/ff/ff90482e98d4185c02676885cb9295f2e2c3fc0a59173981fdf08e2f8627fbf8?__gda__=exp=1563170280~hmac=8249e9 ###### 9.5%^C $mbp user:Library >>> brew install nginx php mysql Warning: nginx 1.17.1 is already installed and up-to-date To reinstall 1.17.1, run `brew reinstall nginx` ==> Installing dependencies for php: aspell, autoconf, brotli, c-ares, libidn, libmetalink, libssh2, jansson, jemalloc, libev, libevent, nghttp2, openldap, rtmpdump, curl-openssl, libtool, unixodbc, freetds, libpng, freetype, gettext, libffi, gdbm, readline, sqlite, xz, python, glib, gmp, icu4c, jpeg, libpq, libsodium, libzip, tidy-html5, libtiff and webp ==> Installing php dependency: aspell ==> Downloading https://homebrew.bintray.com/bottles/aspell-0.60.6.1_1.mojave.bottle.1.tar.gz ==> Downloading from https://akamai.bintray.com/ff/ff90482e98d4185c02676885cb9295f2e2c3fc0a59173981fdf08e2f8627fbf8?__gda__=exp=1563170606~hmac=7fb915b746 ######################################################################## 100.0% ==> Pouring aspell-0.60.6.1_1.mojave.bottle.1.tar.gz 🍺 /usr/local/Cellar/aspell/0.60.6.1_1: 758 files, 314.8MB ==> Installing php dependency: autoconf ==> Downloading https://homebrew.bintray.com/bottles/autoconf-2.69.mojave.bottle.4.tar.gz ==> Downloading from https://akamai.bintray.com/97/9724736d34773b6e41e2434ffa28fe79feccccf7b7786e54671441ca75115cdb?__gda__=exp=1563170711~hmac=1d37355f5b ######################################################################## 100.0% ==> Pouring autoconf-2.69.mojave.bottle.4.tar.gz ==> Caveats Emacs Lisp files have been installed to: /usr/local/share/emacs/site-lisp/autoconf ==> Summary 🍺 /usr/local/Cellar/autoconf/2.69: 71 files, 3.0MB ==> Installing php dependency: brotli ==> Downloading https://homebrew.bintray.com/bottles/brotli-1.0.7.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/d2/d2d4f821f8d9c52de15a4d3b5ddeab760ad9ae71105f1c859b7811adff9af9da?__gda__=exp=1563170714~hmac=fefbb57d65 ######################################################################## 100.0% ==> Pouring brotli-1.0.7.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/brotli/1.0.7: 25 files, 2.2MB ==> Installing php dependency: c-ares ==> Downloading https://homebrew.bintray.com/bottles/c-ares-1.15.0.mojave.bottle.tar.gz ######################################################################## 100.0% ==> Pouring c-ares-1.15.0.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/c-ares/1.15.0: 72 files, 482.6KB ==> Installing php dependency: libidn ==> Downloading https://homebrew.bintray.com/bottles/libidn-1.35.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/d3/d3741facdecc039b53d64392b6f8f4377a01d38bd0ce388db1d4d3606c7d5da9?__gda__=exp=1563170748~hmac=73bd74b09c ######################################################################## 100.0% ==> Pouring libidn-1.35.mojave.bottle.tar.gz ==> Caveats Emacs Lisp files have been installed to: /usr/local/share/emacs/site-lisp/libidn ==> Summary 🍺 /usr/local/Cellar/libidn/1.35: 72 files, 1.4MB ==> Installing php dependency: libmetalink ==> Downloading https://homebrew.bintray.com/bottles/libmetalink-0.1.3.mojave.bottle.tar.gz ######################################################################## 100.0% ==> Pouring libmetalink-0.1.3.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/libmetalink/0.1.3: 31 files, 178.9KB ==> Installing php dependency: libssh2 ==> Downloading https://homebrew.bintray.com/bottles/libssh2-1.9.0.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/02/0226917e00c2f5c003c441c11d06852d582cd6ddcb42042bf1f82515623528d5?__gda__=exp=1563170777~hmac=0f07eb805e ######################################################################## 100.0% ==> Pouring libssh2-1.9.0.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/libssh2/1.9.0: 184 files, 911.9KB ==> Installing php dependency: jansson ==> Downloading https://homebrew.bintray.com/bottles/jansson-2.12.mojave.bottle.tar.gz ######################################################################## 100.0% ==> Pouring jansson-2.12.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/jansson/2.12: 11 files, 157.5KB ==> Installing php dependency: jemalloc ==> Downloading https://homebrew.bintray.com/bottles/jemalloc-5.2.0.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/65/65f360353caa81de08b1b1882de13e8423d0f72d92a67bb3a8cfd7ce71f39c71?__gda__=exp=1563170787~hmac=80bfd923c7 ######################################################################## 100.0% ==> Pouring jemalloc-5.2.0.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/jemalloc/5.2.0: 16 files, 1.9MB ==> Installing php dependency: libev ==> Downloading https://homebrew.bintray.com/bottles/libev-4.25.mojave.bottle.tar.gz ######################################################################## 100.0% ==> Pouring libev-4.25.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/libev/4.25: 12 files, 433.7KB ==> Installing php dependency: libevent ==> Downloading https://homebrew.bintray.com/bottles/libevent-2.1.10.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/3f/3f43999f92de5174fa646e00cb0998801af4865b0274ebf6c4de5d6df372c4be?__gda__=exp=1563170809~hmac=d1a9d9ba40 ######################################################################## 100.0% ==> Pouring libevent-2.1.10.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/libevent/2.1.10: 857 files, 2.2MB ==> Installing php dependency: nghttp2 ==> Downloading https://homebrew.bintray.com/bottles/nghttp2-1.39.1.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/92/927d1c581966fc68c3c69c4a165b3f406d83fa1048dd870d6eeb55d16b92d7d9?__gda__=exp=1563170814~hmac=d1b98244d6 ######################################################################## 100.0% ==> Pouring nghttp2-1.39.1.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/nghttp2/1.39.1: 26 files, 2.6MB ==> Installing php dependency: openldap ==> Downloading https://homebrew.bintray.com/bottles/openldap-2.4.47.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/07/07e1f0e3ec1a02340a82259e1ace713cfb362126404575032713174935f4140e?__gda__=exp=1563170817~hmac=d7145766c4 ######################################################################## 100.0% ==> Pouring openldap-2.4.47.mojave.bottle.tar.gz ==> Caveats openldap is keg-only, which means it was not symlinked into /usr/local, because macOS already provides this software and installing another version in parallel can cause all kinds of trouble. If you need to have openldap first in your PATH run: echo 'export PATH="/usr/local/opt/openldap/bin:$PATH"' >> ~/.bash_profile echo 'export PATH="/usr/local/opt/openldap/sbin:$PATH"' >> ~/.bash_profile For compilers to find openldap you may need to set: export LDFLAGS="-L/usr/local/opt/openldap/lib" export CPPFLAGS="-I/usr/local/opt/openldap/include" ==> Summary 🍺 /usr/local/Cellar/openldap/2.4.47: 327 files, 6.5MB ==> Installing php dependency: rtmpdump ==> Downloading https://homebrew.bintray.com/bottles/rtmpdump-2.4+20151223.mojave.bottle.tar.gz ######################################################################## 100.0% ==> Pouring rtmpdump-2.4+20151223.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/rtmpdump/2.4+20151223: 20 files, 418.5KB ==> Installing php dependency: curl-openssl ==> Downloading https://homebrew.bintray.com/bottles/curl-openssl-7.65.1.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/5f/5f265df38e121f3514c2923e016b843f2062b738e3b5659d40030f4fb6b22294?__gda__=exp=1563170834~hmac=6d0ade5b7c ######################################################################## 100.0% ==> Pouring curl-openssl-7.65.1.mojave.bottle.tar.gz ==> Caveats curl-openssl is keg-only, which means it was not symlinked into /usr/local, because macOS already provides this software and installing another version in parallel can cause all kinds of trouble. If you need to have curl-openssl first in your PATH run: echo 'export PATH="/usr/local/opt/curl-openssl/bin:$PATH"' >> ~/.bash_profile For compilers to find curl-openssl you may need to set: export LDFLAGS="-L/usr/local/opt/curl-openssl/lib" export CPPFLAGS="-I/usr/local/opt/curl-openssl/include" For pkg-config to find curl-openssl you may need to set: export PKG_CONFIG_PATH="/usr/local/opt/curl-openssl/lib/pkgconfig" ==> Summary 🍺 /usr/local/Cellar/curl-openssl/7.65.1: 451 files, 3.4MB ==> Installing php dependency: libtool ==> Downloading https://homebrew.bintray.com/bottles/libtool-2.4.6_1.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/c9/c92ab35c3706c255a36b733aa7a475159da9cf375c275d230fd6a7802a94e4dc?__gda__=exp=1563170840~hmac=9d344e2f9a ######################################################################## 100.0% ==> Pouring libtool-2.4.6_1.mojave.bottle.tar.gz ==> Caveats In order to prevent conflicts with Apple's own libtool we have prepended a "g" so, you have instead: glibtool and glibtoolize. ==> Summary 🍺 /usr/local/Cellar/libtool/2.4.6_1: 71 files, 3.7MB ==> Installing php dependency: unixodbc ==> Downloading https://homebrew.bintray.com/bottles/unixodbc-2.3.7.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/c4/c4f375c528496bae444824f4d01922e31a9a8b0c6822cd97da89f5843e740025?__gda__=exp=1563170864~hmac=198a50c06c ######################################################################## 100.0% ==> Pouring unixodbc-2.3.7.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/unixodbc/2.3.7: 46 files, 1.8MB ==> Installing php dependency: freetds ==> Downloading https://homebrew.bintray.com/bottles/freetds-1.1.6.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/50/501fc03b7af71fdc7dba603c95d7db725c55c09e384947b16c2ed466532055e2?__gda__=exp=1563170868~hmac=7d248f6edd ######################################################################## 100.0% ==> Pouring freetds-1.1.6.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/freetds/1.1.6: 2,141 files, 13.1MB ==> Installing php dependency: libpng ==> Downloading https://homebrew.bintray.com/bottles/libpng-1.6.37.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/53/53bbd14cc27c86c16605e256e7646a1b5656c253abca084958c5d80a2961cb01?__gda__=exp=1563170875~hmac=f5d7dd2e26 ######################################################################## 100.0% ==> Pouring libpng-1.6.37.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/libpng/1.6.37: 27 files, 1.2MB ==> Installing php dependency: freetype ==> Downloading https://homebrew.bintray.com/bottles/freetype-2.10.0.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/d2/d231ab6634051c4b655bbfc07cd5b306ad5489d891ee2b105ed892347f2714af?__gda__=exp=1563170878~hmac=0d9160e0f7 ######################################################################## 100.0% ==> Pouring freetype-2.10.0.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/freetype/2.10.0: 61 files, 2.3MB ==> Installing php dependency: gettext ==> Downloading https://homebrew.bintray.com/bottles/gettext-0.20.1.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/fa/fa2096f80238b8f4d9f3724d526626ab4db5c0586f3746ee13fc66e5a625aa1a?__gda__=exp=1563170881~hmac=8041469af1 ######################################################################## 100.0% ==> Pouring gettext-0.20.1.mojave.bottle.tar.gz ==> Caveats gettext is keg-only, which means it was not symlinked into /usr/local, because macOS provides the BSD gettext library & some software gets confused if both are in the library path. If you need to have gettext first in your PATH run: echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.bash_profile For compilers to find gettext you may need to set: export LDFLAGS="-L/usr/local/opt/gettext/lib" export CPPFLAGS="-I/usr/local/opt/gettext/include" ==> Summary 🍺 /usr/local/Cellar/gettext/0.20.1: 1,899 files, 18.5MB ==> Installing php dependency: libffi ==> Downloading https://homebrew.bintray.com/bottles/libffi-3.2.1.mojave.bottle.tar.gz ######################################################################## 100.0% ==> Pouring libffi-3.2.1.mojave.bottle.tar.gz ==> Caveats libffi is keg-only, which means it was not symlinked into /usr/local, because some formulae require a newer version of libffi. For compilers to find libffi you may need to set: export LDFLAGS="-L/usr/local/opt/libffi/lib" For pkg-config to find libffi you may need to set: export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig" ==> Summary 🍺 /usr/local/Cellar/libffi/3.2.1: 16 files, 296.8KB ==> Installing php dependency: gdbm ==> Downloading https://homebrew.bintray.com/bottles/gdbm-1.18.1.mojave.bottle.1.tar.gz ######################################################################## 100.0% ==> Pouring gdbm-1.18.1.mojave.bottle.1.tar.gz 🍺 /usr/local/Cellar/gdbm/1.18.1: 20 files, 586.8KB ==> Installing php dependency: readline ==> Downloading https://homebrew.bintray.com/bottles/readline-8.0.0_1.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/fa/faab004773e6449dd97971311cb62a9bbaa44f1483b82640e818f0c355c8266d?__gda__=exp=1563170919~hmac=e022835a27 ######################################################################## 100.0% ==> Pouring readline-8.0.0_1.mojave.bottle.tar.gz ==> Caveats readline is keg-only, which means it was not symlinked into /usr/local, because macOS provides the BSD libedit library, which shadows libreadline. In order to prevent conflicts when programs look for libreadline we are defaulting this GNU Readline installation to keg-only. For compilers to find readline you may need to set: export LDFLAGS="-L/usr/local/opt/readline/lib" export CPPFLAGS="-I/usr/local/opt/readline/include" For pkg-config to find readline you may need to set: export PKG_CONFIG_PATH="/usr/local/opt/readline/lib/pkgconfig" ==> Summary 🍺 /usr/local/Cellar/readline/8.0.0_1: 48 files, 1.5MB ==> Installing php dependency: sqlite ==> Downloading https://homebrew.bintray.com/bottles/sqlite-3.28.0.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/e3/e360850758d2104b4ae9eab8ae57903a37b62c550c779ddf32100720f832508d?__gda__=exp=1563170926~hmac=dcd169e382 ######################################################################## 100.0% ==> Pouring sqlite-3.28.0.mojave.bottle.tar.gz ==> Caveats sqlite is keg-only, which means it was not symlinked into /usr/local, because macOS provides an older sqlite3. If you need to have sqlite first in your PATH run: echo 'export PATH="/usr/local/opt/sqlite/bin:$PATH"' >> ~/.bash_profile For compilers to find sqlite you may need to set: export LDFLAGS="-L/usr/local/opt/sqlite/lib" export CPPFLAGS="-I/usr/local/opt/sqlite/include" For pkg-config to find sqlite you may need to set: export PKG_CONFIG_PATH="/usr/local/opt/sqlite/lib/pkgconfig" ==> Summary 🍺 /usr/local/Cellar/sqlite/3.28.0: 11 files, 3.7MB ==> Installing php dependency: xz ==> Downloading https://homebrew.bintray.com/bottles/xz-5.2.4.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/01/010667293df282c8bceede3bcd36953dd57c56cef608d09a5b50694ab7d4b96b?__gda__=exp=1563170932~hmac=3e3fca142f ######################################################################## 100.0% ==> Pouring xz-5.2.4.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/xz/5.2.4: 92 files, 1MB ==> Installing php dependency: python Error: Xcode alone is not sufficient on Mojave. Install the Command Line Tools: xcode-select --install $mbp user:Library >>> xcod xcode-select xcodebuild $mbp user:Library >>> xcode-select --install xcode-select: note: install requested for command line developer tools $mbp user:Library >>> brew install nginx php mysql Warning: nginx 1.17.1 is already installed and up-to-date To reinstall 1.17.1, run `brew reinstall nginx` ==> Installing dependencies for php: python, glib, gmp, icu4c, jpeg, libpq, libsodium, libzip, tidy-html5, libtiff and webp ==> Installing php dependency: python ==> Downloading https://homebrew.bintray.com/bottles/python-3.7.3.mojave.bottle.1.tar.gz ==> Downloading from https://akamai.bintray.com/cd/cd6b258f036893a4126975f4f5862664d2b46ae5acd9ba8747e2694f8c151e01?__gda__=exp=1563171305~hmac=89da87fd12 ######################################################################## 100.0% ==> Pouring python-3.7.3.mojave.bottle.1.tar.gz ==> /usr/local/Cellar/python/3.7.3/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python/3.7.3/bin -- ==> /usr/local/Cellar/python/3.7.3/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python/3.7.3/bin -- ==> /usr/local/Cellar/python/3.7.3/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python/3.7.3/bin -- ==> Caveats Python has been installed as /usr/local/bin/python3 Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to `python3`, `python3-config`, `pip3` etc., respectively, have been installed into /usr/local/opt/python/libexec/bin If you need Homebrew's Python 2.7 run brew install python@2 You can install Python packages with pip3 install <package> They will install into the site-package directory /usr/local/lib/python3.7/site-packages See: https://docs.brew.sh/Homebrew-and-Python ==> Summary 🍺 /usr/local/Cellar/python/3.7.3: 3,862 files, 59.9MB ==> Installing php dependency: glib ==> Downloading https://homebrew.bintray.com/bottles/glib-2.60.4_1.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/c4/c4090feb90bb9973ca852b6983a3f6db0b7c4242c3e2720168e39b2a5f96aaa6?__gda__=exp=1563171328~hmac=3d9a655a55 ######################################################################## 100.0% ==> Pouring glib-2.60.4_1.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/glib/2.60.4_1: 429 files, 15.2MB ==> Installing php dependency: gmp ==> Downloading https://homebrew.bintray.com/bottles/gmp-6.1.2_2.mojave.bottle.1.tar.gz ==> Downloading from https://akamai.bintray.com/84/84f74594086bccc53bdb141f4d06d7847680374e255ebe016654da1e47db2dfc?__gda__=exp=1563171335~hmac=86c514cc29 ######################################################################## 100.0% ==> Pouring gmp-6.1.2_2.mojave.bottle.1.tar.gz 🍺 /usr/local/Cellar/gmp/6.1.2_2: 18 files, 3.1MB ==> Installing php dependency: icu4c ==> Downloading https://homebrew.bintray.com/bottles/icu4c-64.2.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/e8/e858556120acc0c2d52b8fb572b677856724cc28d24a7e1b2762d458a2977c8e?__gda__=exp=1563171339~hmac=c16098065c ######################################################################## 100.0% ==> Pouring icu4c-64.2.mojave.bottle.tar.gz ==> Caveats icu4c is keg-only, which means it was not symlinked into /usr/local, because macOS provides libicucore.dylib (but nothing else). If you need to have icu4c first in your PATH run: echo 'export PATH="/usr/local/opt/icu4c/bin:$PATH"' >> ~/.bash_profile echo 'export PATH="/usr/local/opt/icu4c/sbin:$PATH"' >> ~/.bash_profile For compilers to find icu4c you may need to set: export LDFLAGS="-L/usr/local/opt/icu4c/lib" export CPPFLAGS="-I/usr/local/opt/icu4c/include" For pkg-config to find icu4c you may need to set: export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig" ==> Summary 🍺 /usr/local/Cellar/icu4c/64.2: 257 files, 69.2MB ==> Installing php dependency: jpeg ==> Downloading https://homebrew.bintray.com/bottles/jpeg-9c.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/1d/1daa0fc0c197d96dd4e1afddb9ad576951a15aafd6b85138b8a60817d1d8173c?__gda__=exp=1563171363~hmac=4ebfa196ce ######################################################################## 100.0% ==> Pouring jpeg-9c.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/jpeg/9c: 21 files, 733.4KB ==> Installing php dependency: libpq ==> Downloading https://homebrew.bintray.com/bottles/libpq-11.3.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/46/464e74593da2d7b8c9375d74346e7d6216c61d0d37359e78d2fc354e3e84e4d0?__gda__=exp=1563171366~hmac=64b0adb742 ######################################################################## 100.0% ==> Pouring libpq-11.3.mojave.bottle.tar.gz ==> Caveats libpq is keg-only, which means it was not symlinked into /usr/local, because conflicts with postgres formula. If you need to have libpq first in your PATH run: echo 'export PATH="/usr/local/opt/libpq/bin:$PATH"' >> ~/.bash_profile For compilers to find libpq you may need to set: export LDFLAGS="-L/usr/local/opt/libpq/lib" export CPPFLAGS="-I/usr/local/opt/libpq/include" For pkg-config to find libpq you may need to set: export PKG_CONFIG_PATH="/usr/local/opt/libpq/lib/pkgconfig" ==> Summary 🍺 /usr/local/Cellar/libpq/11.3: 2,205 files, 22.4MB ==> Installing php dependency: libsodium ==> Downloading https://homebrew.bintray.com/bottles/libsodium-1.0.18.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/f0/f0c5a9db15c8798edfa438b6911c6e354591f22ae3ed53696bf81c0a18afb0be?__gda__=exp=1563171374~hmac=a4bd0b2522 ######################################################################## 100.0% ==> Pouring libsodium-1.0.18.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/libsodium/1.0.18: 73 files, 1009.3KB ==> Installing php dependency: libzip ==> Downloading https://homebrew.bintray.com/bottles/libzip-1.5.2.mojave.bottle.tar.gz ######################################################################## 100.0% ==> Pouring libzip-1.5.2.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/libzip/1.5.2: 134 files, 579.6KB ==> Installing php dependency: tidy-html5 ==> Downloading https://homebrew.bintray.com/bottles/tidy-html5-5.6.0.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/bd/bd3ca7dc82a913c8576716cbcc957260251132f6dd7b8c526c9ef0c4674faf0f?__gda__=exp=1563171411~hmac=d09076041e ######################################################################## 100.0% ==> Pouring tidy-html5-5.6.0.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/tidy-html5/5.6.0: 14 files, 2.6MB ==> Installing php dependency: libtiff ==> Downloading https://homebrew.bintray.com/bottles/libtiff-4.0.10_1.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/6e/6ecdca6159e5e4db0ec0fcbddbc76dbdc65e496139b131a05f2a9ed8187914f8?__gda__=exp=1563171414~hmac=acedbd24da ######################################################################## 100.0% ==> Pouring libtiff-4.0.10_1.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/libtiff/4.0.10_1: 246 files, 3.5MB ==> Installing php dependency: webp ==> Downloading https://homebrew.bintray.com/bottles/webp-1.0.2.mojave.bottle.1.tar.gz ==> Downloading from https://akamai.bintray.com/38/38bdac64dbf41666310ae1589e6102b6bcd688540514f7af4334dd74996c4277?__gda__=exp=1563171417~hmac=f1910bda85 ######################################################################## 100.0% ==> Pouring webp-1.0.2.mojave.bottle.1.tar.gz 🍺 /usr/local/Cellar/webp/1.0.2: 39 files, 2.1MB ==> Installing php ==> Downloading https://homebrew.bintray.com/bottles/php-7.3.6_1.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/a7/a7bb7bea2ffee51fc67c8ba61c45c980a05f994fa4580fc4629601ed06d5c8ee?__gda__=exp=1563171420~hmac=ead3d2ff09 ######################################################################## 100.0% ==> Pouring php-7.3.6_1.mojave.bottle.tar.gz Error: The `brew link` step did not complete successfully The formula built, but is not symlinked into /usr/local Could not symlink sbin/php-fpm /usr/local/sbin is not writable. You can try again using: brew link php ==> /usr/local/Cellar/php/7.3.6_1/bin/pear config-set php_ini /usr/local/etc/php/7.3/php.ini system ==> /usr/local/Cellar/php/7.3.6_1/bin/pear config-set php_dir /usr/local/share/pear system ==> /usr/local/Cellar/php/7.3.6_1/bin/pear config-set doc_dir /usr/local/share/pear/doc system ==> /usr/local/Cellar/php/7.3.6_1/bin/pear config-set ext_dir /usr/local/lib/php/pecl/20180731 system ==> /usr/local/Cellar/php/7.3.6_1/bin/pear config-set bin_dir /usr/local/opt/php/bin system ==> /usr/local/Cellar/php/7.3.6_1/bin/pear config-set data_dir /usr/local/share/pear/data system ==> /usr/local/Cellar/php/7.3.6_1/bin/pear config-set cfg_dir /usr/local/share/pear/cfg system ==> /usr/local/Cellar/php/7.3.6_1/bin/pear config-set www_dir /usr/local/share/pear/htdocs system ==> /usr/local/Cellar/php/7.3.6_1/bin/pear config-set man_dir /usr/local/share/man system ==> /usr/local/Cellar/php/7.3.6_1/bin/pear config-set test_dir /usr/local/share/pear/test system ==> /usr/local/Cellar/php/7.3.6_1/bin/pear config-set php_bin /usr/local/opt/php/bin/php system ==> /usr/local/Cellar/php/7.3.6_1/bin/pear update-channels ==> Caveats To enable PHP in Apache add the following to httpd.conf and restart Apache: LoadModule php7_module /usr/local/opt/php/lib/httpd/modules/libphp7.so <FilesMatch \.php$> SetHandler application/x-httpd-php </FilesMatch> Finally, check DirectoryIndex includes index.php DirectoryIndex index.php index.html The php.ini and php-fpm.ini file can be found in: /usr/local/etc/php/7.3/ To have launchd start php now and restart at login: brew services start php Or, if you don't want/need a background service you can just run: php-fpm ==> Summary 🍺 /usr/local/Cellar/php/7.3.6_1: 521 files, 77.0MB ==> Downloading https://homebrew.bintray.com/bottles/mysql-8.0.16.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/65/65e6629740ca75ceaae575b4cc68f2cf133619d08cdcd4cb2dee9737ce5fad3a?__gda__=exp=1563171533~hmac=9c7b229a94 ######################################################################## 100.0% ==> Pouring mysql-8.0.16.mojave.bottle.tar.gz ==> /usr/local/Cellar/mysql/8.0.16/bin/mysqld --initialize-insecure --user=user --basedir=/usr/local/Cellar/mysql/8.0.16 --datadir=/usr/local/var/mysql -- ==> Caveats We've installed your MySQL database without a root password. To secure it run: mysql_secure_installation MySQL is configured to only allow connections from localhost by default To connect run: mysql -uroot To have launchd start mysql now and restart at login: brew services start mysql Or, if you don't want/need a background service you can just run: mysql.server start ==> Summary 🍺 /usr/local/Cellar/mysql/8.0.16: 275 files, 269.8MB ==> Caveats ==> python Python has been installed as /usr/local/bin/python3 Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to `python3`, `python3-config`, `pip3` etc., respectively, have been installed into /usr/local/opt/python/libexec/bin If you need Homebrew's Python 2.7 run brew install python@2 You can install Python packages with pip3 install <package> They will install into the site-package directory /usr/local/lib/python3.7/site-packages See: https://docs.brew.sh/Homebrew-and-Python ==> icu4c icu4c is keg-only, which means it was not symlinked into /usr/local, because macOS provides libicucore.dylib (but nothing else). If you need to have icu4c first in your PATH run: echo 'export PATH="/usr/local/opt/icu4c/bin:$PATH"' >> ~/.bash_profile echo 'export PATH="/usr/local/opt/icu4c/sbin:$PATH"' >> ~/.bash_profile For compilers to find icu4c you may need to set: export LDFLAGS="-L/usr/local/opt/icu4c/lib" export CPPFLAGS="-I/usr/local/opt/icu4c/include" For pkg-config to find icu4c you may need to set: export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig" ==> libpq libpq is keg-only, which means it was not symlinked into /usr/local, because conflicts with postgres formula. If you need to have libpq first in your PATH run: echo 'export PATH="/usr/local/opt/libpq/bin:$PATH"' >> ~/.bash_profile For compilers to find libpq you may need to set: export LDFLAGS="-L/usr/local/opt/libpq/lib" export CPPFLAGS="-I/usr/local/opt/libpq/include" For pkg-config to find libpq you may need to set: export PKG_CONFIG_PATH="/usr/local/opt/libpq/lib/pkgconfig" ==> php To enable PHP in Apache add the following to httpd.conf and restart Apache: LoadModule php7_module /usr/local/opt/php/lib/httpd/modules/libphp7.so <FilesMatch \.php$> SetHandler application/x-httpd-php </FilesMatch> Finally, check DirectoryIndex includes index.php DirectoryIndex index.php index.html The php.ini and php-fpm.ini file can be found in: /usr/local/etc/php/7.3/ To have launchd start php now and restart at login: brew services start php Or, if you don't want/need a background service you can just run: php-fpm ==> mysql We've installed your MySQL database without a root password. To secure it run: mysql_secure_installation MySQL is configured to only allow connections from localhost by default To connect run: mysql -uroot To have launchd start mysql now and restart at login: brew services start mysql Or, if you don't want/need a background service you can just run: mysql.server start $mbp user:Library >>> brew link php Linking /usr/local/Cellar/php/7.3.6_1... Error: Could not symlink sbin/php-fpm /usr/local/sbin is not writable. $mbp user:Library >>> nginx $mbp user:Library >>> mysql_secure_installation Securing the MySQL server deployment. Enter password for user root: Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) $mbp user:Library >>> mysql.server start Starting MySQL .. SUCCESS! $mbp user:Library >>> mysql_secure_installation Securing the MySQL server deployment. Connecting to MySQL using a blank password. VALIDATE PASSWORD COMPONENT can be used to test passwords and improve security. It checks the strength of password and allows the users to set only those passwords which are secure enough. Would you like to setup VALIDATE PASSWORD component? Press y|Y for Yes, any other key for No: Please set the password for root here. New password: Sorry, you can't use an empty password here. New password: Re-enter new password: By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? (Press y|Y for Yes, any other key for No) : Y Success. Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y Success. By default, MySQL comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y - Dropping test database... Success. - Removing privileges on test database... Success. Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y Success. All done! $mbp user:Library >>>