centos只安装postgresql客户端psql

5,201 阅读1分钟

一、找到官网链接后安装

yum install https://download.postgresql.org/pub/repos/yum/12/redhat/rhel-7.12-x86_64/postgresql12-libs-12.3-5PGDG.rhel7.x86_64.rpm

二直接安装

先安装yum源
# Install the repository RPM:
yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
#再安装客户端
yum install postgresql12

安装后:

# psql -V
psql (PostgreSQL) 12.3