文件中其他可以保持默认
Node
//安装ntp用来实现front-end和nod
yum install -y ntp
ntpdate pool.ntp.org
yum install -y Java-1.6.0-openjdk ant ant-nodeps dhcp bridge-utils perl-Convert-ASN1.noarch scsi-target-utils httpd
//Node需要安装xen并且配置xen允许通过HTTP从localhost控制hypervisor
yum install -y xen*
yum install -y kernel-xen*
sed --in-place 's/#(xend-http-server no)/(xend-http-server yes)/' /etc/xen/xend-config.sxp
sed --in-place 's/#(xend-address localhost)/(xend-address localhost)/' /etc/xen/xend-config.sxp
修改/etc/boot/grub.conf中的启动项,是其启动xen,重启节点。
//配置防火墙,port 8775必须打开,或者直接关闭防火墙
run system-config-securitylevel-tui
Select Security Level:Disable
Select OK;
/安装Eucalyptus,关于源码安装请参看Eucalyptus社区的文档
//创建/etc/yum.repos.d/euca.repo文件,文件内容如下:
[euca]
name=Eucalyptus
baseurl=http://www.eucalyptussoftware.com/downloads/repo/eucalyptus/$VERSION/yum/CentOS/
enabled=1
其中$VERSION文版本号,比如笔者所安装的版本为2.0.1,则将该字段替换为2.0.1
安装命令:
yum install eucalyptus-nc.$ARCH --nogpgcheck
//Post-Install Steps
在每台node节点上,查看/etc/libvirt/libvirtd.conf文件,确认一下行未被注释:
#unix_sock_group = "libvirt" => unix_sock_group = "libvirt"
#unix_sock_ro_perms = "0777" => unix_sock_ro_perms = "0777"
#unix_sock_rw_perms = "0770" => unix_sock_rw_perms = "0770"
//确保libvirt运行正常并可与hypervisor正常通信,在Node节点运行如下命令:
$: virsh list
如果上述命令的输出包括Domain-0,则配置正确。
配置/etc/eucalyptus/eucalyptus.conf文件
HYPERVISOR="xen"
VNET_PUBINTERFACE="xenbr1"
VNET_PRIVINTERFACE="xenbr1"
VNET_BRIDGE="xenbr1"
VNET_MODE="STATIC"
启动Eucalyptus
//front-end
/etc/init.d/eucalyptus-cloud start
/etc/init.d/eucalyputs-cc start
//Node
/etc/init.d/eucalyputs-nc start