Cloudstack 4.2 安装文档.docx_第1页
Cloudstack 4.2 安装文档.docx_第2页
Cloudstack 4.2 安装文档.docx_第3页
Cloudstack 4.2 安装文档.docx_第4页
Cloudstack 4.2 安装文档.docx_第5页
已阅读5页,还剩3页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Cloudstack 4.2安装文档本机IP: 01 子网掩码:网关:1.Management Server安装1.1环境配置a).设置cloudstack源:vim /etc/apt/sources.list.d/cloudstack.list 添加本地源deb 11/ubuntuprecise4.2 deb 11management/ 说明:第一行的源是cloudstack源码,包含management,agent,common等 第二行的源是安装server可能需要的一些依赖包,如 libvirt mysql python libvirt qemu等b).设置Public keywget -O - http:/cloudstack.apt-get.eu/release.asc|apt-key add -c).updateapt-get updated).查看主机名是否完整hostname -fqdn#ubuntue).确定可联网ping f).安装时间服务器apt-get install openntpd1.2 cloudstack management server安装a).安装 managementapt-get install cloudstack-mangagement#安装过程中可能会在线下载一些包b).配置vhd-util 下载vhd-utl并放到放到指定目录wget /tools/vhd-util# 下载后将其移动到制定目录mv vhd-util /usr/share/cloudstack-common/scripts/vm/hypervisor/kvm2.Mysql安装a).Mysql 安装apt-get install mysql-server#安装过程中mysql密码设为:cloudstack,后面配置会用到b).修改配置文件 /etc/mysql/fvim /etc/mysql/f 在 mysqld 中第一行添加innodb_rollback_on_timeout=1innodb_lock_wait_timeout=600max_connections=350log-bin=mysql-binbinlog-format = ROWc).重启服务service mysql restartd).初始化数据库cloudstack-setup-databases cloud:cloudstacklocalhost -deploy-as=root:cloudstack -e file -m cloudstack -k cloudstack -i 01e).编辑/etc/sudoersvim /etc/sudoers #添加Defaults:cloud !requirettyf).数据库配置完毕,最终设置cloudstack-setup-management可以看到“CloudStack Management Server setup is done.”3.配置NFS共享a).安装NFSapt-get install nfs-common nfs-kernel-serverb).创建目录 mkdir -p /export/primary mkdir -p /export/secondaryc).编辑NFS配置文件vim /etc/exports#添加/export *(rw,async,no_root_squash,no_subtree_check)d).刷新配置exportfs -ae).挂载测试NFSmount -t nfs 01:/export/primary /mnt/primarymount -t nfs 01:/export/secondary /mnt/secondaryf).测试df h4.准备System VM Templatea).环境:KVM & Ubuntu ,有2种方法: 1.在线下载安装/usr/lib/cloud/common/scripts/storage/secondary/cloud-install-sys-tmplt -m /mnt/secondary u /templates/4.2/systemvmtemplate-2013-06-12-master-kvm.qcow2.bz2 -h kvm -F 2.先下载到本地再上传/usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt -m /mnt/secondary -f systemvmtemplate-2013-06-12-master-kvm.qcow2.bz2 -h kvm -F5.安装配置 Agent5.1安装Agentapt-get install cloudstack-agent5.2配置 libvirtCloudStack 用 libvirt 管理 virtual machines,libvirt是cloudstack-agent的依赖,应该先安装。之前已经安装了libvirt,现只需要配置即可。a).编辑/etc/libvirt/libvirtd.confvim /etc/libvirt/libvirtd.conf 修改为以下配置:listen_tls = 0listen_tcp = 1tcp_port = 16509auth_tcp = nonemdns_adv = 0b).编辑/etc/default/libvirt-binlibvirtd_opts=-d#添加 “-l”,改为:libvirtd_opts=-d -lc).确保/etc/libvirt/qemu.conf下的参数设置:vim /etc/libvirt/qemu.confvnc_listen = d).重启服务service libvirt-bin restart6.配置安全策略配置Apparmora).检查Apparmor是否安装dpkg -list apparmorb).禁用Apparmor的已知配置$ ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/$ ln -s /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper /etc/apparmor.d/disable/$ apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd$ apparmor_parser -R /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper7.配置网桥需要注意的是,官方文档给出的配置参数会导致网络不可用。正确的配置是将物理网卡设置为manual,然后在虚拟网卡上设置IP并桥接到物理网卡上。a).vim /etc/network/interfaces 修改网卡设置为:# This file describes the network interfaces available on your system# and how to activate them. For more information, see interfaces(5).# The loopback network interfaceauto loiface lo inet loopback # The primary network interfaceauto eth0iface eth0 inet manual# Public networkauto cloudbr0iface cloudbr0 inet static address 01 netmask gateway bridge_ports eth0 bridge_fd 5 bridge_stp off bridge_maxwait 1 dns-nameservers # Private network auto cloudbr1iface cloudbr1 inet manual bridge_ports eth0 bridge_fd 5 bridge_stp off bridge_maxwait 1b).重启,刷新网络配置/etc/init.d/networking restartc).如果是高级网络,则要配多张物理网卡8.防火墙设置a).设置防火墙ACL规则ufw allow proto tcp from any to any port 22ufw allow proto tcp from any to any port 1798ufw allow proto tcp from any to any port 16509ufw allow proto tcp from any to any port 5900:6100ufw allow proto tcp from any to any port 49152:49216b).禁用Tomcat默认服务/etc/init.d/tomcat6 stopupdate-rc.d -f tomcat6 removec).启动cloudstack-managementservice cloudstack-management startd).进入Web 页面01:8080/client#用户名:admin#密码:password9.创建iso模板增加一个MIME类型,需要把.iso作为一个正确的类型添加到配置中a).编辑web.xml文件vim /etc/tomcat6/web.xmlb).搜索,在此处,添加如下配置项: iso application/octet-stream 10.Web页面设置10.1 注册ISO所需配置a).在“Global Settings” 搜索ernal.site,将参数设置为内网中iso镜像的cidr/2410.2 配置本地存储a).在“Global Settings” 搜索system.vm.use.local.storage,将参数设置为truetrue11.出现问题及解决方案a).安装后web页面输入用户名密码无法登录 原因:mysql 不允许远程访问 解决办法:/usr/bin/mysql_upgrade -u root pb).进web页面404. 原因:数据库未能正确连接 解决办法:重新连接数据库cloudstack-setup-databases cloud:cloudstacklocalhost -e file -m cloudstack -k cloudstack c).数据库数据清空,重装#停止server服务service cloudstack-manag

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论