Note: 关闭了NFS Storage 的防火墙 service iptables stop

1. 新创建的Linux没有获取IP;

vi /etc/sysconfig/network-script/ifcfg-eth0

修改 ONBOOT="yes"

增加 BOOTPROTO="dhcp"

2. 通过命令 "hostname --fqdn"查看FQDN, 如果不能返回值,

vi /etc/hosts

增加 ip fqdn hostname

3. 查看selinux状态 

/usr/sbin/sestatus -v  或 sestatus

得确定selinux状态为disable 或 permissive

Set the SELINUX variable in /etc/selinux/config to "permissive". This ensures that the

permissive setting will be maintained after a system reboot.

Then set SELinux to permissive starting immediately, without requiring a system reboot.

增加 setenforce 0

4. 配置本地yum源

加载光盘系统文件到本地 mount /dev/cdrom /media

Create a repo file at /etc/yum.repos.d/rhel6.repo. In the file, insert the following lines:

[rhel]

name=rhel6

baseurl=file:///media

enabled=1

gpgcheck=0

5. 安装ntp服务

yum install ntp

Edit the NTP configuration file to point to your NTP server.

# vi /etc/ntp.conf

Add one or more server lines in this file with the names of the NTP servers you want to use.

For example:

server 0.xenserver.pool.ntp.org

server 1.xenserver.pool.ntp.org

server 2.xenserver.pool.ntp.org

server 3.xenserver.pool.ntp.org

Restart the NTP client.

# service ntpd restart

Make sure NTP will start again upon reboot.

# chkconfig ntpd on

6. 安装ManagementServer

1. Download the CloudStack Management Server onto the host where it will run. Get the software

from the following link.

https://www.citrix.com/English/ss/downloads/.

2. Install the CloudStack packages. You should have a file in the form of "CloudStack-VERSION-NOSVERSION.

tar.gz". Untar the file and then run the install.sh script inside it. Replace the file and

directory names below with those you are using:

# tar xzf CloudStack-VERSION-N-OSVERSION.tar.gz

# cd CloudStack-VERSION-N-OSVERSION

# ./install.sh

You should see a few messages as the installer prepares, followed by a list of choices.

3. Choose M to install the Management Server software.

> M

4. When the installation is finished, run the following commands to start essential services:

# service rpcbind start

# service nfs start

# chkconfig nfs on

# chkconfig rpcbind on

7. Install and Configure the Database

1. If you already have a version of MySQL installed on the Management Server node, make one of

the following choices, depending on what version of MySQL it is. The most recent version tested is

5.1.58.

• If you already have installed MySQL version 5.1.58 or later, skip to step 4.

• If you have installed a version of MySQL earlier than 5.1.58, you can either skip to step 4 or

uninstall MySQL and proceed to step 2 to install a more recent version.

Warning

It is important that you choose the right database version. Never downgrade a MySQL

installation.

2. On the same computer where you installed the Management Server, re-run install.sh.

# ./install.sh

You should see a few messages as the installer prepares, followed by a list of choices.

3. Choose D to install the MySQL server from the distribution's repo.

> D

Troubleshooting: If you do not see the D option, you already have MySQL installed. Please go

back to step 1.

4. Edit the MySQL configuration (/etc/my.cnf or /etc/mysql/my.cnf, depending on your OS) and

insert the following lines in the [mysqld] section. You can put these lines below the datadir line.

The max_connections parameter should be set to 350 multiplied by the number of Management

Servers you are deploying. This example assumes one Management Server.

innodb_rollback_on_timeout=1

innodb_lock_wait_timeout=600

max_connections=350

log-bin=mysql-bin

binlog-format = 'ROW'

5. Restart the MySQL service, then invoke MySQL as the root user.

# service mysqld restart

# mysql -u root

6. Best Practice: MySQL does not set a root password by default. It is very strongly recommended

that you set a root password as a security precaution. Run the following commands, and

substitute your own desired root password.

mysql> SET PASSWORD = PASSWORD('password');

From now on, start MySQL with mysql -p so it will prompt you for the password.

7. To grant access privileges to remote users, perform the following steps.

a. Run the following commands from the mysql prompt:

mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;

mysql> exit

b. Restart the MySQL service.

# service mysqld restart

c. Open the MySQL server port (3306) in the firewall to allow remote clients to connect.

# iptables -I INPUT -p tcp --dport 3306 -j ACCEPT

d. Edit the /etc/sysconfig/iptables file and add the following line at the beginning of the INPUT

chain.

-A INPUT -p tcp --dport 3306 -j ACCEPT

8. Set up the database. The following command creates the cloud user on the database.

• In dbpassword, specify the password to be assigned to the cloud user. You can choose to

provide no password.

• In deploy-as, specify the username and password of the user deploying the database. In the

following command, it is assumed the root user is deploying the database and creating the

cloud user.

• (Optional) For encryption_type, use file or web to indicate the technique used to pass in the

