zhyiwww
          用平實的筆,記錄編程路上的點點滴滴………
          posts - 536,comments - 394,trackbacks - 0
          [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.aygfsteel.com/zhyiwww   
          |----------------------------------------------------------------------------------------|
          posted on 2009-03-18 17:14 zhyiwww 閱讀(1365) 評論(0)  編輯  收藏 所屬分類: linuxdebian 、Postgres
          主站蜘蛛池模板: 荣昌县| 上饶县| 兰考县| 大城县| 龙泉市| 贺兰县| 达尔| 溆浦县| 六盘水市| 五大连池市| 内黄县| 张家界市| 台北市| 三都| 桐城市| 安图县| 晋城| 河津市| 辽源市| 安远县| 巨鹿县| 朝阳市| 苗栗市| 清新县| 广丰县| 葵青区| 浦县| 黔西| 米易县| 通化市| 龙川县| 双鸭山市| 和政县| 青神县| 曲麻莱县| 淮北市| 遂平县| 蓝田县| 南皮县| 康平县| 炉霍县|