zoukankan      html  css  js  c++  java
  • 在HyperV中安装和配置Ubuntu Server 11.04 10.10

    背景

    Ubuntu Linux已经发布了11.04版本,目前能够在Windows Hyper-V中高效运行的Ubuntu已经有2个release了(11.04和10.10)。由于Ubuntu Server的内核中已经编译了Hype-V IC的模块,因此只需要在经过简单的配置,使kernel在启动时加载Hyper-V IC module就可以高效运行了。

    下载安装介质

    Ubuntu Linux的11.04和10.10,只有Server版中才包括Hyper-V IC的模块,因此需要下载Ubuntu Server版的安装ISO:
    http://releases.ubuntu.com/11.04/ubuntu-11.04-server-amd64.iso
    http://releases.ubuntu.com/10.10/ubuntu-10.10-server-amd64.iso

    安装过程

    1. 在Hyper-V中为安装Ubuntu Server建立VM,1-4个CPU,内存512MB以上,网卡,设置从已下载的Ubuntu安装ISO启动。

    如果无法出现初始化虚拟机的提示,请打上Windows Server 2008 R2 SP1的补丁(windows6.1-KB976932-X64.exe)。下载地址:http://www.microsoft.com/downloads/zh-cn/details.aspx?displaylang=zh-cn&FamilyID=c3202ce6-4056-4059-8a1b-3a9b77cdfdda

    2. 安装正常步骤安装Ubuntu Server
    3. 安装结束后在编辑Ubuntu Server中的文件/etc/initramfs-tools/modules,在文件末尾添加配置行:
    hv_vmbus
    hv_storvsc
    hv_blkvsc
    hv_netvsc
    4. 运行update-initramfs,并reboot系统
    # update-initramfs –u
    # reboot
    5. Ubunut再次启动后已经是Hyper-V IC生效(enable)了,可以使用lsmod命令进行验证:
    # lsmod | grep hv_vmbus
    hv_vmbus 50431 4 hv_utils,hv_netvsc,hv_blkvsc,hv_storvsc
    6.设置IP、网关、掩码等。vi /etc/network/interfaces,添加以下内容:
    使用静态IP:
    iface eth0 inet static
    address 192.168.83.200
    netmask 255.255.255.0
    gateway 192.168.83.2
    auto eth0
    使用DHCP:
    auto eth0
    iface eth0 inet dhcp
    7.添加DNS,vi /etc/resolv.conf(可能要新建),添加以下内容:
    nameserver 192.168.83.2
    8.重新启动网络:
    /etc/init.d/networking restart

    我们一起看看怎么样在Ubuntu 12.04 LTS Server版中配置自己的DNS服务器吧!

    首先我们需要创建一个文件/etc/resolvconf/resolv.conf.d/tail:

    #vim /etc/resolvconf/resolv.conf.d/tail

    然后我们在这个文件里写入自己要添加的DNS服务器,格式与以前的/etc/resolv.conf文件一致:

    nameserver 8.8.8.8
    nameserver 8.8.4.4

    然后输入wq保存退出。接下来我们重启下resolvconf程序,让配置生效:

    #/etc/init.d/resolvconf restart

    再去看看/etc/resolv.conf文件,自己添加的DNS服务器果然乖乖的写进去了!至此问题完美解决!

    在12.04 也可以采用更简单的方法:

    auto eth0
    iface eth0 inet static 
    address 192.168.1.2 
    gateway 192.168.1.1
    network 192.168.1.0 
    broadcast 192.168.1.255
    dns-nameservers 8.8.8.8 8.8.4.4

  • 相关阅读:
    Elementary Methods in Number Theory Exercise 1.2.25
    Elementary Methods in Number Theory Exercise 1.2.14
    图解欧几里德算法
    图解欧几里德算法
    Elementary Methods in Number Theory Exercise 1.2.14
    Android中的长度单位详解(dp、sp、px、in、pt、mm)
    分享下多年积累的对JAVA程序员成长之路的总结
    android异常之都是deamon惹的祸The connection to adb is down, and a severe error has occured.
    TomatoCartv1.1.8.2部署时报错
    JavaScript浏览器对象之二Document对象
  • 原文地址:https://www.cnblogs.com/dyj057/p/2415937.html
Copyright © 2011-2022 走看看