柔中带刚,刚中带柔,淫荡中富含柔和,刚猛中荡漾风骚,无坚不摧,无孔不入!
全部博文(1669)
分类: 云计算
2014-05-30 10:02:01
CentOS 部署CloudStack 4.3 其实在官方文档上有说明(http://www.imycloud.com/CSInstallation/index.html#document-qig),但是安装官方说明,发现有两个坑,整理了部署方式
CloudStack Server 和KVM 主机都设置为静态Ip,这个不再描述
1、 hostname --fqdn
如果显示不正确,修改/etc/hosts文件 (修改主机名为cloudstack.test.cn)
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
1、
yum -y install ntp
2、
# chkconfig ntpd on # service ntpd start
1、增加文件/etc/yum.repos.d/cloudstack.repo
[cloudstack] name=cloudstack baseurl= enabled=1 gpgcheck=0
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
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
同样需要配置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 |