Home >Database >Mysql Tutorial >【解决方案】连接到Fedora 14上的Oracle数据库服务器

【解决方案】连接到Fedora 14上的Oracle数据库服务器

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 17:01:071217browse

最近在Fedora 14上安装了Oracle 11gR1,从本机上可以正常连接到数据库,但从其他主机上却无法建立连接。后来发现是防火墙的原因。

最近在Fedora 14上安装了Oracle 11gR1,从本机上可以正常连接到数据库,,但从其他主机上却无法建立连接。
后来发现是防火墙的原因。

首先,终端中执行如下命令:service iptables stop

然后,需要开放oracle连接端口:
配置/etc/sysconfig/iptables文件
  vim /etc/sysconfig/iptables

  1 # Firewall configuration written by system-config-firewall
  2 # Manual customization of this file is not recommended.
  3 *filter
  4 :INPUT ACCEPT [0:0]
  5 :FORWARD ACCEPT [0:0]
  6 :OUTPUT ACCEPT [0:0]
  7 -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
  8 -A INPUT -p icmp -j ACCEPT
  9 -A INPUT -i lo -j ACCEPT
 10 -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
 11 -A INPUT -m state --state NEW -m tcp -p tcp --dport 1521:1523 -j ACCEPT
 12 #-A INPUT -j REJECT --reject-with icmp-host-prohibited
 13 -A FORWARD -j REJECT --reject-with icmp-host-prohibited
 14 COMMIT

第12行为源文件中的内容,将其替换为11行的内容。

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn