You are on page 1of 1

Setup PostgreSQL Env variables on RHEL 8 (Linux)

Step 1: Login as Postgres user on the linux box.

Step 2: Edit bash_profile of postgres user using the following command


Vi .bash_profile

Step 3: Add the below mentioned lines to the existing bash_profile.


PATH=$PATH:HOME/bin
export PATH
export PATH=/usr/pgsql-12/bin:$PATH
PG_DATA=/var/lib/pgsql/12/data
export PGDATA
Step 4: Save and quit the bash_profile file.

You might also like