在Centos 7上设置Postgresql-93
我随后在Centos 7上安装了postgresql和postgis,但在启动数据库时遇到了以下命令:在Centos 7上设置Postgresql-93,postgresql,centos,postgresql-9.3,Postgresql,Centos,Postgresql 9.3,我随后在Centos 7上安装了postgresql和postgis,但在启动数据库时遇到了以下命令: [root@localhost cmaps]# service postgresql-9.3 initdb The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please
[root@localhost cmaps]# service postgresql-9.3 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.
如果我从Centos repository(版本9.2)安装postgresql包,该命令可以运行,但我认为他们没有postgis,Centos 7也没有官方的posgresql-92存储库
知道发生了什么事吗
谢谢大家! CentOS 7基于systemd。PostgreSQL包对initdb使用不同的命令:
/usr/lib/pgsql-9.3/bin/postgresql93-setup initdb
在旧版本上,直接调用initscript
/etc/init.d/postgresql-9.3 initdb
我也有同样的问题,通过改变路径来解决
/usr/pgsql-9.3/bin/postgresql93-setup initdb
请注意,对于安装在Microsoft Azure平台上的Centos 7.3,路径不同。脚本位于
/usr/bin/postgresql-setup initdb
这些文件的名称中也没有版本号:
- 数据库数据和配置位置:
/var/lib/pgsql/data/
- 服务名称
或/sbin/service postgresql status
systemctl status postgresql.service