所以,如何在centos7上運行initdb for postgresql 9.2?
我的管理員安裝(不知道如何)在centos7機器上的postgresql 9.2(64位版本)。事情是我需要initalize數據庫,所以我應該運行是這樣的:
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上運行initdb for postgresql 9.2?
您是否嘗試過'which initdb','locate initdb'或'find/usr -name initdb'?在Ubuntu上它位於'/ usr/lib/postgresql/9.2/bin/initdb'中;我不知道你可能會在Centos上找到它。 – 2014-09-03 15:51:43
@ MikeSherrill'CatRecall','initdb'找到'/ usr/bin/initdb'。但是,我無法在Internet上找到initdb可能位於此目錄中的任何信息。也許管理員以一種奇怪的方式安裝它。將嘗試重新安裝只是爲了確保。 – user1463822 2014-09-04 06:52:00