1、软件包准备
需要在官网下载以下四个软件包:
postgresql12-libs-12.3-1PGDG.rhel6.x86_64.rpm
postgresql12-12.3-1PGDG.rhel6.x86_64
postgresql12-server-12.3-1PGDG.rhel6.x86_64.rpm
postgresql12-contrib-12.3-1PGDG.rhel6.x86_64.rpm
2、postgre安装
本次实验使用的环境是 Red Hat Enterprise Linux Server release 6.4
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.4 (Santiago)
rpm包安装比较简单,需要按照以下顺序进行安装
rpm -ivh postgresql12-libs-12.3-1PGDG.rhel6.x86_64.rpm
rpm -ivh postgresql12-12.3-1PGDG.rhel6.x86_64.rpm
rpm -ivh postgresql12-server-12.3-1PGDG.rhel6.x86_64.rpm
rpm -ivh postgresql12-contrib-12.3-1PGDG.rhel6.x86_64.rpm
可能会缺以下依赖包,yum安装一下
yum -y install libicu
yum -y install libxslt
在安装的时候可能会出现openssl相关报错
# rpm -ivh postgresql12-libs-12.3-1PGDG.rhel6.x86_64.rpm
warning: postgresql12-libs-12.3-1PGDG.rhel6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 442df0f8: NOKEY
error: Failed dependencies:
libcrypto.so.10(libcrypto.so.10)(64bit) is needed by postgresql12-libs-12.3-1PGDG.rhel6.x86_64
libssl.so.10(libssl.so.10)(64bit) is needed by postgresql12-libs-12.3-1PGDG.rhel6.x86_64
[root@mysql ~]# ldconfig -p | grep libcrypto.so
libcrypto.so.10 (libc6,x86-64) => /usr/lib64/libcrypto.so.10
查看openssl包提供的功能
# rpm -q --provides openssl
config(openssl) = 1.0.0-27.el6
lib4758cca.so()(64bit)
libaep.so()(64bit)
libatalla.so()(64bit)
libcapi.so()(64bit)
libchil.so()(64bit)
libcrypto.so.10()(64bit)
libcswift.so()(64bi