Centos7 安装Postgresql9.2

1添加RPM
#yum install -y http://download.postgresql.org/pub/repos/yum/9.2/redhat/rhel-7-x86_64/pgdg-centos92-9.2-3.noarch.rpm

2安装PostgreSQL
#yum install -y postgresql92-server postgresql92-contrib

3初始化数据库
#/usr/pgsql-9.2/bin/postgresql92-setup initdb

4设置开机自启动
#systemctl enable postgresql-9.2.service

5启动服务
systemctl start postgresql-9.2.service

参考:https://www.jianshu.com/p/bbb1b9e0b2c7

你可能感兴趣的:(Centos7 安装Postgresql9.2)