一、官网链接安装
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 (PostgreSQL) 12.3