我剛剛根據官方documentation: 安裝postgresql但由於某種原因,它不起作用。它確實使用sudo apt-get postgres進行安裝......等等。但服務器的啓動似乎不起作用。PostgreSQL「無法訪問服務器配置文件(...)沒有這樣的文件或目錄」乾淨的安裝後
我試圖根據他們的documentation啓動服務器,但先生。輸入此命令時,計算機會引發下面的錯誤我的頭:
命令:
[email protected]:/usr/lib/postgresql/9.4$ bin/postgres -D /usr/local/pgsql/data/
錯誤:
postgres cannot access the server configuration file "/usr/local/pgsql/data/postgresql.conf": No such file or directory"
我不知道爲什麼這個文件不存在。任何人都可以幫助我找出如何通過這個錯誤信息並讓我的postgres服務器啓動並運行?
你確定這個文件位於那個目錄嗎?試試'sudo updatedb'然後'找到postgresql.conf' –
當你自編PostgreSQL時,'/ usr/local/pgsql/...'磁盤佈局就是默認值。它不適用於Debian/Ubuntu軟件包。請參閱https://wiki.debian.org/PostgreSql。 –
如果您安裝了Debian/Ubuntu軟件包,該文件通常位於/ etc/postgresql中。 –