PostgreSQL安装配置

 本篇将介绍在PostgreSQL安装部署。

目录:

1.下载

2.Windows部署

3.CentOS部署

4.设置

5.参考资料

1.下载

  下载地址:http://www.postgresql.org/download/或者http://www.enterprisedb.com/products-services-training/pgdownload

2.Windows部署

  下载windows下的安装程序,执行安装(附带pgAdmin III)。

  默认端口5432,默认超级用户postgres/postgres。

3.CentOS部署

  3.1.Installer安装,下载linux下的安装程序,执行安装(附带pgAdmin III)。

  3.2.yum安装,

$ yum install postgresql-server 

  注:RHEL/CentOS/SL/OL 7          提供PostgreSQL版本:9.2

    RHEL/CentOS/SL/OL 6          提供PostgreSQL版本:8.4(also supplies package postgresql92)

  PostgreSQL高版本安装:

$ yum install http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-redhat94-9.4-1.noarch.rpm

$ yum install postgresql94-server postgresql94-contrib

$ service postgresql-9.4 initdb

$ chkconfig postgresql-9.4 on 

4.设置

 

  4.1.远程访问:

    配置文件:postgresql.conf

    listen_addresses = '*'

    文件:pg_hba.conf

    在该配置文件的host all all 127.0.0.1/32 md5行下添加以下配置或者修改:

    host    all    all    0.0.0.0/0    md5

 

    如果不希望允许所有IP远程访问,则可以将上述配置项中的0.0.0.0设定为特定的IP值。

  4.2.客户端:pgAdmin--PostgreSQL管理工具(http://www.pgadmin.org/)

5.参考资料

  http://www.postgresql.org/

 

posted @ 2016-02-15 17:32  Steven.Jiang  阅读(293)  评论(0编辑  收藏  举报