brew_install_postgresql

PostgreSQL - brew install postgresql

Return to PostgreSQL Installation, Managing PostgreSQL on macOS, macOS Software, PostgreSQL

=⇒ Pouring postgresql-12.2.catalina.bottle.tar.gz =⇒ /usr/local/Cellar/postgresql/12.2/bin/initdb –locale=C -E UTF-8 /usr/local/var/postgres =⇒ Caveats To migrate existing data from a previous major version of PostgreSQL run:

 brew postgresql-upgrade-database

To have launchd start postgresql now and restart at login:

 brew services start postgresql
Or, if you don't want/need a background service you can just run:
 pg_ctl -D /usr/local/var/postgres start
=⇒ Summary 🍺 /usr/local/Cellar/postgresql/12.2: 3,218 files, 37.8MB =⇒ Caveats =⇒ krb5 krb5 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 krb5 first in your PATH run:

 echo 'export PATH="/usr/local/opt/krb5/bin:$PATH"' >> ~/.bash_profile
 echo 'export PATH="/usr/local/opt/krb5/sbin:$PATH"' >> ~/.bash_profile

For compilers to find krb5 you may need to set:

 export LDFLAGS="-L/usr/local/opt/krb5/lib"
 export CPPFLAGS="-I/usr/local/opt/krb5/include"

=⇒ postgresql To migrate existing data from a previous major version of PostgreSQL run:

 brew postgresql-upgrade-database

To have launchd start postgresql now and restart at login:

 brew services start postgresql
Or, if you don't want/need a background service you can just run:
 pg_ctl -D /usr/local/var/postgres start

brew_install_postgresql.txt · Last modified: 2024/04/28 03:16 (external edit)