该步骤适用redhat7x64/centos7x64,其它系统未测试。
第1步:添加RPM源
#yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
yum install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-6-x86_64/pgdg-redhat-repo-42.0-11.noarch.rpm
PS:如果安装过程出现错误,或提示已加载,但是无法提示没有相关依赖包,则可以先清除yum缓存:
yum clean headers
yum clean packages
yum clean metadata
然后执行:yum install postgresql96
在安装的过程中可能会报错:
原因是无法获取到版本号,导致地址错误,我们需要将文件中的路径改下:
我的系统是redhat 7x64,所以是框起来的这个文件。
将文件中的“releasever”全部替换成Linux的版本,我的是版本7,那么就将releasever”全部替换成Linux的版本,我的是版本7,那么就将