`
aooboo
  • 浏览: 83350 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

linux下配置enterprisedb(posgresql)的远程访问

阅读更多

看那过一些帖子,感觉写的的不够全面,特摘录、总结如下:

 

linux下如何配置enterprisedb(posgresql),使其可被远程连接、访问?

 

postgresql默认不开启远程访问,配置远程访问涉及三个方面:

1.客户端认证

2.tcp/ip socket

3.防火墙

 

一、对7.x及更旧的posgresql版本

1. 要使Linux上的PostgreSQL打开tcp/ip socket。

    $POSTGRES/data/postgresql.conf 文件,将tcpip_socket=off改成tcpip_socket=on。

2. 设置远程访问认证机制。

    $POSTGRES/data/pg_hba.conf 文件,添加“host    all    all    10.10.29.0/24   md5”,容许10.10.29.0.1/24访问。

3. 设置防火墙规则。(直接关闭也行,只是生产中不推荐这样做)

    $etc/sysconfig/iptables文件,commit前添加如下,开放端口5432。

    -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5432 -j ACCEPT

    或者

    iptables -A INPUT -p tcp -s 0/0 --sport 1024:65535 -d 10.10.29.50  --dport 5432 -m state --state NEW,ESTABLISHED -j ACCEPT

    iptables -A OUTPUT -p tcp -s 10.10.29.50 --sport 5432 -d 0/0 --dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT

4. 重启db服务。

 

二、对8.x及更高的版本

 1.postgresql.conf中去掉了tcpip_socket设置,但需要设置listen_addresses='localhost',修改为listen_addresses='*'或者需要的ip地址。

 其他步骤与一、中相同。

 

参考资料:

http://www.learndiary.com/archives/diaries/1856.htm

http://www.douban.com/group/topic/1194814/

http://www.cyberciti.biz/tips/postgres-allow-remote-access-tcp-connection.html

 

0
0
分享到:
评论

相关推荐

    Enterprisedb

    It's open source of database. Introduction of Enterprisedb

    EnterpriseDB企业版Linux安装指南

    EDB是基于postgresql的基础上的数据库,但是可以兼容oracle语法。

    enterprisedb 安装包,part3

    enterprisedb 安装包,part1,总格part3,求过

    EnterpriseDB剑指Hadoop:优化数据处理

    EnterpriseDB剑指Hadoop:优化数据处理

    EnterpriseDB安装_64[归纳].pdf

    EnterpriseDB安装_64[归纳].pdf

    EnterpriseDB Oracle兼容性开发者指南.rar

    EnterpriseDB Oracle兼容性开发者指南

    edb connectors 8.4.5.18 for windows

    本程序为EnterpriseDB提供odbc及c#等开发环境的数据库访问接口,推荐在本网站搜索并下载下列扩展工具: Postgres Plus Advanced Server EnterpriseDB核心数据库安装包 edb postgres studio --EnterpriseDB和...

    enterprisedb 安装包,part2

    enterprisedb 安装包,part2,总格part3,求过

    EnterpriseDB产品及解决方案

    EnterpriseDB产品及解决方案PPT,搞点分啊

    EnterpriseDB_Oracle兼容性开发者指南

    不错的资料,非常详细的讲了Oracle向EnterpriseDB移植的很多关键问题

    Windows下Postgresql数据库的下载与配置方法

    http://www.enterprisedb.com/products-services-training/pgbindownload x86下载http://get.enterprisedb.com/postgresql/postgresql-9.2.4-1-windows-binaries.zip x64下载...

    edb postgres studio 9.0-1.12.2-4 for windows

    edb connectors --为EnterpriseDB提供odbc及c#等开发环境的数据库访问接口 edb migration studio --从其他主流DBMS将数据平滑迁移至EnterpriseDB的强大工具 edb edbplus --EnterpriseDB完全兼容Oracle sqlplus的...

    edb postgres studio 1.10.5-4 for windows

    edb connectors --为EnterpriseDB提供odbc及c#等开发环境的数据库访问接口 edb migration studio --从其他主流DBMS将数据平滑迁移至EnterpriseDB的强大工具 edb edbplus --EnterpriseDB完全兼容Oracle sqlplus的...

    edb edbplus 2.7-2

    EnterpriseDB是PostgreSQL的一个分支,在PostgreSQL基础上,... edb connectors --为EnterpriseDB提供odbc及c#等开发环境的数据库访问接口 edb migration studio --从其他主流DBMS将数据平滑迁移至EnterpriseDB的工具

    edb connectors 9.1.1.0-1 for windows

    本程序为EnterpriseDB提供odbc及c#等开发环境的数据库访问接口,推荐在本网站搜索并下载下列扩展工具: Postgres Plus Advanced Server EnterpriseDB核心数据库安装包 edb postgres studio --EnterpriseDB和...

    edb-migrationtoolkit-51.0.1-1-windows

    EnterpriseDB是PostgreSQL的一个分支,在PostgreSQL基础上,...edb connectors --为EnterpriseDB提供odbc及c#等开发环境的数据库访问接口 edb edbplus --EnterpriseDB完全兼容Oracle sqlplus的脚本界面,需安装jre环境

    edb-pgadmin4-3.0-2-windows-x64

    edb connectors --为EnterpriseDB提供odbc及c#等开发环境的数据库访问接口 edb migration studio --从其他主流DBMS将数据平滑迁移至EnterpriseDB的强大工具 edb edbplus --EnterpriseDB完全兼容Oracle sqlplus的...

    edb migration studio 6.8 for windows

    EnterpriseDB是PostgreSQL的一个分支,在PostgreSQL基础上... edb connectors --为EnterpriseDB提供odbc及c#等开发环境的数据库访问接口 edb edbplus --EnterpriseDB完全兼容Oracle sqlplus的脚本界面,需安装jre环境

    edb-connectors-10.0.3-1-windows-x64

    本程序为EnterpriseDB提供odbc及c#等开发环境的数据库访问接口,推荐在本网站搜索并下载下列扩展工具: Postgres Plus Advanced Server EnterpriseDB核心数据库安装包 edb postgres studio --EnterpriseDB和...

    Postgres Plus Advanced Server 9.4.4.9-1 windows-x64

    edb connectors --为EnterpriseDB提供odbc及c#等开发环境的数据库访问接口 edb migration studio --从其他主流DBMS将数据平滑迁移至EnterpriseDB的强大工具 edb edbplus --EnterpriseDB完全兼容Oracle sqlplus的...

Global site tag (gtag.js) - Google Analytics