所以,
我的管理员在 centos7 机器上安装(不知道如何)postgresql 9.2(64 位版本)。问题是我需要初始化数据库,所以我应该运行类似的东西:
service postgresql-9.2 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 7 机器中并不存在每个给定的位置。
例如这个位置(是的,它适用于 9.3,我使用 9.2,但类似的位置无论如何都不存在):
/usr/lib/pgsql-9.3/bin/postgresql93-setup initdb
或这个
/usr/pgsql-9.3/bin/postgresql93-setup initdb
我发现
/usr/lib64/pgsql
但是这个目录只有一堆'*.so'文件。
我到底如何在 centos7 上为 postgresql 9.2 运行 initdb?