CentOS 部署CloudStack 4.3 其实在官方文档上有说明(#document-qig),但是安装官方说明,发现有两个坑,整理了部署方式
CloudStack编译环境XenServer启动系统虚拟机失败
CloudStack 4.0.2 vRouter导致重启后状态不正常
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 \
-h kvm -F