部署私有云CloudStack(上),


目录

  • 前言
    • 1.集群规划
    • 2.设置yum源
    • 3.关闭防火墙和selinux
    • 4.安装nfs
    • 5.安装和启动mysql-server
    • 6.安装和启动Cloudstack-Management
    • 7.浏览器访问

前言

CloudStack形成的基础设施云和数据中心运营商可以快速,轻松地建立在其现有的基础设施提供云服务的需求,弹性云计算服务。 CloudStack用户可以充分利用云计算提供更高的效率,无限的规模和更快地部署新服务和系统的最终用户。
CloudStack 是一个开源的云操作系统,它可以帮助用户利用自己的硬件提供类似于Amazon EC2那样的公共云服务。CloudStack可以通过组织和协调用户的虚拟化资源,构建一个和谐的环境。CloudStack具有许多强大的功能,可以让用户构建一个安全的多租户云计算环境。CloudStack 兼容Amazon API 接口。
CloudStack可以让用户快速和方便地在现有的架构上建立自己的云服务。CloudStack可以帮助用户更好地协调服务器、存储、网络资源,从而构建一个IaaS平台。

1.集群规划

IP 角色
192.168.0.232 Xenserver虚拟机、CloudStack服务端、主存储、二级存储
192.168.0.231 物理主机、Xenserver服务端

2.设置yum源

wget -O /etc/yum.repos.d/CentOS-Base.repo  http://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/epel.repo  http://mirrors.aliyun.com/repo/epel-7.repo
yum clean all
yum makecache

3.关闭防火墙和selinux

systemctl stop firewalld
systemctl disable firewalld
setenforce 0
sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config

4.安装nfs

yum -y install nfs-utils
mkdir /data/export/{primary,secondary} -p
echo -e "/data/export/primary 192.168.0.0/24(rw,async,no_root_squash,no_subtree_check)\n/data/export/secondary 192.168.0.0/24(rw,async,no_root_squash,no_subtree_check)" >>/etc/exports
cat >>/etc/sysconfig/nfs <<EOF
LOCKD_TCPPORT=32803
LOCKD_UDPPORT=32769
MOUNTD_PORT=892
RQUOTAD_PORT=875
STATD_PORT=662
STATD_OUTGOING_PORT=2020
EOF
systemctl start nfs
systemctl start rpcbind 
systemctl enable rpcbind
systemctl enable nfs

5.安装和启动mysql-server

yum -y install mariadb-server
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'

systemctl start mariadb.service
systemctl enable mariadb.service

6.安装和启动Cloudstack-Management

rpm --import http://repo.mysql.com/RPM-GPG-KEY-mysql  #从MySQL导入GPG公钥
yum -y install mysql-connector-python  #安装mysql-connector
cd /root/cloudstack4.11.1/  && yum -y localinstall cloudstack-*  #http://download.cloudstack.org/centos/7/4.11/
cloudstack-setup-databases cloud:123456@localhost --deploy-as=root  #初始化CloudStack数据库
mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;  #授权用户权限
/usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt -m /data/export/secondary/ -f /root/cloudstack4.11.1/systemvmtemplate-4.11.1-xen.vhd.bz2 -h xenserver -F  #导入基础模版  systemvmtemplate-4.11.1-xen.vhd.bz2下载地址:http://docs.cloudstack.apache.org/en/4.11.1.0/adminguide/systemvm.html
cloudstack-setup-management
systemctl enable cloudstack-management

7.浏览器访问

用户名/密码为:admin/password
http://192.168.0.232:8080/client/

相关内容

    暂无相关文章