看那过一些帖子,感觉写的的不够全面,特摘录、总结如下:
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
分享到:
相关推荐
It's open source of database. Introduction of Enterprisedb
EDB是基于postgresql的基础上的数据库,但是可以兼容oracle语法。
enterprisedb 安装包,part1,总格part3,求过
EnterpriseDB剑指Hadoop:优化数据处理
EnterpriseDB安装_64[归纳].pdf
EnterpriseDB Oracle兼容性开发者指南
本程序为EnterpriseDB提供odbc及c#等开发环境的数据库访问接口,推荐在本网站搜索并下载下列扩展工具: Postgres Plus Advanced Server EnterpriseDB核心数据库安装包 edb postgres studio --EnterpriseDB和...
enterprisedb 安装包,part2,总格part3,求过
EnterpriseDB产品及解决方案PPT,搞点分啊
不错的资料,非常详细的讲了Oracle向EnterpriseDB移植的很多关键问题
http://www.enterprisedb.com/products-services-training/pgbindownload x86下载http://get.enterprisedb.com/postgresql/postgresql-9.2.4-1-windows-binaries.zip x64下载...
edb connectors --为EnterpriseDB提供odbc及c#等开发环境的数据库访问接口 edb migration studio --从其他主流DBMS将数据平滑迁移至EnterpriseDB的强大工具 edb edbplus --EnterpriseDB完全兼容Oracle sqlplus的...
edb connectors --为EnterpriseDB提供odbc及c#等开发环境的数据库访问接口 edb migration studio --从其他主流DBMS将数据平滑迁移至EnterpriseDB的强大工具 edb edbplus --EnterpriseDB完全兼容Oracle sqlplus的...
EnterpriseDB是PostgreSQL的一个分支,在PostgreSQL基础上,... edb connectors --为EnterpriseDB提供odbc及c#等开发环境的数据库访问接口 edb migration studio --从其他主流DBMS将数据平滑迁移至EnterpriseDB的工具
本程序为EnterpriseDB提供odbc及c#等开发环境的数据库访问接口,推荐在本网站搜索并下载下列扩展工具: Postgres Plus Advanced Server EnterpriseDB核心数据库安装包 edb postgres studio --EnterpriseDB和...
EnterpriseDB是PostgreSQL的一个分支,在PostgreSQL基础上,...edb connectors --为EnterpriseDB提供odbc及c#等开发环境的数据库访问接口 edb edbplus --EnterpriseDB完全兼容Oracle sqlplus的脚本界面,需安装jre环境
edb connectors --为EnterpriseDB提供odbc及c#等开发环境的数据库访问接口 edb migration studio --从其他主流DBMS将数据平滑迁移至EnterpriseDB的强大工具 edb edbplus --EnterpriseDB完全兼容Oracle sqlplus的...
EnterpriseDB是PostgreSQL的一个分支,在PostgreSQL基础上... edb connectors --为EnterpriseDB提供odbc及c#等开发环境的数据库访问接口 edb edbplus --EnterpriseDB完全兼容Oracle sqlplus的脚本界面,需安装jre环境
本程序为EnterpriseDB提供odbc及c#等开发环境的数据库访问接口,推荐在本网站搜索并下载下列扩展工具: Postgres Plus Advanced Server EnterpriseDB核心数据库安装包 edb postgres studio --EnterpriseDB和...
edb connectors --为EnterpriseDB提供odbc及c#等开发环境的数据库访问接口 edb migration studio --从其他主流DBMS将数据平滑迁移至EnterpriseDB的强大工具 edb edbplus --EnterpriseDB完全兼容Oracle sqlplus的...