共计 6011 个字符,预计需要花费 16 分钟才能阅读完成。
CentOS 部署 CloudStack 4.3 其实在官方文档上有说明(http://www.imycloud.com/CSInstallation/index.html#document-qig),但是安装官方说明,发现有两个坑,整理了部署方式
CloudStack 编译环境 XenServer 启动系统虚拟机失败 http://www.linuxidc.com/Linux/2013-08/88694.htm
CloudStack 4.0.2 vRouter 导致重启后状态不正常 http://www.linuxidc.com/Linux/2013-08/88474.htm
CloudStack 部署手册 PDF 清晰版 http://www.linuxidc.com/Linux/2013-06/86114.htm
CloudStack 4.0 + KVM 安装详细指南 http://www.linuxidc.com/Linux/2013-06/85750.htm
安装部署 CloudStack 4.0 企业私有云平台 http://www.linuxidc.com/Linux/2013-06/85748.htm
CloudStack 安装部署与常见问题解决 http://www.linuxidc.com/Linux/2013-06/85746.htm
CloudStack Server 和 KVM 主机都设置为静态 Ip,这个不再描述
HostName
1、hostname –fqdn
如果显示不正确,修改 /etc/hosts 文件 (修改主机名为 cloudstack.test.cn)
SELinux
1、setenforce 0
2、修改 /etc/selinux/config 文件
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing – SELinux security policy is enforced.
# permissive – SELinux prints warnings instead of enforcing.
# disabled – No SELinux policy is loaded.
SELINUX=permissive
# SELINUXTYPE= can take one of these two values:
# targeted – Targeted processes are protected,
# mls – Multi Level Security protection.
SELINUXTYPE=targeted
NTP
1、
yum -y install ntp2、
# chkconfig ntpd on
# service ntpd start
配置 CloudStack 源
1、增加文件 /etc/yum.repos.d/cloudstack.repo
[cloudstack]
name=cloudstack
baseurl=http://cloudstack.apt-get.eu/rhel/4.3/
enabled=1
gpgcheck=0
NFS
1、
yum install nfs-utils
2、vi /etc/exports
/secondary *(rw,async,no_root_squash)
/primary *(rw,async,no_root_squash)3、
# mkdir /primary
# mkdir /secondary
4、CentOS 6.x releases use NFSv4 by default. NFSv4 requires that domain setting matches on all clients. In our case, thedomain is cloud.priv, so ensure that the domain setting in /etc/idmapd.conf is uncommented and set as follows:Domain = cloud.priv
5、vi /etc/sysconfig/nfs
LOCKD_TCPPORT=32803
LOCKD_UDPPORT=32769
MOUNTD_PORT=892
RQUOTAD_PORT=875
STATD_PORT=662
STATD_OUTGOING_PORT=20206、关闭防火墙
service iptables stop
7、
# service rpcbind start
# service nfs start
# chkconfig rpcbind on
# chkconfig nfs on
安装配置 CloudStack ManageMent
1、yum -y install mysql-server
2、vi /etc/my.cnf 在 mysqld 部分添加
innodb_rollback_on_timeout=1
innodb_lock_wait_timeout=600
max_connections=350
log-bin=mysql-bin
binlog-format = ‘ROW’3、
# service mysqld start
# chkconfig mysqld on4、yum install cloudstack-management
5、初始化数据库
cloudstack-setup-databases cloud:password@localhost –deploy-as=root:password
6、cloudstack-setup-management7、准备系统模板
/usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt -m \
/secondary -u http://jenkins.buildacloud.org/view/4.3/job/cloudstack-4.3-systemvm/lastSuccessfulBuild/artifact/tools/appliance/dist/systemvmtemplate-2014-04-14-master-kvm.qcow2.bz2 \
-h kvm -F
CloudStack 的详细介绍:请点这里
CloudStack 的下载地址:请点这里
KVM 主机配置
同样需要配置 cloudstack 源,ntp,hostname,selinux
1、主机安装 KVM
yum install -y kvm kmod-kvm kvm-qemu-img libvirt python-virtinst virt-manager virt-viewer bridge-utils
2、配置 KVM 主机网桥,增加一个网桥
vi /etc/sysconfig/network-scripts/ifcfg-cloudbr0
DEVICE=”cloudbr0″
TYPE=”Bridge”
ONBOOT=”yes”
BOOTPROTO=static
IPADDR=192.168.26.134
PREFIX=24
GATEWAY=192.168.26.2
DNS1=8.8.4.4
DNS2=8.8.8.8
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=”eth0″
BOOTPROTO=”static”
NM_CONTROLLED=”no”
ONBOOT=”yes”
TYPE=”Ethernet”
BOOTPROTO=none
BRIDGE=”cloudbr0″
4、QEMU 配置 vi /etc/libvirt/qemu.conf
vnc_listen=0.0.0.0
5、Libwirt 配置
5.1 /etc/libvirt/libvirtd.conf
listen_tls = 0
listen_tcp = 1
tcp_port = “16059”
auth_tcp = “none”
mdns_adv = 05.2 /etc/sysconfig/libvirtd
LIBVIRTD_ARGS=”–listen”
5.3
service libvirtd restart
配置完成
启动 agent:service cloudstack-agent restart
启动 cloudstack management:
/etc/init.d/tomcat6 stop
/etc/init.d/cloudstack-management restart
附录:
1、上传 iso 一直失败?
需要修改配置
secstorage.allowed.internal.sites
设置网段为 管理网段,包含 存放 iso 的地址 IP
CentOS 部署 CloudStack 4.3 其实在官方文档上有说明(http://www.imycloud.com/CSInstallation/index.html#document-qig),但是安装官方说明,发现有两个坑,整理了部署方式
CloudStack 编译环境 XenServer 启动系统虚拟机失败 http://www.linuxidc.com/Linux/2013-08/88694.htm
CloudStack 4.0.2 vRouter 导致重启后状态不正常 http://www.linuxidc.com/Linux/2013-08/88474.htm
CloudStack 部署手册 PDF 清晰版 http://www.linuxidc.com/Linux/2013-06/86114.htm
CloudStack 4.0 + KVM 安装详细指南 http://www.linuxidc.com/Linux/2013-06/85750.htm
安装部署 CloudStack 4.0 企业私有云平台 http://www.linuxidc.com/Linux/2013-06/85748.htm
CloudStack 安装部署与常见问题解决 http://www.linuxidc.com/Linux/2013-06/85746.htm
CloudStack Server 和 KVM 主机都设置为静态 Ip,这个不再描述
HostName
1、hostname –fqdn
如果显示不正确,修改 /etc/hosts 文件 (修改主机名为 cloudstack.test.cn)
SELinux
1、setenforce 0
2、修改 /etc/selinux/config 文件
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing – SELinux security policy is enforced.
# permissive – SELinux prints warnings instead of enforcing.
# disabled – No SELinux policy is loaded.
SELINUX=permissive
# SELINUXTYPE= can take one of these two values:
# targeted – Targeted processes are protected,
# mls – Multi Level Security protection.
SELINUXTYPE=targeted
NTP
1、
yum -y install ntp2、
# chkconfig ntpd on
# service ntpd start
配置 CloudStack 源
1、增加文件 /etc/yum.repos.d/cloudstack.repo
[cloudstack]
name=cloudstack
baseurl=http://cloudstack.apt-get.eu/rhel/4.3/
enabled=1
gpgcheck=0
NFS
1、
yum install nfs-utils
2、vi /etc/exports
/secondary *(rw,async,no_root_squash)
/primary *(rw,async,no_root_squash)3、
# mkdir /primary
# mkdir /secondary
4、CentOS 6.x releases use NFSv4 by default. NFSv4 requires that domain setting matches on all clients. In our case, thedomain is cloud.priv, so ensure that the domain setting in /etc/idmapd.conf is uncommented and set as follows:Domain = cloud.priv
5、vi /etc/sysconfig/nfs
LOCKD_TCPPORT=32803
LOCKD_UDPPORT=32769
MOUNTD_PORT=892
RQUOTAD_PORT=875
STATD_PORT=662
STATD_OUTGOING_PORT=20206、关闭防火墙
service iptables stop
7、
# service rpcbind start
# service nfs start
# chkconfig rpcbind on
# chkconfig nfs on
安装配置 CloudStack ManageMent
1、yum -y install mysql-server
2、vi /etc/my.cnf 在 mysqld 部分添加
innodb_rollback_on_timeout=1
innodb_lock_wait_timeout=600
max_connections=350
log-bin=mysql-bin
binlog-format = ‘ROW’3、
# service mysqld start
# chkconfig mysqld on4、yum install cloudstack-management
5、初始化数据库
cloudstack-setup-databases cloud:password@localhost –deploy-as=root:password
6、cloudstack-setup-management7、准备系统模板
/usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt -m \
/secondary -u http://jenkins.buildacloud.org/view/4.3/job/cloudstack-4.3-systemvm/lastSuccessfulBuild/artifact/tools/appliance/dist/systemvmtemplate-2014-04-14-master-kvm.qcow2.bz2 \
-h kvm -F
CloudStack 的详细介绍:请点这里
CloudStack 的下载地址:请点这里