zoukankan      html  css  js  c++  java
  • Build VM Cluster on CentOS Host

    Host Machine

    [root@bocoty49 ~]# lsb_release -a

    LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch

    Distributor ID: CentOS

    Description: CentOS release 6.4 (Final)

    Release: 6.4

    Codename: Final

    VirtualBox

    AMD64 version of "Oracle Linux 6("OL6")/Red Hat Enterprise Linux 6("RHEL6")/CentOS 6" on download page of VirtualBox website

    File name: VirtualBox-4.3-4.3.8_92456_el6-1.x86_64.rpm

    Vagrant

    CentOS/RedHat/Fedora 64-bit Vagrant Installer on Vagrant download page

    File name: vagrant_1.4.3_x86_64.rpm

    Usage

    1. Install Virtualbox and vagrant;

    2. When 'vagrant up', a "vboxdrv kernel module is not loaded" error raise,

    The "Release" of yum info kernel-headers is "431.5.1.el6", which mismatched the result of uname -r(2.6.32-358.23.2.el6.x86_64), so kernel-headers package is unavailable to the current kernel. The solution is update the kernel release to match the packages:

    # yum update    (this will install kernel-2.6.32-431.5.1.el6.x86_64)
    
    # reboot (after reboot `uname -r` returns "2.6.32-431.5.1.el6.x86_64", too)
    
    # yum install gcc
    
    # yum install kernel-devel
    
    # /etc/init.d/vboxdrv setup  (Recompiling VirtualBox kernel modules)
    
    1. vagrant up again.

    The network for the VM is "bvtserver.vm.network :public_network", which is suspent when configuring the network. I change the type of network to "host-only":

    production.vm.network "private_network", ip: "192.168.50.5",
    
        virtualbox__intnet: "gcptest-network"
    

    Now you can use ssh between each other via host-only NIC, and use apt-get to install packages via NAT NIC, so cool!

  • 相关阅读:
    java中用spring实现数组类型输出
    #科委外文文献发现系统——导出word模板1.0
    #科委外文文献发现系统——项目管理
    终审项目展示
    M2事后会议报告
    【Beta版本发布】爬虫队长装备全面更新!
    Beta版本测试报告
    Beta阶段爬取数目预估
    团队作业Week14——源代码管理
    Daily Scrum NO.10
  • 原文地址:https://www.cnblogs.com/darkmatter/p/3606758.html
Copyright © 2011-2022 走看看