postgreSQL

centos 下安装 postgresql 

yum -y install postgresql-server  postgresql

数据库初始化

service postgresql initdb

开启数据库

service postgresql start

postgres 的配置文件路径

/var/lib/pgsql/data

初始化数据库集群

initdb -D /usr/local/pgsql/data  //使用 postgres用户来进行操作

也可以使用 pc_ctl 来进行操作 pg_ctl -D /usr/local/pgsql/data
原文地址:https://www.cnblogs.com/jkklearn/p/7511490.html