作者:936383130_54f13e | 来源:互联网 | 2014-05-27 20:08
环境:
cloudstack3.0.4【必选】
rehl6.2x64【必选】
win2008R2x64(可选)
VMware-VIMSetup-all-5.0.iso(可选)
VMware-VMvisor-Installer-5.0.iso(可选)
首先从官网下载cloudstack安装包,找不到的同学留下邮箱。
然后下载cloudstack 系统虚拟机模板,有for xenserver、kvm和vmware三个,注意区分
安装rehle6.2,虚拟机和物理机都可以,默认安装即可。
本次实验是安装在esxi上的虚拟机。
----------------开始------------------------------
一.配置rehl的地址,
重启网络,使新地址生效。
二.修改配置
[root@localhost ~]# vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing -
SELinux security policy is enforced.
# permissive -
SELinux prints warnings instead of enforcing.
# disabled - No
SELinux policy is loaded.
SELINUX=permissive
# SELINUXTYPE= can take one of these two values:
# targeted -
Targeted processes are protected,
# mls - Multi Level
Security protection.
SELINUXTYPE=targeted
[root@localhost ~]# setenforce permissive
[root@localhost ~]# vi /etc/sysconfig/network
确保HOSTNAME=localhost.localdomain
三.配置yum源
挂载rehl6.2的安装光盘
[root@localhost ~]# mount /dev/cdrom /mnt
mount: block device /dev/sr0 is write-protected, mounting
read-only
[root@localhost ~]#
新建文件/etc/yum.repos.d/rhel.repo,添加以下内容:
[rhel]
name=rhel6
baseurl=file:///mnt
enabled=1
gpgcheck=0
三.安装
上传cloudstack 安装包到任意目录。
解压
[root@localhost setp]# ls
CloudStack-oss-3.0.2-1-rhel6.2.tar.gz
[root@localhost setp]# tar -xvf
CloudStack-oss-3.0.2-1-rhel6.2.tar.gz
进入解压后的文件夹。安装之
[root@localhost setp]# ls
CloudStack-oss-3.0.2-1-rhel6.2
CloudStack-oss-3.0.2-1-rhel6.2.tar.gz
[root@localhost setp]# cd
CloudStack-oss-3.0.2-1-rhel6.2
[root@localhost CloudStack-oss-3.0.2-1-rhel6.2]# ls
6.2 install.sh oss
repodata scripts
[root@localhost CloudStack-oss-3.0.2-1-rhel6.2]#
./install.sh
按M开始安装
按y同意
出现
Complete!
Done
[root@localhost CloudStack-oss-3.0.2-1-rhel6.2]#
表示安装完成
安装数据库
再次运行安装脚本
[root@localhost CloudStack-oss-3.0.2-1-rhel6.2]#
./install.sh
按D安装数据库
按y OK
出现
Please report any problems with the /usr/bin/mysqlbug
script!
[ OK ]
Starting
mysqld:
[ OK ]
Done
[root@localhost CloudStack-oss-3.0.2-1-rhel6.2]#
表示安装完成
修改数据库 配置
[root@localhost CloudStack-oss-3.0.2-1-rhel6.2]# vi
/etc/my.cnf
添加以下内容
innodb_rollback_on_timeout=1
innodb_lock_wait_timeout=600
max_cOnnections=350
log-bin=mysql-bin
binlog-format = 'ROW'
保存退出
重启服务
[root@localhost CloudStack-oss-3.0.2-1-rhel6.2]# service
mysqld restart
Stopping
mysqld:
[
OK ]
Starting
mysqld:
[ OK ]
[root@localhost CloudStack-oss-3.0.2-1-rhel6.2]#
初始化cloudstack 数据库配置
[root@localhost CloudStack-oss-3.0.2-1-rhel6.2]#
[root@localhost CloudStack-oss-3.0.2-1-rhel6.2]#
cloud-setup-databases cloud:@localhost --deploy-as=root
即cloudstack 数据库的 用户为 cloud 密码为 <空>
表示成功
完成安装
[root@localhost /]# cloud-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!
[root@localhost /]#
现在已经完成了cloudstack的安装,在浏览器打开 http://地址>:8080/client
即可进入cloudstack的界面,用户名:admin 密码:password
下一篇—cloudstack的高级网络配置
祝 儿童节愉快~