CloudStack 4.4+KVM之管理服务器安装
2015-12-15 09:55
309 查看
一、CloudStack介绍
和 OpenStack, OpenNebula 类似,CloudStack 是另一款开源云计算平台。CloudStack的前身是 Cloud.com 家的一款商业云计算产品(也有开源版本),2011年 Cloud.com 被 Citrix 收购,2012年的时候
Citrix 将收购的云平台 CloudStack 全部捐给了 Apache 基金会,自己则以 Citrix CloudPlatform
(powered by Apache CloudStack) 的形式为客户提供商业化的云计算解决方案。
二、CloudStack服务器网络准备
1、主机规划1 2 3 4 | nfs 192.168.15.10 CloudStack 192.168.15.15 node1 192.168.15.13 node2 192.168.1.14 |
1 2 3 4 | [root@node5 ~]# vim /etc/hosts \\新增以下内容 192.168.15.15 cloudstack cloudstack.centos6.com [root@node5 ~]# vim /etc/sysconfig/network \\修改主机名 HOSTNAME=cloudstack.centos6.com |
1 2 3 4 5 | [root@node5 ~]# vim /etc/sysconfig/selinux SELINUX=disabled [root@node5 ~]# /etc/init.d/iptables stop [root@node5 ~]# chkconfig iptables off [root@node5 ~]# reboot |
1 2 3 4 | [root@node5 ~]# cd /etc/yum.repos.d/ [root@node5 yum.repos.d]# cp epel-6.repo epel-6.repo.20151214 [root@node5 yum.repos.d]# vim epel-6.repo baseurl=http://cloudstack.apt-get.eu/rhel/4.4/ |
1 2 | [root@cloudstack yum.repos.d]# yum -y install cloudstack-management 笔者虚拟机在这ping不通cloudstack.apt-get.eu域名. 拿自己物理机ping cloudstack.apt-get.eu域名, 将得出的ip地址写入到linux的hosts文件里. |
①. 安装mysql-server
1 | [root@cloudstack yum.repos.d]# yum -y install mysql-server |
1 2 3 4 5 6 7 | [root@cloudstack ~]# vim /etc/my.cnf [mysqld] innodb_rollback_on_timeout=1 innodb_lock_wait_timeout=600 max_connections=350 log-bin=mysql-bin binlog-format = 'ROW' |
1 2 | [root@cloudstack ~]# /etc/init.d/mysqld start [root@cloudstack ~]# chkconfig mysqld on |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | [root@cloudstack ~]# mysql_secure_installation NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MySQL to secure it, we'll need the current password for the root user. If you've just installed MySQL, and you haven't set the root password yet, the password will be blank, so you should just press enter here. Enter current password for root (enter for none): OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MySQL root user without the proper authorisation. Set root password? [Y/n] y New password: 123qwe Re-enter new password: 123qwe Password updated successfully! Reloading privilege tables.. ... Success! By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? [Y/n] y ... Success! Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] n ... skipping. By default, MySQL comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? [Y/n] y - Dropping test database... ... Success! - Removing privileges on test database... ... Success! Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? [Y/n] y ... Success! Cleaning up... All done! If you've completed all of the above steps, your MySQL installation should now be secure. Thanks for using MySQL! |
1 | [root@cloudstack ~]# cloudstack-setup-databases cloud:cloud@localhost --deploy-as=root:123qwe |
1 2 3 4 5 6 | [root@cloudstack ~]# cloudstack-setup-management Starting to configure CloudStack Management Server: Configure sudoers ... [OK] Configure Firewall ... [OK] Configure CloudStack Management Server ...[OK] CloudStack Management Server setup is Done! |
1 | [root@cloudstack ~]# /etc/init.d/cloudstack-management start |
三、配置NFS存储, 该内容可以独立配置。
1、安装服务端所需软件1 | [root@nfs-server ~]# yum -y install nfs-utils protmap |
1 2 | [root@nfs-server ~]# vim /etc/exports /nfs *(rw,fsid=1,async,no_root_squash,no_subtree_check) |
1 2 | [root@nfs-server ~]# /etc/init.d/nfslock start [root@nfs-server ~]# /etc/init.d/nfs start |
1 2 3 | [root@cloudstack ~]# yum -y install nfs-utils protmap [root@cloudstack ~]# mkdir /nfs [root@cloudstack ~]# mount -t nfs 192.168.15.10:/nfs /nfs/ |
四、导入系统虚拟机模板
说明: 系统虚拟机模板按要求要存放在辅助存储上的,我们可以先手动挂载nfs辅助存储, 然后把290M KVM虚拟化模板先下载到辅助存储目录下,然后在导入, 导入系统虚拟机模板步是必须要配置的内容。本例采用KVM虚拟化,下载导入KVM虚拟机模板。1 2 3 4 5 6 7 8 | [root@cloudstack ~]# cd /nfs/ [root@cloudstack nfs]# wget http://cloudstack.apt-get.eu/systemvm/4.4/systemvm64template-4.4.0-6-kvm.qcow2.bz2 [root@cloudstack nfs]# /usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt -m /nfs -f systemvm64template-4.4.0-6-kvm.qcow2.bz2 -h kvm -F Uncompressing to /usr/share/cloudstack-common/scripts/storage/secondary/36245427-d76a-4b2a-b2e9-8552ccdd5f93.qcow2.tmp (type bz2)...could take a long time Moving to /nfs/template/tmpl/1/3///36245427-d76a-4b2a-b2e9-8552ccdd5f93.qcow2...could take a while Successfully installed system VM template systemvm64template-4.4.0-6-kvm.qcow2.bz2 to /nfs/template/tmpl/1/3/ ps:错误提示 Insufficient free disk space for local temporary folder /usr/share/cloudstack-common/scripts/storage/secondary: avail=4749888k req=5120000k \\出现这种错误说明根分区(/)不够用 |
五、访问CloudStack
相关文章推荐
- python 启动shell报错Subprocess Startup Error
- 侧滑菜单(slidingMenu)
- Java线程堆栈信息查看
- 51单片机AD转换之PCF8591
- 如何做基于粉丝的视频主播网站?
- 将self或成员变量加入block之前要先将self变为__weak
- 重装windows后修复CentOS的Grub
- Android触摸事件
- Android编程中的四大基本组件与生命周期详解
- sql server clr 应用(二)
- Linux 课程
- java配置
- 对于汇编代码pushl %ebp movl %esp,%ebp
- 因xhost命令和DISPLAY环境变量操作不当导致无法启动Oracle图形化安装界面
- 因xhost命令和DISPLAY环境变量操作不当导致无法启动Oracle图形化安装界面
- C++拷贝构造函数详解
- 锁定窗口,禁止更新的win32函数
- java配置
- hdu 1524 A Chess Game 博弈
- Daily Scrum 12.15