How To Use Command Psql Working After Edit Bash Profile




dba@dba-rizky:~$ ssh root@x.x.x.x
root@x.x.x.x's password:
Last login: Thu Apr 19 16:54:32 2018 from dba
[root@prod-odgpostgres ~]#
[root@prod-odgpostgres ~]# su - postgres
[postgres@prod-odgpostgres ~]$ vi /home/postgres/.bash_profile

# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
#export PGDATA=/DATA/dbreplikasi

PATH=$PATH:$HOME/.local/bin:$HOME/bin
PATH=$PATH:/usr/local/pgsql/bin
export PATH

Save ctrl+cshift + ;wq! → enter

[postgres@prod-odgpostgres ~]$ source /home/postgres/.bash_profile
[postgres@prod-odgpostgres ~]$ psql
psql.bin (9.6.2.7)
Type "help" for help.

postgres=#

Comments