在centos6.5上安裝cloudstack的筆記,無詳細解釋,僅用來作記錄
1.安裝centos6.5
2.配置靜態網絡
3.重啟網絡
server network restart
4.修改selinux為permissive
setenforce 0
修改/etc/selinux/config中對應的內容為如下
SELINUX=permissive
5.ntp設置
安裝ntp
yum -y install ntp
設置ntp
chkconfig ntpd on
service ntpd start
6.設置CloudStack Package Repository
創建/etc/yum.repos.d/cloudstack.repo並添加下面內容
[cloudstack]
name=cloudstack
baseurl=http://mirrors.cloudstack-china.com/mirror/centos/6/4.8/
enabled=1
gpgcheck=0
7.NFS
安裝
yum -y install nfs-utils
設置/etc/idmapd.conf添加一下內容
Domain = cloud.priv
Management Server 安裝
1.修改host
修改/etc/hosts對應的內容為如下
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.11.50.11 management.cloud.org
修改/etc/sysconfig/network對應內容如下
HOSTNAME=management.cloud.org
2.安裝Mysql Server
yum -y install mysql-server
3.在/etc/my.cnf的[mysqld]節添加以下內容
innodb_rollback_on_timeout=1
innodb_lock_wait_timeout=600
max_connections=350
log-bin=mysql-bin
binlog-format = ‘ROW’
4.重啟並默認啟動Mysql服務
service mysqld start
chkconfig mysqld on
5.安裝cloudstack-management
yum -y install cloudstack-management
cloudstack-setup-databases cloud:123456@localhost –deploy-as=root
cloudstack-setup-management
6.掛載nfs盤
掛載nfs中secondary到/mnt/secondary
7.安裝System Template
/usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt -m /mnt/secondary -u http://mirrors.cloudstack-china.com/mirror/systemvm/4.6/systemvm64template-4.6.0-kvm.qcow2.bz2 -h kvm -F
8.卸載 /mnt/secondary
Agent 安裝
1.修改host
修改/etc/hosts對應的內容為如下
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.11.50.11 agent.cloud.org
修改/etc/sysconfig/network對應內容如下
HOSTNAME=agent.cloud.org
2.安裝
yum -y install cloudstack-agent
3.QEMU配置
設置/etc/libvirt/qemu.conf對應內容如下
vnc_listen=0.0.0.0
4.Linvirt配置
配置/etc/libvirt/libvirtd.conf對應的內容如下
listen_tls = 0
listen_tcp = 1
tcp_port = “16059”
auth_tcp = “none”
mdns_adv = 0
配置/etc/sysconfig/libvirtd對應內容如下
LIBVIRTD_ARGS=”–listen”
重啟服務
service libvirtd restart
若重啟服務失敗,可以將/etc/libvirt/libvirtd.conf中下面內容的注釋去掉
log_outputs=”3:syslog:libvirtd”
NFS Server配置
1.配置NFS
設置 /etc/exports並添加下面內容
/export *(rw,async,no_root_squash,no_subtree_check)
創建文件夾
mkdir -p /export/primary
mkdir -p /export/secondary
設置/etc/sysconfig/nfs添加一下內容
LOCKD_TCPPORT=32803
LOCKD_UDPPORT=32769
MOUNTD_PORT=892
RQUOTAD_PORT=875
STATD_PORT=662
STATD_OUTGOING_PORT=2020
配置/etc/sysconfig/iptables添加下面規則
-A INPUT -s 172.16.10.0/24 -m state –state NEW -p udp –dport 111 -j ACCEPT
-A INPUT -s 172.16.10.0/24 -m state –state NEW -p tcp –dport 111 -j ACCEPT
-A INPUT -s 172.16.10.0/24 -m state –state NEW -p tcp –dport 2049 -j ACCEPT
-A INPUT -s 172.16.10.0/24 -m state –state NEW -p tcp –dport 32803 -j ACCEPT
-A INPUT -s 172.16.10.0/24 -m state –state NEW -p udp –dport 32769 -j ACCEPT
-A INPUT -s 172.16.10.0/24 -m state –state NEW -p tcp –dport 892 -j ACCEPT
-A INPUT -s 172.16.10.0/24 -m state –state NEW -p udp –dport 892 -j ACCEPT
-A INPUT -s 172.16.10.0/24 -m state –state NEW -p tcp –dport 875 -j ACCEPT
-A INPUT -s 172.16.10.0/24 -m state –state NEW -p udp –dport 875 -j ACCEPT
-A INPUT -s 172.16.10.0/24 -m state –state NEW -p tcp –dport 662 -j ACCEPT
-A INPUT -s 172.16.10.0/24 -m state –state NEW -p udp –dport 662 -j ACCEPT
重啟iptables
service iptables restart
設置nfs服務自啟動並啟動它
service rpcbind start
service nfs start
chkconfig rpcbind on
chkconfig nfs on