Chinaunix首页 | 论坛 | 博客
  • 博客访问: 9170227
  • 博文数量: 1669
  • 博客积分: 16831
  • 博客等级: 上将
  • 技术积分: 12594
  • 用 户 组: 普通用户
  • 注册时间: 2011-02-25 07:23
个人简介

柔中带刚,刚中带柔,淫荡中富含柔和,刚猛中荡漾风骚,无坚不摧,无孔不入!

文章分类

全部博文(1669)

文章存档

2023年(4)

2022年(1)

2021年(10)

2020年(24)

2019年(4)

2018年(19)

2017年(66)

2016年(60)

2015年(49)

2014年(201)

2013年(221)

2012年(638)

2011年(372)

分类: 云计算

2014-05-30 10:02:01

Centos 6.5 安装CloudStack4.3
http://blog.csdn.net/wangdk789/article/details/23779855

分类: CloudStack KVM2014-04-15 19:21 334人阅读 评论(0) 收藏 举报

目录(?)[+]

CentOS 部署CloudStack 4.3 其实在官方文档上有说明(http://www.imycloud.com/CSInstallation/index.html#document-qig),但是安装官方说明,发现有两个坑,整理了部署方式


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 ntp
2、
# chkconfig ntpd on # service ntpd start


配置CloudStack 源

1、增加文件/etc/yum.repos.d/cloudstack.repo


[cloudstack]
name=cloudstack
baseurl=
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=2020
6、关闭防火墙


 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 on
4、yum install cloudstack-management


5、初始化数据库

cloudstack-setup-databases cloud:password@localhost --deploy-as=root:password
6、cloudstack-setup-management 
7、准备系统模板



/usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt -m \ /secondary -u  \ -h kvm -F


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 = 0
5.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



阅读(564) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~