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
centos7service 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
搞定收工