[1]添加源
編輯/etc/apt/sources.list,在文件后面添加如下內容
## postgres 8.3
deb http://www.backports.org/debian etch-backports main contrib non-free
[2] aptitude update
[3]aptitude search postgres | grep 8.3
列出所有的postgresql 8.3版本的相關包,根據自己的需要安裝 server /client 就可以了
[4]配置其他的用戶的連接授權
默認,只能在postgres用戶下連接,如果想在其他的用戶下面也能連接,需要作一下配置
# vim /etc/postgresql/8.3/main/pg_hba.conf
修改如下部分
?80 # IPv4 local connections:
?81 host??? all???????? all???????? 127.0.0.1/32??????????? trust
?82 host??? all???????? all???????? 192.168.1.0/24????????? trust
#? /etc/postgresql/8.3/main/postgresql.conf
修改如下部分
?56 #listen_addresses = 'localhost'???????? # what IP address(es) to listen on;
?57 listen_addresses = '*'????????? # what IP address(es) to listen on;
[5]啟動postgresql服務
# /etc/init.d/postgresql-8.3 start
[6] 在其他的用戶測試連接就可以了
??? $psql -U postgres? template1
如果能連上,就表示ok了。
|----------------------------------------------------------------------------------------|
版權聲明 版權所有 @zhyiwww
引用請注明來源 http://www.tkk7.com/zhyiwww
|----------------------------------------------------------------------------------------|
posted on 2009-03-18 17:14
zhyiwww 閱讀(1351)
評論(0) 編輯 收藏 所屬分類:
linux 、
debian 、
Postgres