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)  編輯  收藏 所屬分類: linuxdebianPostgres
          主站蜘蛛池模板: 确山县| 大方县| 天台县| 井冈山市| 潍坊市| 元氏县| 洛宁县| 庆城县| 嘉兴市| 枣阳市| 噶尔县| 盐池县| 阜新市| 崇明县| 阜宁县| 常熟市| 客服| 萨迦县| 海林市| 延庆县| 平谷区| 万山特区| 永川市| 东兰县| 淮北市| 秀山| 蒙城县| 台湾省| 虞城县| 北辰区| 宿迁市| 双峰县| 高邑县| 临猗县| 鱼台县| 罗城| 赤峰市| 阜新市| 台安县| 静安区| 醴陵市|