[root@cloudstack ~]# mkdir /soft/cloudstack/
下载路径:http://cloudstack.apt-get.eu/centos/6/4.9/
[root@cloudstack cloudstack]# pwd
/soft/cloudstack
[root@cloudstack cloudstack]# ls
cloudstack-agent-4.9.0-1.el6.x86_64.rpm cloudstack-management-4.9.0-1.el6.x86_64.rpm
cloudstack-baremetal-agent-4.9.0-1.el6.x86_64.rpm cloudstack-usage-4.9.0-1.el6.x86_64.rpm
cloudstack-cli-4.9.0-1.el6.x86_64.rpm
cloudstack-common-4.9.0-1.el6.x86_64.rpm
[root@cloudstack cloudstack]# yum -y install createrepo
[root@cloudstack cloudstack]# createrepo /soft/cloudstack/
Spawning worker 0 with 6 pkgs
Workers Finished
Gathering worker results
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete
[root@cloudstack cloudstack]# vim /etc/yum.repos.d/cloudstack.repo
[cloudstack]
name=cloudstack
baseurl=file:///soft/cloudstack/
enabled=1
gpgcheck=0
[root@cloudstack cloudstack]# yum clean all
已加载插件:fastestmirror, security
Cleaning repos: base cloudstack extras mysql-connectors-community updates
清理一切
Cleaning up list of fastest mirrors
[root@cloudstack cloudstack]# yum repolist
[root@cloudstack cloudstack]# yum repolist
已加载插件:fastestmirror, security
Loading mirror speeds from cached hostfile
* base: mirrors.tuna.tsinghua.edu.cn
* extras: mirrors.tuna.tsinghua.edu.cn
* updates: mirrors.tuna.tsinghua.edu.cn
仓库标识 仓库名称 状态
base CentOS-6 - Bas 6,696
cloudstack cloudstack 6
extras CentOS-6 - Ext 62
mysql-connectors-community MySQL Communit 24
updates CentOS-6 - Upd 686
repolist: 7,474
[root@cloudstack cloudstack]# yum -y install cloudstack-management
[root@cloudstack cloudstack]# yum -y install cloud-client
[root@cloudstack cloudstack]# yum -y install mysql-server
[root@cloudstack cloudstack]# vim /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
innodb_rollback_on_timeout=1
innodb_lock_wait_timeout=600
max_connections=350
log-bin=mysql-bin
binlog-format=‘ROW‘
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[root@cloudstack cloudstack]# service mysqld start
正在启动 mysqld: [确定]
[root@cloudstack cloudstack]# mysqladmin -uroot password 123456
[root@cloudstack cloudstack]# mysql -uroot -p123456 -e "GRANT ALL PRIVILEGES ON *.* TO root@‘%‘ IDENTIFIED BY ‘123456‘"
[root@cloudstack cloudstack]# cloudstack-setup-databases cloud:123456@localhost --deploy-as=root:123456 -e file -m 123456 -k 123456
Mysql user name:cloud [ OK ]
Mysql user password:****** [ OK ]
Mysql server ip:localhost [ OK ]
Mysql server port:3306 [ OK ]
Mysql root user name:root [ OK ]
Mysql root user password:****** [ OK ]
Checking Cloud database files ... [ OK ]
Checking local machine hostname ... [ OK ]
Checking SELinux setup ... [ OK ]
Detected local IP address as 192.168.1.130, will use as cluster management server node IP[ OK ]
Preparing /etc/cloudstack/management/db.properties [ OK ]
Applying /usr/share/cloudstack-management/setup/create-database.sql [ OK ]
Applying /usr/share/cloudstack-management/setup/create-schema.sql [ OK ]
Applying /usr/share/cloudstack-management/setup/create-database-premium.sql [ OK ]
Applying /usr/share/cloudstack-management/setup/create-schema-premium.sql [ OK ]
Applying /usr/share/cloudstack-management/setup/server-setup.sql [ OK ]
Applying /usr/share/cloudstack-management/setup/templates.sql [ OK ]
Processing encryption ...
[ OK ]
Finalizing setup ... [ OK ]
CloudStack has successfully initialized database, you can check your database configuration in /etc/cloudstack/management/db.properties
本文出自 “庭中有奇树” 博客,请务必保留此出处http://zhangdl.blog.51cto.com/11050780/1881824
原文地址:http://zhangdl.blog.51cto.com/11050780/1881824