源码在CentOS上安装Eucalyptus完整步骤及部分问题解决方法

第一步:下载Eucalyptus源码,地址在这里

eucalyptus下载版本为offline版本,下载依赖包

第二步:在/root下创建一个自己的文件夹

cd /root

mkdir  bupt

将下载的源码上传至文件夹bupt

第三步:开始安装(基本按照官网的说明)

1、确认是否安装xen,及服务是否正常(CentOS安装时自带xen)在nc节点和cc节点都要测试

       xm list

      结果如下就说明正确

     Name                                      ID Mem(MiB) VCPUs State   Time(s)
     Domain-0                                   0     1721     1 r-----   1

2、先安装一些必备的内容,C ,java之类的编译器,官网已经给出安装的命令,直接执行即可

    yum install -y java-1.6.0-openjdk-devel ant ant-nodeps libvirt-devel curl-devel httpd httpd-devel apr-devel openssl-devel dhcp libxml2 libxml2-devel gnutls gnutls-devel xen-devel libgcrypt-devel zlib-devel perl-Convert-ASN1 perl-Crypt-OpenSSL-RSA perl-Crypt-OpenSSL-Random chkfontpath scsi-target-utils fuse-libs swig gcc

出现错误如下:

Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=addons error was
[Errno 4] IOError: <urlopen error (-3, '\xe5\x9f\x9f\xe5\x90\x8d\xe8\xa7\xa3\xe6\x9e\x90\xe6\x9a\x82\xe6\x97\xb6\xe5\xa4\xb1\xe8\xb4\xa5')>
Error: Cannot find a valid baseurl for repo: addons


解决办法:

修改/etc/rasolv.conf文件中的dns

之后出现错误如下:


Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Setting up Install Process
No package java-1.6.0-openjdk-devel available.
No package ant available.
No package ant-nodeps available.
No package libvirt-devel available.
No package httpd-devel available.
No package apr-devel available.
No package dhcp available.
No package gnutls-devel available.
No package xen-devel available.
No package perl-Crypt-OpenSSL-RSA available.
No package perl-Crypt-OpenSSL-Random available.
No package scsi-target-utils available.
No package fuse-libs available.
Nothing to do

解决办法:

但是发现自己的问题是因为源配置出问题了,重新下载一个CentOS-Base.repo,即可

特别是在教育网内,无法下载外网的资源,所以在这要使用代理服务器

3、设置版本环境变量export VERSION=2.0.2

     按照官网说明一步步安装即可

4、安装完成后,执行$EUCALYPTUS/etc/init.d/eucalyptus-cloud start


     运行结果如下:

   error:EBS is enabled and vblade is not found.

   原因:因为在安装eucalyptus之前没有安装vblade包,在官网的开始进行了说明


For persistent dynamic block storage (aka EBS) to work, the front end will need to have the following software packages installed:
lvm2 package (e.g., command lvm should work)
aoetools package. The aoe module needs to be loaded on the front end as well as all nodes (modprobe aoe). If your kernel does not have ATA-over-Ethernet support, you will have to add that.
vblade package
      所以我必须先下载一个vblade的安装包,然后查看安装包中的readme文件,查看如何安装此包,安装完后再运行上述命令就正确了,但是这样又出现一个新的问题,在node节点上运行:


   $EUCALYPTUS/etc/init.d/eucalyptus-nc start

  出现:eucalyptus  not configred.


解决办法:

查看vi /opt/eucalyptus/etc/eucalyptus/eucalyptus.conf

修改EUCALYPTUS="/opt/eucalyptus"

         HYPERVISOR="xen"

查看前段节点的配置文件NODES处是否有NC的ip地址

执行su eucalyptus -c "virsh list"后,出现问题如下:

错误:连接到管理程序失败,

后修改配置文件,重新启动即可,修改文件如下:


make sure that your xend-config.sxp file is setup correctly. Go to:

/etc/xen/xend-config.sxp

 

These are the recommended settings:(粗体是需要修改的,其他未默认)

 

(xend-http-server yes)

(xend-unix-server yes)

(xend-unix-path /var/lib/xend/xend-socket)

(xend-address localhost)

(network-script network-bridge)

(vif-script vif-bridge)

(dom0-min-mem 196)

(dom0-cpus 0)

(vncpasswd '')

 

2)Configuring ibvirt

vi /etc/libvirt/libvirtd.conf

 

unix_sock_group = “libvirt”

unix_sock_ro_perms = “0777”

unix_sock_rw_perms = “0770”

 

[root@node1]# /etc/init.d/libvirtd start

重新启动xend即可


[root@localhost eucalyptus-2.0.2]# su eucalyptus -c "virsh list"
 Id 名称               状态
----------------------------------
  0 Domain-0             running

相关推荐