1. 修改 ${postgres_install}/data/postgresql.conf
將listen_address = 'localhost' 改為 listen_address = '*'
2. ${postgres_install}/data/pg_hba.conf
在文件最后加入:
host all all 192.168.1.0/24 password
3. 重新啟動數(shù)據(jù)庫
${postgres_install}/bin/pg_ctl stop -D ${postgres_install}/data
${postgres_install}/bin/postmaster -i -D ${postgres_install}/data>logfile 2>&1 &
4. 這樣就可以遠程訪問數(shù)據(jù)庫了,如下邊的命令:
$ psql -h 192.168.1.216 -p 5432
參照http://blog.chinaunix.net/u2/60913/showart_1213003.html
posted on 2009-07-24 10:37
冰是沒有未來的,因為它的永恒 閱讀(907)
評論(0) 編輯 收藏