2008年9月26日 星期五

PostgreSQL--(二)Server配置&建立資料庫

1. 允許本機以外的遠端登入連線
$> vi postgresql.conf
listen_addresses = '*'
2. 遠端登入資料庫的權限控制
$> vi pg_hba.conf
host all all 192.168.x.0/24 trust

3. 建立使用者帳號
$> createuser -s -l -P -e yardmgr
-s:be superuser -l:be allowed to log in -P:specify password -e:echo message
4. 建立資料庫
$> createdb -O yardmgr -e pyarddb
gt; createdb -O yardmgr -e pyarddb
-O:specify user own the new database -e:echo message

沒有留言: