Enable remote access to PostgreSQL

user-pic
Vote 0 Votes

PostgreSQL 預設只 Listen locahost
編輯 postgresql.conf, 檔案的位置應該跟 datadir 一樣
listen_addresses = '*'

編輯 pg_hba.conf, 加入 trust host
host all all 192.168.0.0/24 trust

service postgresql restart

netstat -nlt 應該要有一行
tcp 0 0 0.0.0.0:5432 0.0.0.0:* LISTEN

How Do I Enable remote access to PostgreSQL database server?

若 PHP 要連 PostgreSQL,
需先裝 postgresql-devel 套件, 在編譯 configure 時加 --with-pgsql
就可以使用 pg* 的 PostgreSQL Functions

Leave a comment

About this Entry

This page contains a single entry by Pank published on April 7, 2010 5:59 PM.

Change Windows MTU was the previous entry in this blog.

TeraCopy is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.