DEV Community

jerry80409
jerry80409

Posted on

1 4

Yum Install Postgres 11 client

CentOS 7

# -U Upgrade 
# -v Show verbose stdout
# -h Show hash marks
rpm -Uvh https://yum.postgresql.org/11/redhat/rhel-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
Enter fullscreen mode Exit fullscreen mode

Install PostgreSQL Client

# -y Always answer yes for all questions
# and clean cached package
yum -y install postgresql11 && yum clean
Enter fullscreen mode Exit fullscreen mode

Check psql command

psql --version
psql (PostgreSQL) 11.5
Enter fullscreen mode Exit fullscreen mode

Connect your Postgres database

# $PG_HOST: Hostname of Postgres
# $PG_PORT: Default is 5432
# $PG_USER: User of Postgres
psql -h $PG_HOST -p $PG_PORT -U $PG_USER
Password for user wms: # enter the password
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay