1. 打开官网
https://www.postgresql.org/
2. 点击download

3. 选择版本类型
根据实际情况选择你的目标主机类型,我的是Centos,所以选择Red Hat.

4. 选择系统配置
选择后会生成对象人rpm文件地址。

5. 安装rpm
复制rpm命令,在系统下执行,保证主机有联网。提示输入: y
yum install https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm
</