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中List和ArrayList的区别(转)
    Java的JDBC事务详解(转)
    Java JDBC批处理插入数据操作(转)
    celery入门
    Python装饰器与面向切面编程
    python 中类方法@classmethod
    Virtualenv: 一个Python环境管理工具(windown版本)
    python操作excel之 模块 xlrd
    django多条件筛选搜索(项目实例)
    jQuery选择器总结
  • 原文地址:https://www.cnblogs.com/darkmatter/p/3605582.html
Copyright © 2011-2022 走看看