#安装存储库RPM:
yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
# 安装PostgreSQL:
yum install -y postgresql12-server
#(可选)初始化数据库
/usr/pgsql-12/bin/postgresql-12-setup initdb
# 设置开机启动项
systemctl enable postgresql-12
systemctl start postgresql-12
网友评论