database encryption password. Default: file. See About Password and Key Encryption.

• (Optional) For management_server_key, substitute the default key that is used to encrypt

confidential parameters in the CloudPlatform properties file. Default: password. It is highly

recommended that you replace this with a more secure value. See About Password and Key

Encryption.

• (Optional) For database_key, substitute the default key that is used to encrypt confidential

parameters in the CloudPlatform database. Default: password. It is highly recommended that

you replace this with a more secure value. See About Password and Key Encryption.

# cloudstack-setup-databases cloud:<dbpassword>@localhost --deploy-as=root:<password> -e

<encryption_type> -m <management_server_key> -k <database_key>

9. Now that the database is set up, you can finish configuring the OS for the Management Server.

This command will set up iptables, sudoers, and start the Management Server.

# cloudstack-setup-management

7. Deploy a Separate NFS Server (最简单的方法,不要设置防火墙的相关信息,直接关闭防火墙 service iptables stop)

1. On the storage server, create an NFS share for secondary storage and, if you are using NFS for

primary storage as well, create a second NFS share. For example:

# mkdir -p /export/primary

# mkdir -p /export/secondary

2. To configure the new directories as NFS exports, edit /etc/exports. Export the NFS share(s) with

rw,async,no_root_squash. For example:

# vi /etc/exports

Insert the following line.

/export *(rw,async,no_root_squash)

3. Export the /export directory.

# exportfs -a

4. On the management server, create a mount point for secondary storage. For example:

# mkdir -p /mnt/secondary

5. Mount the secondary storage on your Management Server. Replace the example NFS server

name and NFS share paths below with your own.

# mount -t nfs nfsservername:/nfs/share/secondary /mnt/secondary

Edit the /etc/sysconfig/nfs file.

# vi /etc/sysconfig/nfs

Uncomment the following lines:

LOCKD_TCPPORT=32803

LOCKD_UDPPORT=32769

MOUNTD_PORT=892

RQUOTAD_PORT=875

STATD_PORT=662

STATD_OUTGOING_PORT=2020

Edit the /etc/sysconfig/iptables file.

# vi /etc/sysconfig/iptables

Add the following lines at the beginning of the INPUT chain:

-A INPUT -m state --state NEW -p udp --dport 111 -j ACCEPT

-A INPUT -m state --state NEW -p tcp --dport 111 -j ACCEPT

-A INPUT -m state --state NEW -p tcp --dport 2049 -j ACCEPT

-A INPUT -m state --state NEW -p tcp --dport 32803 -j ACCEPT

-A INPUT -m state --state NEW -p udp --dport 32769 -j ACCEPT

-A INPUT -m state --state NEW -p tcp --dport 892 -j ACCEPT

-A INPUT -m state --state NEW -p udp --dport 892 -j ACCEPT

-A INPUT -m state --state NEW -p tcp --dport 875 -j ACCEPT

-A INPUT -m state --state NEW -p udp --dport 875 -j ACCEPT

-A INPUT -m state --state NEW -p tcp --dport 662 -j ACCEPT

-A INPUT -m state --state NEW -p udp --dport 662 -j ACCEPT

Run the following commands:

# service iptables restart

# service iptables save

9. Prepare the System VM Template

1. On the Management Server, run one or more of the following cloud-install-sys-tmplt commands

to retrieve and decompress the system VM template. Run the command for each hypervisor type

that you expect end users to run in this Zone.

If your secondary storage mount point is not named /mnt/secondary, substitute your own mount

point name.

If you set the CloudPlatform database encryption type to "web" when you set up the database, you

must now add the parameter -s <management-server-secret-key>. See About Password and Key

Encryption.

This process will require approximately 5 GB of free space on the local file system and up to 30

minutes each time it runs.

• For XenServer:

# /usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt -m /

mnt/secondary -u http://download.cloud.com/templates/4.2/systemvmtemplate-2013-07-12-

master-xen.vhd.bz2 -h xenserver -s <optional-management-server-secret-key> -F

• For vSphere:

# /usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt -m /

mnt/secondary -u http://download.cloud.com/templates/4.2/systemvmtemplate-4.2-vh7.ova -

h vmware -s <optional-management-server-secret-key> -F

• For KVM:

# /usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt -m /

mnt/secondary -u http://download.cloud.com/templates/4.2/systemvmtemplate-2013-06-12-

master-kvm.qcow2.bz2 -h kvm -s <optional-management-server-secret-key> -F

2. If you are using a separate NFS server, perform this step. If you are using the Management

Server as the NFS server, you MUST NOT perform this step.

Chapter 5. Installation

62

When the script has finished, unmount secondary storage and remove the created directory.

# umount /mnt/secondary

# rmdir /mnt/secondary

3. Repeat these steps for each secondary storage server.

