作者:lucky_笨鸟_660 | 来源:互联网 | 2014-05-27 20:08
1.事前?????台主?C,安?Centos6.2,一台??anagementServer,一台??VMHOST。??湟惶?torageServer以存放VmImage及ISO?n,我是用Openindiana提供NFS服?铡???P?段,使用Basic?路架??需要二??IPRange,一????M用、一???楣芾碛
1.事前???br />
???台主?C,安?Centos 6.2,一台??anagement Server,一台??VM HOST。
??湟惶?torage Server以存放Vm Image及ISO?n,我是用Openindiana 提供NFS服?铡?br />
???P?段,使用Basic?路架??需要二??IP Range,一????M用、一???楣芾碛谩?br />
VM用??0.0.41.140-160/16,管理用??0.0.41.161-181/16各20??IP。
?炔?NS 10.0.3.1、外部DNS8.8.8.8,Gateway 10.0.3.254
2.Storage Server ?定
建立目??K?定nfs共享
zfs create cloud/primary
zfs create cloud/secondary
zfs set sharenfs=anon=0,rw=@172.17.1.0:@10.0.0.0/16
cloud/primary primary
storage用於存VM IMAGE
zfs set sharenfs=anon=0,rw=@172.17.1.0:@10.0.0.0/16
cloud/secondary secondary
storage用於存iso及template
3.Management Server???br />
安?好centos6.2
到 /etc/yum.repos.d/ 目?,只留下CentOS-Media.repo ????n案,其??h除。
放入centos6.2光碟,??CentOS-Media.repo,??nable=0改??nable=1,建立目?mkdir -p
/media/cdrom
?燧d光碟?C mount /dev/cdrom /media/cdrom
?定selinux
下指令:setenforce permissive
??/etc/selinux/confg,?定有一行的?定? selinux=permissive
安? mysql server:yum install mysql-server -y
??/etc/my.cnf,?⒁韵沦N上my.cnf
innodb_rollback_on_timeout=1
innodb_lock_wait_timeout=600
max_cOnnections=350
log-bin=mysql-bin
binlog-format = 'ROW'
重??ysql:service mysql restart
?定mysql 密?
mysql
mysql> SET PASSWORD = PASSWORD('');
mysql> exit
4.到http://www.cloudstack.org下?最新版的cloudstack,解?嚎s後目?中有install.sh的?n案,直接?绦??霈F安???危?xM就??_始安?。
安?cloudstack ?料??br />
# cloud-setup-databases cloud:@localhost
--deploy-as=root:
?定management server
# cloud-setup-management
?? /etc/nfsmount.conf
?定使用nfsv3?轭A?通??f定。??使用nfsv4,在openindiana nfs server下?????。
Defaultvers=3
Nfsvers=3
??/etc/idmap.conf 修改以下2行的值如下。(不?定的?在openindiana nfs
server?????)
Nobody-User = root
Nobody-Group = root
?咽?VM System Template
mkdir -p /export/secondary
mount 10.0.1.123:/cloud/secondary /export/secondary
#
/usr/lib64/cloud/agent/scripts/storage/secondary/cloud-install-sys-tmplt
-m /export/secondary -u http://download.cloud.com/templates/acton/acton-systemvm-02062012.qcow2.bz2 -h kvm -F
???看?路?定,??芤欢?r?,跑完後management server就完成了。
之後可以用http://serverip:8080/client ?去?定。