环境准备
系统版本:
Red Hat Enterprise Linux 7.1(与CentOS无差异)
软件版本:
postgresql12.2
postgre下载地址:
http://ftp.postgresql.org/pub/source/v12.2/postgresql-12.2.tar.bz2
注:
Linux平台10.5以后,因编译简单,postgre只提供源代码,可自行编译安装。另postgre官方提供了yum安装方式、 通过安装存储库直接yum安装postgre,代码如下
# Install the repository RPM:
# 安装rpm存储库:
sudo yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
# Install PostgreSQL:
# 安装 PostgreSQL: