Postgres Installation¶
and install binaries from here
Make and Install
# Check openssl
which openssl
SSL_DIR="<ssl libs dir>"
# for home brew you can get it using `brew --prefix openssl@1.1`
# Configure the build
./configure --with-openssl \
--with-includes=${SSL_DIR}/include \
--with-libraries=${SSL_DIR}/lib \
--prefix $HOME/dev/postgres/pgsql
# Make
make world
# Install
make install
Configuration¶
Create ~/dev/postgres
and ~/dev/postgres/pgdata
env variables and aliases¶
Postgres config
export PG_HOME="$HOME/dev/postgres"
export PG_LOG_FILE="$PG_HOME/postgres.log"
export PG_DATA="$PG_HOME/pgdata"
export PATH="$PG_HOME/pgsql/bin:$PATH" # (1)
alias start_postgres="pg_ctl -D ${PG_DATA} -l ${PG_LOG_FILE} start"
alias stop_postgres="pg_ctl -D ${PG_DATA} -l ${PG_LOG_FILE} stop"
- not required for homebrew installation