具体请参考官方文档:http://docs.cloudstack.apache.org
1. 具体环境如下:
ip 安装组件
10.1.19.120 cloudstack-management , nfs-server , mysql-server
10.1.19.121 kvm, cloudstack-agent
10.1.19.122 kvm, cloudstack-agent
2. 管理节点安装
# 安装centos 7 , 配置fqdn 名称,ntp,
#vim /etc/yum.repos.d/cloudstack.repo
[cloudstack]
name=cloudstack
baseurl=http://download.cloudstack.org/centos/$releasever/4.11/
enabled=1
gpgcheck=0
#yum -y install epel-release
#yum install mysql-connector-python -y
#yum install cloudstack-management -y
# vi /etc/yum.repos.d/mariadb.repo
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.2/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
enabled=0
# yum --enablerepo=mariadb -y install MariaDB-server
# systemctl start mariadb
# mysql_secure_installation
设置root 密码
#vi /etc/my.cnf.d/server.cnf
innodb_rollback_on_timeout=1
innodb_lock_wait_timeout=600
max_connections=700
log-bin=mysql-bin
binlog-format = 'ROW'
bind-address = 0.0.0.0
#systemctl restart mariadb
# yum install nfs-utils rpcbind -y
#systemctl enable nfs-server
#systemctl start rpcbind nfs-server
# cd /opt
# mkdir primary secondary
#vi /etc/exports
/opt/primary *(rw,async,no_root_squash,no_subtree_check)
/opt/secondary *(rw,async,no_root_squash,no_subtree_check)
# mkdir -p /mnt/secondary
#mount -t nfs 10.1.19.120:/opt/secondary /mnt/secondary
#cd /root
# wget http://download.cloudstack.org/systemvm/4.11/systemvmtemplate-4.11.1-kvm.qcow2.bz2
#cloudstack-setup-databases cloud:123456@localhost --deploy-as=root:
#/usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt -m /mnt/secondary -f /root/systemvmtemplate-4.11.1-kvm.qcow2.bz2 -h kvm -F
#cloudstack-setup-management
3. kvm node 节点安装
# 配置ssh 端口为22 ,下次可以测试下修改端口
#配置cloudstack 源
#yum install cloudstack-agent
#vi /etc/libvirt/qemu.conf
#vim /etc/libvirt/libvirtd.conf
# vim /etc/sysconfig/libvirtd
# systemctl restart libvirtd
配置网卡
eth0--cloudbr0 --走公网和管理网络
eth1 --cloudbr1 --trunk -走租户网络
# cat /etc/sysconfig/network-scripts/ifcfg-eth0
TYPE=Ethernet
BOOTPROTO=none
NAME=ens192
DEVICE=ens192
ONBOOT=yes
BRIDGE=cloudbr0
# /etc/sysconfig/network-scripts/ifcfg-cloudbr0
TYPE=Bridge
BOOTPROTO=none
NAME=cloudbr0
DEVICE=cloudbr0
ONBOOT=yes
IPADDR=10.1.19.121
NETMASK=255.255.0.0
GATEWAY=10.1.19.254
4 .界面配置
http://10.1.19.120:8080/client
高级网络配置:
注意打上网络标签:cloudbr0 cloudbr1