0

我有一个要求,我需要在通过 VM 安装在 Windows 服务器内的 Ubuntu 上设置 PMA。我已经安装了它,它在 Ubuntu 中运行良好。但我想使用 phpMyAdmin 和来自 LAN 网络不同系统的其他应用程序。

我已经配置了启用站点的默认文件,但我无法从不同的系统访问它。它在 Windows 上显示了两个 ip 地址,它显示1.2.3.4为虚拟框的 ip 地址,当我看到 Ubuntu 的网络设置时,它显示5.6.7.8为它的 ip 地址。

现在的问题是,当我使用1.2.3.4ip 地址时,它显示的是安装在 Windows 上的 IIS 服务器,当我在启用的站点中配置默认​​文件时,5.6.7.8我只能在 Ubuntu 中使用它,而不是在其他系统中,甚至在 Windows 中安装 Ubuntu 的服务器。

请提出任何解决方案

4

1 回答 1

0

首先禁用 IIS,因为它使用端口 80,这与 VM 内的 apache 使用的端口相同。

其次查看 NAT 配置并确保您从 VM 导出端口 80 作为主机的端口 80。

第三,您可能想使用Vagrant它,它是一个 VirtualBox 命令行 VM 管理器,有很多花里胡哨。如果您想尝试Vagrant,我会发布一个Vagrantfile,这样您就可以快速开始。

流浪文件

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant::Config.run do |config|
    #     Specify the virtual machine base box file. This box file
    # is actually a compressed VMDK file with some aditional
    # settings.
    #     The one specified here is a default Ubuntu Lucid Lynx
    # 32bit install but you can find many others online. The url is
    # external (HTTP) because Vagrant cand download this box if you
    # don't already have it
    config.vm.box = "MyVM"
    config.vm.box_url = "http://files.vagrantup.com/lucid32.box"

    #     Tells VirtualBox to not open a GUI, it helps you avoid 
    # having a window for VirtualBox and another window for the VM.
    #     For server management windows are not necessary you can
    # connect to the VM using SSH (putty for example).
    config.vm.boot_mode = :headless

    #     In this section every pair of parameters is a VBoxManage
    # parameter/value configuration.
    config.vm.customize [
        "modifyvm", :id, 

        #     Specify the virtual machine name you want to see in
        # VirtualBox
        "--name", "MyVM",

        #     Memory for the VM
        "--memory", "2048",

        #     This fixes a bug that makes the guest not have DNS
        # proper access and implicitly not internet.
        "--natdnsproxy1", "on",
        "--natdnshostresolver1", "on"
    ]

    #     This forwards port 80 to port 4567
    config.vm.forward_port 80, 4567

    #     This mounts a shared folder between your machine and the
    # VM. The host directory is the current working directory (the
    # one you have put your Vagrantfile in). The directory is
    # mounted inside the guest as /vagrant
    config.vm.share_folder "v-root", "/vagrant", "."
end
于 2013-01-11T10:22:52.710 回答