如何从主机(windows)访问 VirtualBox 中的 Oracle DB

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6117610/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 03:18:29  来源:igfitidea点击:

How to access Oracle DB in VirtualBox from Host (windows)

oraclenetworkingvirtualbox

提问by ABX

I installed VirtualBox with a Oracle VM.

我用 Oracle VM 安装了 VirtualBox。

Now I simply try to access the Oracle Database of the VM from the host environment, but it doesn't work.

现在我只是尝试从主机环境访问 VM 的 Oracle 数据库,但它不起作用。

ipconfig on my host shows an IP number, but when I try to open this (Port 80), i get the content of localhost of the host system instead of the content of the server in the VirtualBox.

我主机上的 ipconfig 显示一个 IP 号,但是当我尝试打开它(端口 80)时,我得到了主机系统的 localhost 的内容,而不是 VirtualBox 中服务器的内容。

Which is the proper network setting ?

哪个是正确的网络设置?

采纳答案by baraboom

I usually do a bridged connection so the vm will pick up an ip address from my router's dhcp; if that option is not available, your other option is to employ port forwarding where you assign an unused port on the host machine to forward to the port on the vm. The virtual box manual has a lot of useful info on both of these options. Let us know if you need additional info or examples.

我通常使用桥接连接,以便虚拟机从路由器的 dhcp 中获取 IP 地址;如果该选项不可用,您的另一个选择是使用端口转发,您可以在主机上分配一个未使用的端口以转发到虚拟机上的端口。虚拟盒子手册有很多关于这两个选项的有用信息。如果您需要其他信息或示例,请告诉我们。

回答by Kerem Baydo?an

- Use Host-Only Networking on your guest machine

- 在您的来宾机器上使用 Host-Only Networking

enter image description here

在此处输入图片说明

- See if the server (WEB, DB etc.) is running.

- 查看服务器(WEB、DB 等)是否正在运行。

enter image description here

在此处输入图片说明

- Mouse-over network icon on status bar to note ip address

- 将鼠标悬停在状态栏上的网络图标上以记录 IP 地址

enter image description here

在此处输入图片说明

- From your host browser send a request to your quest server

- 从您的主机浏览器向您的任务服务器发送请求

enter image description here

在此处输入图片说明

回答by Ashok Vemulapalli

Turn off the Windows Firewall on the Virtual PC. I've just fixed my HTTP request from Host to VM by turning off the firewall.

关闭 Virtual PC 上的 Windows 防火墙。我刚刚通过关闭防火墙修复了从主机到虚拟机的 HTTP 请求。