centos6 安装postgreSQL

在postgresql官网找对最新版本:

https://www.postgresql.org/download/linux/redhat/
version:10
platform:centos6
architecture:x86_64
目录:/var/lib/pgsql/10


1、Install the repository RPM:
yum install https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-6-x86_64/pgdg-centos10-10-2.noarch.rpm
2、Install the client packages:
yum install postgresql10
3、Optionally install the server packages:
yum install postgresql10-server
4、 Optionally initialize the database and enable automatic start:
service postgresql-10 initdb
chkconfig postgresql-10 on
service postgresql-10 start

连接测试:

使用pgadmin4进行连接测试,查看下一篇





你可能感兴趣的:(postgresql)