centos7 安装postgresql9.5时初始化的一个小坑

centos7安装9.5sql

之前我这样搞:centos

 

yum install https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-6-x86_64/pgdg-centos95-9.5-2.noarch.rpmpost

yum install postgresql95-server postgresql95-contrib
centos7

service postgresql-9.5 initdbspa

 

如今initdb时提示service posetgresql-9.5中没有那个命令了rest

[root@iZ23qoyw0byZ init.d]# service postgresql-9.5 initdb
The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions,please try to use systemctl.
[root@iZ23qoyw0byZ init.d]#

postgresql

通过折腾,发现须要这样orm

进入postgresq用户server

su postgresget

初始化:

/usr/pgsql-9.5/bin/initdb /var/lib/pgsql/9.5/data

搞定

service postgresql-9.5 start

搞定收工

相关文章
相关标签/搜索