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 閱讀(1354) 評論(0)  編輯  收藏 所屬分類: linuxdebianPostgres
          主站蜘蛛池模板: 阳高县| 武强县| 新昌县| 治多县| 兴安县| 旬阳县| 开封县| 临武县| 特克斯县| 灵武市| 区。| 井陉县| 永善县| 永平县| 囊谦县| 衡东县| 锡林郭勒盟| 大田县| 西青区| 岗巴县| 连城县| 娄底市| 通渭县| 宁武县| 宜丰县| 吴堡县| 宁晋县| 安丘市| 贡觉县| 延安市| 寿宁县| 哈尔滨市| 施甸县| 黄陵县| 泸水县| 宜良县| 定陶县| 鄄城县| 大石桥市| 洱源县| 合川市|