集群安装,是在一台机子上,用本机ubuntu12.04当作master,启动两台虚拟机ubuntu12.04作为slave001和slave002,虚拟机使用KVM(KVM在ubuntu上的表现是集中虚拟机产品中比较好的)。
master:192.168.1.10
slave001:192.168.1.246
slave002:192.168.1.249
首先在主机上设置桥接上网,设置过程为:
主机上sudo gedit /etc/network/interfaces,修改文件设置网桥//前提是你的eth0在edit connection中已经设置好,不要在interfaces文件中去设置eth0,会出问题的。文件内容如下:
auto lo
iface lo inet loopback
# The primary network interface
auto br0
iface br0 inet static
address 192.168.1.10
netmask 255.255.255.0
gateway 192.168.1.1
bridge_ports eth0