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 閱讀(1353) 評論(0)  編輯  收藏 所屬分類: linuxdebianPostgres
          主站蜘蛛池模板: 余干县| 辽源市| 博乐市| 邢台市| 山东| 姜堰市| 永登县| 尤溪县| 合江县| 张掖市| 苗栗市| 宕昌县| 会泽县| 韩城市| 珠海市| 滕州市| 乐清市| 呼和浩特市| 巩义市| 永年县| 青神县| 进贤县| 芷江| 淮安市| 静海县| 武胜县| 拜城县| 中牟县| 宜州市| 托里县| 大洼县| 肇州县| 彭州市| 中江县| 鲁甸县| 云阳县| 上林县| 江口县| 卫辉市| 商河县| 淮北市|