[root@secondary sysconfig]# yum -y install rpcbind nfs-utils
[root@secondary sysconfig]# mkdir /secondary
[root@secondary sysconfig]# vim /etc/exports
/secondary 192.168.1.0/24(rw,no_root_squash)
[root@secondary sysconfig]# netstat -anptu | grep 1012
[root@secondary sysconfig]# netstat -anptu | grep 1013
mountd 1012/tcp # rpc.mountd
mountd 1012/udp # rpc.mountd
rquotad 1013/tcp # rpc.rquotad
rquotad 1013/udp # rpc.rquotad
[root@secondary sysconfig]# vim /etc/sysconfig/iptables
-A INPUT -s 192.168.1.0/24 -p tcp -m multiport --dports 111,2049,1012,1013,32768 -j ACCEPT
-A INPUT -s 192.168.1.0/24 -p udp -m multiport --dports 111,2019,1012,1013,32768 -j ACCEPT
[root@secondary sysconfig]# service iptables restart
[root@secondary sysconfig]# service rpcbind restart
[root@secondary sysconfig]# service nfs start
[root@secondary sysconfig]# chkconfig rpcbind on
[root@secondary sysconfig]# chkconfig nfs on
[root@cloudstack cloudstack]# mkdir /secondary
[root@cloudstack ~]# mount -t nfs 192.168.1.131:/secondary /secondary/
这个模板是下载下来用的,要不然也得很长时间
http://download.cloud.com/templates/acton/acton-systemvm-02062012.qcow2.bz2
[root@cloudstack ~]# pwd
/root
[root@cloudstack ~]# ls
acton-systemvm-02062012.qcow2.bz2 anaconda-ks.cfg install.log install.log.syslog
[root@cloudstack ~]# mv acton-systemvm-02062012.qcow2.bz2 kvm.bz2
[root@cloudstack~]# /usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt -m /secondary/ -f /root/kvm.bz2 -h kvm -F
Uncompressing to /usr/share/cloudstack-common/scripts/storage/secondary/df08b26b-08a0-401f-809d-0b38908bc630.qcow2.tmp (type bz2)...could take a long time
Moving to /secondary/template/tmpl/1/3///df08b26b-08a0-401f-809d-0b38908bc630.qcow2...could take a while
Successfully installed system VM template /root/kvm.bz2 to /secondary/template/tmpl/1/3/
[root@cloudstack ~]# umount /secondary/;rm -rf /secondary/
[root@cloudstack ~]# cloudstack-setup-management
Starting to configure CloudStack Management Server:
Configure Firewall ... [OK]
Configure CloudStack Management Server ...[OK]
CloudStack Management Server setup is Done!
本文出自 “庭中有奇树” 博客,请务必保留此出处http://zhangdl.blog.51cto.com/11050780/1881830
原文地址:http://zhangdl.blog.51cto.com/11050780/1881830