Difference between revisions of "Install PostGreSQL Client in Linux CentOS 7"
Jump to navigation
Jump to search
(Created page with "== Purpose == We want our CentOS 7 machine act as database client and can access a PostGreSQL database. == Install PostGreSQL Client == <pre> [root@gejoreuy ~]# yum install...") |
|||
| Line 8: | Line 8: | ||
[root@gejoreuy ~]# yum install https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-redhat10-10-2.noarch.rpm | [root@gejoreuy ~]# yum install https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-redhat10-10-2.noarch.rpm | ||
[root@gejoreuy ~]# yum install postgresql10 | [root@gejoreuy ~]# yum install postgresql10 | ||
| + | </pre> | ||
| + | |||
| + | == How to Access PostGreSQL DB == | ||
| + | |||
| + | <pre> | ||
| + | [root@gejoreuy ~]# psql -h database_hostname -p port_number -d database_name -U user_name | ||
</pre> | </pre> | ||
Revision as of 14:57, 20 January 2020
Purpose
We want our CentOS 7 machine act as database client and can access a PostGreSQL database.
Install PostGreSQL Client
[root@gejoreuy ~]# yum install https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-redhat10-10-2.noarch.rpm [root@gejoreuy ~]# yum install postgresql10
How to Access PostGreSQL DB
[root@gejoreuy ~]# psql -h database_hostname -p port_number -d database_name -U user_name