PostgreSQL version:10
Linux system:centos7
安装在线源中 rpm:
yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
yum install postgresql10
安装server 组件:
yum install postgresql10-server
我的安装路径为/usr/pgsql-10
初始化PostgerSQL
postgresql-setup initdb
systemctl enable postgresql.service
systemctl start postgresql.service
设置开机自启动:
chkconfig postgresql-10 on
切换到 postgres用户 :
su postgres
创建mydb 数据库测试: