lukyjre 发表于 2016-12-13 08:46:22

cloudstack安装(三)

1.安装cloudstack1.1:配置本地yum源 1)创建存放rpm包的目录# mkdir /soft/cloudstack/2)将下载的包上传到对应的服务器目录中下载路径:http://cloudstack.apt-get.eu/centos/6/4.9/
# pwd/soft/cloudstack# lscloudstack-agent-4.9.0-1.el6.x86_64.rpm            cloudstack-management-4.9.0-1.el6.x86_64.rpmcloudstack-baremetal-agent-4.9.0-1.el6.x86_64.rpmcloudstack-usage-4.9.0-1.el6.x86_64.rpmcloudstack-cli-4.9.0-1.el6.x86_64.rpmcloudstack-common-4.9.0-1.el6.x86_64.rpm3)安装createrepo工具并创建repo# yum -y install createrepo# createrepo /soft/cloudstack/Spawning worker 0 with 6 pkgsWorkers FinishedGathering worker results
Saving Primary metadataSaving file lists metadataSaving other metadataGenerating sqlite DBsSqlite DBs complete4)编辑.repo文件# vim /etc/yum.repos.d/cloudstack.reponame=cloudstackbaseurl=file:///soft/cloudstack/enabled=1gpgcheck=05)查看配置情况# yum clean all已加载插件:fastestmirror, securityCleaning repos: base cloudstack extras mysql-connectors-community updates清理一切Cleaning up list of fastest mirrors# yum repolist# yum repolist已加载插件:fastestmirror, securityLoading 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,696cloudstack               cloudstack         6extras                     CentOS-6 - Ext    62mysql-connectors-community MySQL Communit    24updates                  CentOS-6 - Upd   686repolist: 7,474                                                                        1.2:使用yum安装cloudstack1)安装cloudstack-management# yum -y install cloudstack-management# yum -y install cloud-client2.配置数据库(mysql)服务2.1准备 mysql服务器1)安装mysql服务# yum -y install mysql-server2)修改mysql配置文件# vim /etc/my.cnf datadir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.sockuser=mysql# Disabling symbolic-links is recommended to prevent assorted security riskssymbolic-links=0innodb_rollback_on_timeout=1innodb_lock_wait_timeout=600max_connections=350log-bin=mysql-binbinlog-format='ROW'log-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.pid3)启动数据库# service mysqld start正在启动 mysqld:                                          [确定]4)设置mysql root密码# mysqladmin -uroot password 1234565)设置root远程登录权限# mysql -uroot -p123456 -e "GRANT ALL PRIVILEGES ON *.* TO root@'%' IDENTIFIED BY '123456'" 2.2创建cloudstack的初始化数据库文件# cloudstack-setup-databases cloud:123456@localhost --deploy-as=root:123456 -e file -m 123456 -k 123456Mysql 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
页: [1]
查看完整版本: cloudstack安装(三)