mac_tricks
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| mac_tricks [2018/12/06 21:05] – created 91.177.234.129 | mac_tricks [2022/02/13 15:16] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Mac_tricks ====== | + | ==== Mac laptop with Apple M1 Silicon |
| + | The old way of getting into Recovery Mode no longer works (Restart and hold Command-R). It is now Press and (keep) holding the power button until you see the message. Far simpler actually :-) | ||
| - | =====When your Mac won't start===== | + | ==== Home brew commands ==== |
| + | === Show the repository === | ||
| + | < | ||
| + | ls -al $(brew --repo homebrew/ | ||
| + | </ | ||
| + | |||
| + | === Show what is installed === | ||
| + | < | ||
| + | cd $(brew --repo homebrew/ | ||
| + | </ | ||
| + | |||
| + | === Other useful commands === | ||
| + | < | ||
| + | brew doctor | ||
| + | brew config | ||
| + | ruby -e " | ||
| + | or | ||
| + | /bin/bash -c " | ||
| + | </ | ||
| + | |||
| + | ==== Install MAMP on Big Sur manually ==== | ||
| + | Big Sur seems to have removed the Web Server from the Sharing tab in the Control Panel. But it is actually still on the system. | ||
| + | |||
| + | This MAMP however, stops and unloads this version so that it can use the Homebrew version. | ||
| + | |||
| + | Basic steps are: | ||
| + | * XCODE commandline tools< | ||
| + | * Homebrew< | ||
| + | * Apache< | ||
| + | * PHP< | ||
| + | * MariaDB< | ||
| + | * OpenSSL< | ||
| + | |||
| + | http, php, MariaDB and OpenSSL config files all need modifying so best to use [[https:// | ||
| + | |||
| + | But beware the directory paths mentioned are no longer correct with more recent versions of brew. They are now under / | ||
| + | |||
| + | Log of httpd installation | ||
| + | < | ||
| + | ==> Auto-updated Homebrew! | ||
| + | Updated 1 tap (homebrew/ | ||
| + | ==> New Formulae | ||
| + | virtualenv | ||
| + | ==> Updated Formulae | ||
| + | Updated 41 formulae. | ||
| + | |||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Installing dependencies for httpd: apr, [email protected], | ||
| + | ==> Installing httpd dependency: apr | ||
| + | ==> Pouring apr-1.7.0_2.arm64_big_sur.bottle.tar.gz | ||
| + | ==> Caveats | ||
| + | apr is keg-only, which means it was not symlinked into / | ||
| + | because Apple' | ||
| + | |||
| + | If you need to have apr first in your PATH, run: | ||
| + | echo ' | ||
| + | |||
| + | For compilers to find apr you may need to set: | ||
| + | export LDFLAGS=" | ||
| + | export CPPFLAGS=" | ||
| + | |||
| + | ==> Summary | ||
| + | 🍺 / | ||
| + | ==> Installing httpd dependency: [email protected] | ||
| + | ==> Pouring [email protected]_big_sur.bottle.1.tar.gz | ||
| + | ==> Regenerating CA certificate bundle from keychain, this may take a while... | ||
| + | ==> Caveats | ||
| + | A CA file has been bootstrapped using certificates from the system | ||
| + | keychain. To add additional certificates, | ||
| + | / | ||
| + | |||
| + | and run | ||
| + | / | ||
| + | |||
| + | [email protected] is keg-only, which means it was not symlinked into / | ||
| + | because macOS provides LibreSSL. | ||
| + | |||
| + | If you need to have [email protected] first in your PATH, run: | ||
| + | echo ' | ||
| + | |||
| + | For compilers to find [email protected] you may need to set: | ||
| + | export LDFLAGS=" | ||
| + | export CPPFLAGS=" | ||
| + | |||
| + | ==> Summary | ||
| + | 🍺 / | ||
| + | ==> Installing httpd dependency: apr-util | ||
| + | ==> Pouring apr-util-1.6.1_3.arm64_big_sur.bottle.tar.gz | ||
| + | ==> Caveats | ||
| + | apr-util is keg-only, which means it was not symlinked into / | ||
| + | because Apple' | ||
| + | |||
| + | If you need to have apr-util first in your PATH, run: | ||
| + | echo ' | ||
| + | |||
| + | ==> Summary | ||
| + | 🍺 / | ||
| + | ==> Installing httpd dependency: brotli | ||
| + | ==> Pouring brotli-1.0.9.arm64_big_sur.bottle.tar.gz | ||
| + | 🍺 / | ||
| + | ==> Installing httpd dependency: c-ares | ||
| + | ==> Pouring c-ares-1.17.1.arm64_big_sur.bottle.tar.gz | ||
| + | 🍺 / | ||
| + | ==> Installing httpd dependency: jemalloc | ||
| + | ==> Pouring jemalloc-5.2.1_1.arm64_big_sur.bottle.tar.gz | ||
| + | 🍺 / | ||
| + | ==> Installing httpd dependency: libev | ||
| + | ==> Pouring libev-4.33.arm64_big_sur.bottle.tar.gz | ||
| + | 🍺 / | ||
| + | ==> Installing httpd dependency: nghttp2 | ||
| + | ==> Pouring nghttp2-1.43.0.arm64_big_sur.bottle.tar.gz | ||
| + | 🍺 / | ||
| + | ==> Installing httpd dependency: pcre | ||
| + | ==> Pouring pcre-8.44.arm64_big_sur.bottle.tar.gz | ||
| + | 🍺 / | ||
| + | ==> Installing httpd | ||
| + | ==> Pouring httpd-2.4.46_2.arm64_big_sur.bottle.tar.gz | ||
| + | ==> Caveats | ||
| + | DocumentRoot is / | ||
| + | |||
| + | The default ports have been set in / | ||
| + | / | ||
| + | |||
| + | To have launchd start httpd now and restart at login: | ||
| + | brew services start httpd | ||
| + | Or, if you don't want/need a background service you can just run: | ||
| + | apachectl start | ||
| + | ==> Summary | ||
| + | 🍺 / | ||
| + | ==> Upgrading 1 dependent: | ||
| + | wget 1.21 -> 1.21.1 | ||
| + | ==> Upgrading wget 1.21 -> 1.21.1 | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Pouring wget-1.21.1.arm64_big_sur.bottle.tar.gz | ||
| + | 🍺 / | ||
| + | Removing: / | ||
| + | ==> Checking for dependents of upgraded formulae... | ||
| + | ==> No broken dependents found! | ||
| + | ==> Caveats | ||
| + | ==> apr | ||
| + | apr is keg-only, which means it was not symlinked into / | ||
| + | because Apple' | ||
| + | |||
| + | If you need to have apr first in your PATH, run: | ||
| + | echo ' | ||
| + | |||
| + | For compilers to find apr you may need to set: | ||
| + | export LDFLAGS=" | ||
| + | export CPPFLAGS=" | ||
| + | |||
| + | ==> [email protected] | ||
| + | A CA file has been bootstrapped using certificates from the system | ||
| + | keychain. To add additional certificates, | ||
| + | / | ||
| + | |||
| + | and run | ||
| + | / | ||
| + | |||
| + | [email protected] is keg-only, which means it was not symlinked into / | ||
| + | because macOS provides LibreSSL. | ||
| + | |||
| + | If you need to have [email protected] first in your PATH, run: | ||
| + | echo ' | ||
| + | |||
| + | For compilers to find [email protected] you may need to set: | ||
| + | export LDFLAGS=" | ||
| + | export CPPFLAGS=" | ||
| + | |||
| + | ==> apr-util | ||
| + | apr-util is keg-only, which means it was not symlinked into / | ||
| + | because Apple' | ||
| + | |||
| + | If you need to have apr-util first in your PATH, run: | ||
| + | echo ' | ||
| + | |||
| + | ==> httpd | ||
| + | DocumentRoot is / | ||
| + | |||
| + | The default ports have been set in / | ||
| + | / | ||
| + | |||
| + | To have launchd start httpd now and restart at login: | ||
| + | brew services start httpd | ||
| + | Or, if you don't want/need a background service you can just run: | ||
| + | apachectl start | ||
| + | </ | ||
| + | |||
| + | sudo brew services start httpd | ||
| + | < | ||
| + | ==> Tapping homebrew/ | ||
| + | Cloning into '/ | ||
| + | remote: Enumerating objects: 20, done. | ||
| + | remote: Counting objects: 100% (20/20), done. | ||
| + | remote: Compressing objects: 100% (20/20), done. | ||
| + | remote: Total 1141 (delta 8), reused 0 (delta 0), pack-reused 1121 | ||
| + | Receiving objects: 100% (1141/ | ||
| + | Resolving deltas: 100% (485/485), done. | ||
| + | Tapped 1 command (42 files, 424.9KB). | ||
| + | Warning: Taking root:admin ownership of some httpd paths: | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | This will require manual removal of these paths using `sudo rm` on | ||
| + | brew upgrade/ | ||
| + | Warning: httpd must be run as non-root to start at user login! | ||
| + | ==> Successfully started `httpd` (label: homebrew.mxcl.httpd) | ||
| + | </ | ||
| + | |||
| + | === Note: error_log and acces_log === | ||
| + | These files (and others) are not in the location specified in the doc (/ | ||
| + | |||
| + | |||
| + | Stop, start or restart Apache now need to be done with brew | ||
| + | < | ||
| + | $ brew services stop httpd | ||
| + | $ brew services start httpd | ||
| + | $ brew services restart httpd | ||
| + | </ | ||
| + | |||
| + | ~ % brew install php | ||
| + | < | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Downloading https:// | ||
| + | ==> Downloading from https:// | ||
| + | ######################################################################## | ||
| + | ==> Installing dependencies for php: argon2, aspell, autoconf, libmetalink, | ||
| + | ==> Installing php dependency: argon2 | ||
| + | ==> Pouring argon2-20190702_1.arm64_big_sur.bottle.tar.gz | ||
| + | 🍺 / | ||
| + | ==> Installing php dependency: aspell | ||
| + | ==> Pouring aspell-0.60.8.arm64_big_sur.bottle.1.tar.gz | ||
| + | 🍺 / | ||
| + | ==> Installing php dependency: autoconf | ||
| + | ==> Pouring autoconf-2.69.arm64_big_sur.bottle.4.tar.gz | ||
| + | 🍺 / | ||
| + | ==> Installing php dependency: libmetalink | ||
| + | ==> Pouring libmetalink-0.1.3.arm64_big_sur.bottle.tar.gz | ||
| + | 🍺 / | ||
| + | ==> Installing php dependency: libssh2 | ||
| + | ==> Pouring libssh2-1.9.0_1.arm64_big_sur.bottle.tar.gz | ||
| + | 🍺 / | ||
| + | ==> Installing php dependency: openldap | ||
| + | ==> Pouring openldap-2.4.58.arm64_big_sur.bottle.tar.gz | ||
| + | ==> Caveats | ||
| + | openldap is keg-only, which means it was not symlinked into / | ||
| + | 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 ' | ||
| + | echo ' | ||
| + | |||
| + | For compilers to find openldap you may need to set: | ||
| + | export LDFLAGS=" | ||
| + | export CPPFLAGS=" | ||
| + | |||
| + | ==> Summary | ||
| + | 🍺 / | ||
| + | ==> Installing php dependency: rtmpdump | ||
| + | ==> Pouring rtmpdump-2.4+20151223_1.arm64_big_sur.bottle.tar.gz | ||
| + | 🍺 / | ||
| + | ==> Installing php dependency: zstd | ||
| + | ==> Pouring zstd-1.4.9.arm64_big_sur.bottle.tar.gz | ||
| + | 🍺 / | ||
| + | ==> Installing php dependency: curl | ||
| + | ==> Pouring curl-7.75.0.arm64_big_sur.bottle.tar.gz | ||
| + | ==> Caveats | ||
| + | curl is keg-only, which means it was not symlinked into / | ||
| + | because macOS already provides this software and installing another version in | ||
| + | parallel can cause all kinds of trouble. | ||
| + | |||
| + | If you need to have curl first in your PATH, run: | ||
| + | echo ' | ||
| + | |||
| + | For compilers to find curl you may need to set: | ||
| + | export LDFLAGS=" | ||
| + | export CPPFLAGS=" | ||
| + | |||
| + | |||
| + | zsh completions have been installed to: | ||
| + | / | ||
| + | ==> Summary | ||
| + | 🍺 / | ||
| + | ==> Installing php dependency: libtool | ||
| + | ==> Pouring libtool-2.4.6_2.arm64_big_sur.bottle.tar.gz | ||
| + | ==> Caveats | ||
| + | In order to prevent conflicts with Apple' | ||
| + | so, you have instead: glibtool and glibtoolize. | ||
| + | ==> Summary | ||
| + | 🍺 / | ||
| + | ==> Installing php dependency: unixodbc | ||
| + | ==> Pouring unixodbc-2.3.9.arm64_big_sur.bottle.tar.gz | ||
| + | 🍺 / | ||
| + | ==> Installing php dependency: freetds | ||
| + | ==> Pouring freetds-1.2.18.arm64_big_sur.bottle.tar.gz | ||
| + | 🍺 / | ||
| + | ==> Installing php dependency: libffi | ||
| + | ==> Pouring libffi-3.3_3.arm64_big_sur.bottle.tar.gz | ||
| + | ==> Caveats | ||
| + | libffi is keg-only, which means it was not symlinked into / | ||
| + | because macOS already provides this software and installing another version in | ||
| + | parallel can cause all kinds of trouble. | ||
| + | |||
| + | For compilers to find libffi you may need to set: | ||
| + | export LDFLAGS=" | ||
| + | export CPPFLAGS=" | ||
| + | |||
| + | ==> Summary | ||
| + | 🍺 / | ||
| + | ==> Installing php dependency: gdbm | ||
| + | ==> Pouring gdbm-1.19.arm64_big_sur.bottle.tar.gz | ||
| + | 🍺 / | ||
| + | ==> Installing php dependency: mpdecimal | ||
| + | ==> Pouring mpdecimal-2.5.1.arm64_big_sur.bottle.tar.gz | ||
| + | 🍺 / | ||
| + | ==> Installing php dependency: readline | ||
| + | ==> Pouring readline-8.1.arm64_big_sur.bottle.tar.gz | ||
| + | ==> Caveats | ||
| + | readline is keg-only, which means it was not symlinked into / | ||
| + | because macOS provides BSD libedit. | ||
| + | |||
| + | For compilers to find readline you may need to set: | ||
| + | export LDFLAGS=" | ||
| + | export CPPFLAGS=" | ||
| + | |||
| + | ==> Summary | ||
| + | 🍺 / | ||
| + | ==> Installing php dependency: sqlite | ||
| + | ==> Pouring sqlite-3.34.1.arm64_big_sur.bottle.tar.gz | ||
| + | ==> Caveats | ||
| + | sqlite is keg-only, which means it was not symlinked into / | ||
| + | because macOS already provides this software and installing another version in | ||
| + | parallel can cause all kinds of trouble. | ||
| + | |||
| + | If you need to have sqlite first in your PATH, run: | ||
| + | echo ' | ||
| + | |||
| + | For compilers to find sqlite you may need to set: | ||
| + | export LDFLAGS=" | ||
| + | export CPPFLAGS=" | ||
| + | |||
| + | ==> Summary | ||
| + | 🍺 / | ||
| + | ==> Installing php dependency: tcl-tk | ||
| + | ==> Pouring tcl-tk-8.6.11_1.arm64_big_sur.bottle.tar.gz | ||
| + | ==> Caveats | ||
| + | tcl-tk is keg-only, which means it was not symlinked into / | ||
| + | because macOS already provides this software and installing another version in | ||
| + | parallel can cause all kinds of trouble. | ||
| + | |||
| + | If you need to have tcl-tk first in your PATH, run: | ||
| + | echo ' | ||
| + | |||
| + | For compilers to find tcl-tk you may need to set: | ||
| + | export LDFLAGS=" | ||
| + | export CPPFLAGS=" | ||
| + | |||
| + | ==> Summary | ||
| + | 🍺 / | ||
| + | ==> Installing php dependency: xz | ||
| + | ==> Pouring xz-5.2.5.arm64_big_sur.bottle.tar.gz | ||
| + | 🍺 / | ||
| + | ==> Installing php dependency: [email protected] | ||
| + | ==> Pouring [email protected]_2.arm64_big_sur.bottle.tar.gz | ||
| + | ==> / | ||
| + | ==> / | ||
| + | ==> / | ||
| + | ==> Caveats | ||
| + | Python has been installed as | ||
| + | / | ||
| + | |||
| + | Unversioned symlinks `python`, `python-config`, | ||
| + | `python3`, `python3-config`, | ||
| + | / | ||
| + | |||
| + | You can install Python packages with | ||
| + | pip3 install < | ||
| + | They will install into the site-package directory | ||
| + | / | ||
| + | |||
| + | See: https:// | ||
| + | ==> Summary | ||
| + | 🍺 / | ||
| + | ==> Installing php dependency: glib | ||
| + | ==> Pouring glib-2.68.0.arm64_big_sur.bottle.tar.gz | ||
| + | 🍺 / | ||
| + | ==> Installing php dependency: gmp | ||
| + | ==> Pouring gmp-6.2.1.arm64_big_sur.bottle.tar.gz | ||
| + | 🍺 / | ||
| + | ==> Installing php dependency: icu4c | ||
| + | ==> Pouring icu4c-68.2.arm64_big_sur.bottle.tar.gz | ||
| + | ==> Caveats | ||
| + | icu4c is keg-only, which means it was not symlinked into / | ||
| + | because macOS provides libicucore.dylib (but nothing else). | ||
| + | |||
| + | If you need to have icu4c first in your PATH, run: | ||
| + | echo ' | ||
| + | echo ' | ||
| + | |||
| + | For compilers to find icu4c you may need to set: | ||
| + | export LDFLAGS=" | ||
| + | export CPPFLAGS=" | ||
| + | |||
| + | ==> Summary | ||
| + | 🍺 / | ||
| + | ==> Installing php dependency: krb5 | ||
| + | ==> Pouring krb5-1.19.1.arm64_big_sur.bottle.tar.gz | ||
| + | ==> Caveats | ||
| + | krb5 is keg-only, which means it was not symlinked into / | ||
| + | because macOS already provides this software and installing another version in | ||
| + | parallel can cause all kinds of trouble. | ||
| + | |||
| + | If you need to have krb5 first in your PATH, run: | ||
| + | echo ' | ||
| + | echo ' | ||
| + | |||
| + | For compilers to find krb5 you may need to set: | ||
| + | export LDFLAGS=" | ||
| + | export CPPFLAGS=" | ||
| + | |||
| + | ==> Summary | ||
| + | 🍺 / | ||
| + | ==> Installing php dependency: libpq | ||
| + | ==> Pouring libpq-13.2.arm64_big_sur.bottle.tar.gz | ||
| + | ==> Caveats | ||
| + | libpq is keg-only, which means it was not symlinked into / | ||
| + | because conflicts with postgres formula. | ||
| + | |||
| + | If you need to have libpq first in your PATH, run: | ||
| + | echo ' | ||
| + | |||
| + | For compilers to find libpq you may need to set: | ||
| + | export LDFLAGS=" | ||
| + | export CPPFLAGS=" | ||
| + | |||
| + | ==> Summary | ||
| + | 🍺 / | ||
| + | ==> Installing php dependency: libsodium | ||
| + | ==> Pouring libsodium-1.0.18_1.arm64_big_sur.bottle.tar.gz | ||
| + | 🍺 / | ||
| + | ==> Installing php dependency: libzip | ||
| + | ==> Pouring libzip-1.7.3.arm64_big_sur.bottle.tar.gz | ||
| + | 🍺 / | ||
| + | ==> Installing php dependency: oniguruma | ||
| + | ==> Pouring oniguruma-6.9.6.arm64_big_sur.bottle.tar.gz | ||
| + | 🍺 / | ||
| + | ==> Installing php dependency: tidy-html5 | ||
| + | ==> Pouring tidy-html5-5.6.0.arm64_big_sur.bottle.tar.gz | ||
| + | 🍺 / | ||
| + | ==> Installing php | ||
| + | ==> Pouring php-8.0.3.arm64_big_sur.bottle.tar.gz | ||
| + | ==> / | ||
| + | ==> / | ||
| + | ==> / | ||
| + | ==> / | ||
| + | ==> / | ||
| + | ==> / | ||
| + | ==> / | ||
| + | ==> / | ||
| + | ==> / | ||
| + | ==> / | ||
| + | ==> / | ||
| + | ==> / | ||
| + | ==> Caveats | ||
| + | To enable PHP in Apache add the following to httpd.conf and restart Apache: | ||
| + | LoadModule php_module / | ||
| + | |||
| + | < | ||
| + | SetHandler application/ | ||
| + | </ | ||
| + | |||
| + | Finally, check DirectoryIndex includes index.php | ||
| + | DirectoryIndex index.php index.html | ||
| + | |||
| + | The php.ini and php-fpm.ini file can be found in: | ||
| + | / | ||
| + | |||
| + | 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 | ||
| + | 🍺 / | ||
| + | ==> Caveats | ||
| + | ==> openldap | ||
| + | openldap is keg-only, which means it was not symlinked into / | ||
| + | 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 ' | ||
| + | echo ' | ||
| + | |||
| + | For compilers to find openldap you may need to set: | ||
| + | export LDFLAGS=" | ||
| + | export CPPFLAGS=" | ||
| + | |||
| + | ==> curl | ||
| + | curl is keg-only, which means it was not symlinked into / | ||
| + | because macOS already provides this software and installing another version in | ||
| + | parallel can cause all kinds of trouble. | ||
| + | |||
| + | If you need to have curl first in your PATH, run: | ||
| + | echo ' | ||
| + | |||
| + | For compilers to find curl you may need to set: | ||
| + | export LDFLAGS=" | ||
| + | export CPPFLAGS=" | ||
| + | |||
| + | |||
| + | zsh completions have been installed to: | ||
| + | / | ||
| + | ==> libtool | ||
| + | In order to prevent conflicts with Apple' | ||
| + | so, you have instead: glibtool and glibtoolize. | ||
| + | ==> libffi | ||
| + | libffi is keg-only, which means it was not symlinked into / | ||
| + | because macOS already provides this software and installing another version in | ||
| + | parallel can cause all kinds of trouble. | ||
| + | |||
| + | For compilers to find libffi you may need to set: | ||
| + | export LDFLAGS=" | ||
| + | export CPPFLAGS=" | ||
| + | |||
| + | ==> readline | ||
| + | readline is keg-only, which means it was not symlinked into / | ||
| + | because macOS provides BSD libedit. | ||
| + | |||
| + | For compilers to find readline you may need to set: | ||
| + | export LDFLAGS=" | ||
| + | export CPPFLAGS=" | ||
| + | |||
| + | ==> sqlite | ||
| + | sqlite is keg-only, which means it was not symlinked into / | ||
| + | because macOS already provides this software and installing another version in | ||
| + | parallel can cause all kinds of trouble. | ||
| + | |||
| + | If you need to have sqlite first in your PATH, run: | ||
| + | echo ' | ||
| + | |||
| + | For compilers to find sqlite you may need to set: | ||
| + | export LDFLAGS=" | ||
| + | export CPPFLAGS=" | ||
| + | |||
| + | ==> tcl-tk | ||
| + | tcl-tk is keg-only, which means it was not symlinked into / | ||
| + | because macOS already provides this software and installing another version in | ||
| + | parallel can cause all kinds of trouble. | ||
| + | |||
| + | If you need to have tcl-tk first in your PATH, run: | ||
| + | echo ' | ||
| + | |||
| + | For compilers to find tcl-tk you may need to set: | ||
| + | export LDFLAGS=" | ||
| + | export CPPFLAGS=" | ||
| + | |||
| + | ==> [email protected] | ||
| + | Python has been installed as | ||
| + | / | ||
| + | |||
| + | Unversioned symlinks `python`, `python-config`, | ||
| + | `python3`, `python3-config`, | ||
| + | / | ||
| + | |||
| + | You can install Python packages with | ||
| + | pip3 install < | ||
| + | They will install into the site-package directory | ||
| + | / | ||
| + | |||
| + | See: https:// | ||
| + | ==> icu4c | ||
| + | icu4c is keg-only, which means it was not symlinked into / | ||
| + | because macOS provides libicucore.dylib (but nothing else). | ||
| + | |||
| + | If you need to have icu4c first in your PATH, run: | ||
| + | echo ' | ||
| + | echo ' | ||
| + | |||
| + | For compilers to find icu4c you may need to set: | ||
| + | export LDFLAGS=" | ||
| + | export CPPFLAGS=" | ||
| + | |||
| + | ==> krb5 | ||
| + | krb5 is keg-only, which means it was not symlinked into / | ||
| + | because macOS already provides this software and installing another version in | ||
| + | parallel can cause all kinds of trouble. | ||
| + | |||
| + | If you need to have krb5 first in your PATH, run: | ||
| + | echo ' | ||
| + | echo ' | ||
| + | |||
| + | For compilers to find krb5 you may need to set: | ||
| + | export LDFLAGS=" | ||
| + | export CPPFLAGS=" | ||
| + | |||
| + | ==> libpq | ||
| + | libpq is keg-only, which means it was not symlinked into / | ||
| + | because conflicts with postgres formula. | ||
| + | |||
| + | If you need to have libpq first in your PATH, run: | ||
| + | echo ' | ||
| + | |||
| + | For compilers to find libpq you may need to set: | ||
| + | export LDFLAGS=" | ||
| + | export CPPFLAGS=" | ||
| + | |||
| + | ==> php | ||
| + | To enable PHP in Apache add the following to httpd.conf and restart Apache: | ||
| + | LoadModule php_module / | ||
| + | |||
| + | < | ||
| + | SetHandler application/ | ||
| + | </ | ||
| + | |||
| + | Finally, check DirectoryIndex includes index.php | ||
| + | DirectoryIndex index.php index.html | ||
| + | |||
| + | The php.ini and php-fpm.ini file can be found in: | ||
| + | / | ||
| + | |||
| + | 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 | ||
| + | </ | ||
| + | |||
| + | === Note: httpd.conf === | ||
| + | This file and others no longer seem to be in the documented location (/ | ||
| + | |||
| + | |||
| + | ==== When your Mac won't start ==== | ||
| [[https:// | [[https:// | ||
| Briefly: | Briefly: | ||
| - | * hold down Command-S for single-user mode. (Hold down Command-V for verbose mode) | + | * hold down Command-S for single-user mode. (Hold down Command-V for verbose mode) |
| - | * /sbin/fsck -fy | + | * /sbin/fsck -fy |
| - | * reboot | + | * reboot |
| - | =====Set the volume from the command line===== | + | ==== Set the volume from the command line ==== |
| - | < | + | < |
| - | =====Reset admin password using recovery mode===== | + | osascript -e "set Volume 5" |
| + | </ | ||
| + | ==== Reset admin password using recovery mode ==== | ||
| Forgot the password? Locked out of your Mac? | Forgot the password? Locked out of your Mac? | ||
| - | * Reboot your Mac while holding down the Command key and R. Keep holding the key combination until the loading bar appears. | + | * Reboot your Mac while holding down the Command key and R. Keep holding the key combination until the loading bar appears. |
| - | * Once in the Recovery Mode, select Terminal from the Utilities menu. | + | * Once in the Recovery Mode, select Terminal from the Utilities menu. |
| - | * Type “resetpassword” in the Terminal window and hit enter. | + | * Type “resetpassword” in the Terminal window and hit enter. |
| - | * Select the storage device that contains the operating system. | + | * Select the storage device that contains the operating system. |
| - | * Select the admin account. | + | * Select the admin account. |
| - | * Click on the Change Password button. | + | * Click on the Change Password button. |
| - | * Enter a new password as well as a new password hint. | + | * Enter a new password as well as a new password hint. |
| - | * Save and restart from the main menu. | + | * Save and restart from the main menu. |
| - | * Log in with your new admin password. | + | * Log in with your new admin password. |
| - | =====Reset admin password using single-user mode===== | + | ==== Reset admin password using single-user mode ==== |
| - | * Access the single-user mode by holding the Command key and S on startup. | + | * Access the single-user mode by holding the Command key and S on startup. |
| - | < | + | < |
| - | * Log in with your new password. | + | mount –uw / |
| + | launchctl load / | ||
| + | passwd < | ||
| + | reboot | ||
| + | </ | ||
| + | * Log in with your new password. | ||
| - | =====Print from the command line===== | + | ==== Print from the command line ==== |
| Look at the advanced properties of the printer in System Preferences for the queue name (it will be the same as the printer name with all spaces and dashes replaced by underscores). | Look at the advanced properties of the printer in System Preferences for the queue name (it will be the same as the printer name with all spaces and dashes replaced by underscores). | ||
| - | < | + | < |
| + | lp -d < | ||
| + | </ | ||
| - | =====To clean up the right-click context menu===== | + | ==== To clean up the right-click context menu ==== |
| + | < | ||
| / | / | ||
| + | </ | ||
| - | =====Enable user's personal web site===== | + | ==== Enable user's personal web site ==== |
| From Mountain Lion onwards Sharing control panel no longer contains "Web sharing" | From Mountain Lion onwards Sharing control panel no longer contains "Web sharing" | ||
| - | < | + | < |
| + | mkdir ${HOME}/ | ||
| + | sudo cat << | ||
| + | < | ||
| + | Options Indexes MultiViews | ||
| + | AllowOverride All | ||
| + | Order allow, | ||
| + | Allow from all | ||
| + | </ | ||
| + | EOCAT | ||
| + | sudo apachectl start | ||
| + | </ | ||
| To have the Apache server start at each boot, follow above with this... | To have the Apache server start at each boot, follow above with this... | ||
| - | < | + | < |
| - | =====Some Terminal tricks===== | + | sudo defaults write / |
| + | </ | ||
| + | ==== Some Terminal tricks ==== | ||
| [[http:// | [[http:// | ||
| - | =====List all network hardware ports===== | + | ==== List all network hardware ports ==== |
| - | < | + | < |
| - | < | + | networksetup -listallhardwareports |
| - | =====Find out which dhcp server assigned the IP address===== | + | </ |
| + | < | ||
| + | Hardware Port: Wi-Fi | ||
| + | Device: en0 | ||
| + | Ethernet Address: 78: | ||
| + | |||
| + | Hardware Port: Bluetooth PAN | ||
| + | Device: en6 | ||
| + | Ethernet Address: 78: | ||
| + | |||
| + | Hardware Port: Thunderbolt 1 | ||
| + | Device: en3 | ||
| + | Ethernet Address: 26: | ||
| + | |||
| + | Hardware Port: Thunderbolt 2 | ||
| + | Device: en1 | ||
| + | Ethernet Address: 26: | ||
| + | |||
| + | Hardware Port: Thunderbolt 3 | ||
| + | Device: en4 | ||
| + | Ethernet Address: 26: | ||
| + | |||
| + | Hardware Port: Thunderbolt 4 | ||
| + | Device: en2 | ||
| + | Ethernet Address: 26: | ||
| + | |||
| + | Hardware Port: Thunderbolt Bridge | ||
| + | Device: bridge0 | ||
| + | Ethernet Address: 26: | ||
| + | |||
| + | VLAN Configurations | ||
| + | =================== | ||
| + | </ | ||
| + | ==== Find out which dhcp server assigned the IP address ==== | ||
| DHCP server is the line marked as < | DHCP server is the line marked as < | ||
| - | < | + | < |
| - | < | + | ipconfig getpacket en0 |
| - | =====Renew DHCP lease on MacOS===== | + | </ |
| - | < | + | < |
| + | op = BOOTREPLY | ||
| + | htype = 1 | ||
| + | flags = 0 | ||
| + | hlen = 6 | ||
| + | hops = 0 | ||
| + | xid = 0xad759efe | ||
| + | secs = 3 | ||
| + | ciaddr = 0.0.0.0 | ||
| + | yiaddr = 192.168.1.159 | ||
| + | siaddr = 192.168.1.13 | ||
| + | giaddr = 0.0.0.0 | ||
| + | chaddr = 78: | ||
| + | sname ====== | ||
| + | file ====== | ||
| + | options: | ||
| + | Options count is 11 | ||
| + | dhcp_message_type (uint8): ACK 0x5 | ||
| + | server_identifier (ip): 192.168.1.13 | ||
| + | lease_time (uint32): 0x15180 | ||
| + | renewal_t1_time_value (uint32): 0xa8c0 | ||
| + | rebinding_t2_time_value (uint32): 0x12750 | ||
| + | subnet_mask (ip): 255.255.255.0 | ||
| + | broadcast_address (ip): 192.168.1.255 | ||
| + | domain_name_server (ip_mult): {192.168.1.13} | ||
| + | domain_name (string): local | ||
| + | router (ip_mult): {192.168.1.1} | ||
| + | end (none): | ||
| + | </ | ||
| + | ==== Renew DHCP lease on MacOS ==== | ||
| + | < | ||
| + | sudo ipconfig set < | ||
| + | </ | ||
| - | =====List known disks===== | + | ==== List known disks ==== |
| - | < | + | < |
| + | diskutil list | ||
| + | </ | ||
| - | =====Create a bootable OSX / MacOS Mavericks on a USB stick / thumb drive===== | + | ==== Create a bootable OSX / MacOS Mavericks on a USB stick / thumb drive ==== |
| This way worked for me... | This way worked for me... | ||
| - | * Download the Installer from the App Store. You end up with a file called " | + | * Download the Installer from the App Store. You end up with a file called " |
| - | * Format a USB drive. Use Disk Utility. Partition tab, 1 partition, options... GUID. Call it " | + | * Format a USB drive. Use Disk Utility. Partition tab, 1 partition, options... GUID. Call it " |
| - | * Don't eject / unmount it. | + | * Don't eject / unmount it. |
| - | * Open Terminal. Run the following command...<br /> | + | * Open Terminal. Run the following command...\\ |
| - | < | + | < |
| - | If the mount point was / | + | sudo / |
| + | </ | ||
| + | If the mount point was / | ||
| If all goes well, be prepared to make a cup of tea and take your time drinking it... | If all goes well, be prepared to make a cup of tea and take your time drinking it... | ||
| - | < | + | < |
| + | Password: | ||
| + | Erasing Disk: 0%... 10%... 20%... 30%...100%... | ||
| + | Copying installer files to disk... | ||
| + | Copy complete. | ||
| + | Making disk bootable... | ||
| + | Copying boot files... | ||
| + | Copy complete. | ||
| + | Done. | ||
| + | </ | ||
| or | or | ||
| - | * [[http:// | + | * [[http:// |
| - | =====Show (or set) Power Management Settings===== | + | ==== Show (or set) Power Management Settings ==== |
| - | < | + | < |
| - | =====Turn Sudden Motion Sensor off===== | + | sudo pmset -g |
| - | < | + | </ |
| - | =====Show hidden files===== | + | ==== Turn Sudden Motion Sensor off ==== |
| - | < | + | < |
| + | sudo pmset -a sms 0 | ||
| + | </ | ||
| + | ==== Show hidden files ==== | ||
| + | < | ||
| + | defaults write com.apple.Finder AppleShowAllFiles TRUE; | ||
| + | </ | ||
| and on Mavericks | and on Mavericks | ||
| - | < | + | < |
| - | =====Automatically start Apache Web Server at boot time===== | + | defaults write com.apple.finder AppleShowAllFiles -boolean true; killall Finder |
| - | < | + | </ |
| + | ==== Automatically start Apache Web Server at boot time ==== | ||
| + | < | ||
| + | sudo defaults write / | ||
| + | </ | ||
mac_tricks.1544130326.txt.gz · Last modified: 2018/12/06 21:05 by 91.177.234.129
