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.blogjava.net/zhyiwww   
|----------------------------------------------------------------------------------------|
posted on 2009-03-18 17:14 zhyiwww 阅读(1335) 评论(0)  编辑  收藏 所属分类: linuxdebianPostgres

只有注册用户登录后才能发表评论。


网站导航: