As postgres user, you can update your bash configuration file.

Run the command export PGDATA="/data/pgdata" export PGHOME="PostresqlHome" export PATH="$PGHOME/bin/:$PATH" where PostgresqlHome is the path to the PostgreSQL installation.

Configure the PostgreSQL properties. See Configure PostgreSQL Properties.