0
我的服務器是Debian的7,我使用PostgreSQL 9.3。爲什麼我的PostgreSQL沒有找到我的主機
這是我的hosts文件:
[email protected]:/etc# cat hosts
127.0.0.1 localhost.localdomian localhost
127.0.1.1 virtualserver.com virtualserver
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
而當我想啓動PSQL的一個新的控制檯:
[email protected]:/var/lib/postgresql/9.3/main# service postgresql restart
[ ok ] Restarting PostgreSQL 9.3 database server: main.
[email protected]:/var/lib/postgresql/9.3/main# sudo -u postgres psql
sudo: unable to resolve host localhost.localdomain
psql (9.3.0)
Type "help" for help.
你可以看到,機器不能找到localhsot.localdomain
。但我更改了根文件,並在我的/etc/hosts
文件中將其更正爲正確,然後重新啓動它。
在你的'hosts'它說'localdomian',應該是'localdomain'。 – vstm
它涉及到'/等/ host.conf',你應該改變'order'行'爲了主機,bind' – PersianGulf
這個問題似乎是題外話,因爲它是關於錯字錯 – user504909