Cloudstack 的搭建的更多相关文章

  1. 搭建自己的XenServer+CloudStack云平台,提供IaaS服务(一)环境搭建

    目标 搭建一个完整的基于XenServer和CloudStack的虚拟化平台,提供IaaS服务. 搭建三台安装了XenServer的服务器 搭建一台安装了CloudStack的服务器用以管理云平台 搭 ...

  2. CloudStack+KVM环境搭建(步骤很详细,说明ClockStack是用来管理虚拟机的)

    文章目录环境准备配置本地域名解析关闭selinux安装ntp服务安装管理端安装Mysql数据库安装服务端RPM:初始化CloudStack数据库:初始化cloudstack管理服务器安装系统虚拟机安装 ...

  3. CloudStack搭建KVM环境

    软件环境:agent:CentOS 6.3,minimal安装,CPU启用VT management server:CentOS 6.3,minimal安装 存储:CentOS 6.3 搭建在mana ...

  4. 为cloudstack搭建ceph文件系统

    1. 安装dell服务器,  raid卡需要采用直通模式(non-raid); 各磁盘独立运行.  网络依赖硬件不同,使用万兆网卡或者两个千兆网卡做bonding6.  2. 配置host map(1 ...

  5. 【恒天云】OpenStack和CloudStack对比研究报告

    摘自恒天云:http://www.hengtianyun.com/download-show-id-8.html 1. 概述 常见的IaaS开源平台有OpenStack.CloudStack.Euca ...

  6. CloudStack 云计算平台框架

    前言 CloudStack 和OpenStack 一样都是IaaS层 开源框架,可以管理XenServer.ESXI.KVM.OVM等主流虚拟机,相对OpenStack比较简单.稳定: 二.Cloud ...

  7. CloudStack学习-1

    环境准备 实验使用的虚拟机配置 Vmware Workstation 虚拟机系统2个 系统版本:centos6.6 x86_64 内存:4GB 网络:两台机器都是nat 磁盘:装完系统后额外添加个50 ...

  8. CloudStack学习-3

    此次试验主要是CloudStack结合openvswitch 背景介绍 之所以引入openswitch,是因为如果按照之前的方式,一个网桥占用一个vlan,假如一个zone有20个vlan,那么岂不是 ...

  9. Cloudstack安装(二)

    Cloudstack安装 官方文档参考: http://docs.cloudstack.apache.org/projects/cloudstack-installation/en/4.9/qig.h ...

随机推荐

  1. apache,R,P,url重写,伪静态,反向代理

    需求: 1,浏览器地址栏中URL不变 2,伪静态重写生效 ===================== <VirtualHost *> ServerName xinwen.888.com.c ...

  2. Qt5中运行后台网络读取线程与主UI线程互交

    项目中有一个需求就是,因为需要请求服务端数据,因为网络的读取会阻塞,所以该过程不能放在Qt中的UI主线程当中,需要用一个后台线程来读取数据,数据准备完毕后 在通过Qt5中的信号槽机制来跨线程的传递数据 ...

  3. [转]opengl入门例题(读取bmp图片,并显示)

    #include<gl/glut.h> #define FileName "bliss.bmp" static GLint imagewidth; static GLi ...

  4. Posts Tagged ‘This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register问题的解决办法

    HowTo Install redhat package with YUM command without RHN February 26, 2014 in Redhat / Linux Tips a ...

  5. Kafka设计解析(二十二)Flink + Kafka 0.11端到端精确一次处理语义的实现

    转载自 huxihx,原文链接 [译]Flink + Kafka 0.11端到端精确一次处理语义的实现 本文是翻译作品,作者是Piotr Nowojski和Michael Winters.前者是该方案 ...

  6. chrome调试如何禁用浏览器缓存

    0.写在前面的话 遇到过很多很多次,修改了页面代码,但是程序始终没有按照设想的方向走,有时候折腾了几个小时,发现问题最后却是莫名其妙恢复的.后来进一步调试发现,自己已经修改了如js代码,但是前端在载入 ...

  7. 利尔达推出工控解决方式 串口转以太网模块LSD1ES-W5500_S2E0

    利尔达最近推出工控解决方式,串口转以太网模块LSD1ES-W5500_S2E0,模块基于WIZnet-W5500. 同一时候,这也是利尔达科技集团成为WIZnet代理商后,自行推出的第一款基于WIZn ...

  8. FakeID签名漏洞分析及利用(一)

    作者:申迪   转载请注明出处: http://blogs.360.cn/360mobile BlueBox于7月30日宣布安卓从2010年以来一直存在一个apk签名问题[1],并且会在今年Black ...

  9. STM32烧录的常用方式

    stm32烧录常用的方式一般为ST-LINK(或者J-tag)下载仿真和ISP下载 一.仿真器下载 仿真器分为J-TAG和SWD仿真,SWD仿真只需要4根线(VCC.GND.CLK.DATA)就可以了 ...

  10. Kubernetes学习之路(十九)之Kubernetes dashboard认证访问

    Dashboard:https://github.com/kubernetes/dashboard 一.Dashboard部署 由于需要用到k8s.gcr.io/kubernetes-dashboar ...