【问题标题】:Connecting to Oracle on a Vagrant box from OS X从 OS X 连接到 Vagrant box 上的 Oracle
【发布时间】:2012-05-05 12:10:31
【问题描述】:

我在运行 OS X Lion 的 CentOS 6 Vagrant box (VM) 上安装了 Oracle 10g。在 CentOS 上,我可以为 oracle 用户(不是 root)运行 sqlplus。我可以使用来自OS X 的 IP ping 我的 Vagrant 盒子,反之亦然。我还将端口 1521 从 CentOS 转发到 OS X 上的端口 1521。

我想在我的 OS X 上使用 SQLDeveloper 连接到我的 VM 上的 Oracle。我不断收到以下错误

状态:失败 - 测试失败:IO 错误:网络适配器无法建立连接

有什么问题吗?

【问题讨论】:

    标签: oracle10g centos osx-lion vagrant centos6


    【解决方案1】:

    我假设你的 Vagrant 文件中有这样的内容: config.vm.forward_port 1521, 1521

    那么你应该只需要: sqlplus system/manager@//localhost:1521/xe

    如果失败,请确保在虚拟机上启动 Oracle 侦听器。 (在虚拟机上做一个netstat -ln | grep 1521

    不要使用虚拟机 IP 地址连接到 Oracle。 Vagrant 使用 NAT,因此您应该无法 ping 虚拟机

    如果一切都失败了,使用这个: https://github.com/rjdkolb/vagrant-ubuntu-oracle-xe

    【讨论】:

      猜你喜欢
      • 2015-05-04
      • 2017-07-06
      • 2016-07-07
      • 1970-01-01
      • 2013-11-21
      • 2014-06-10
      • 1970-01-01
      • 2016-04-29
      • 2014-08-08
      相关资源
      最近更新 更多