Apache CloudStack Installation RTD - en to zh_CN translation catalogue (122 entries)

en: Quick Installation Guide for CentOS
zh_CN: 基于CentOS的快速安装指南

en: Overview
zh_CN: 概述

en: What exactly are we building?
zh_CN: 我们真正要构建什么？

en: Infrastructure-as-a-Service (IaaS) clouds can be a complex thing to build, and by definition they have a plethora of options, which often lead to confusion for even experienced admins who are newcomers to building cloud platforms. The goal for this runbook is to provide a straightforward set of instructions to get you up and running with CloudStack with a minimum amount of trouble.
zh_CN: 构建基础架构即服务(IaaS)云是一个很复杂的工作，它定义了过多的选项，甚至新接触云平台的管理员都很容易混乱。此篇操作手册的目的就是为减少安装CloudStack时所发生的问题并提供最直接的帮助。

en: High level overview of the process
zh_CN: 整体过程概述

en: This runbook will focus on building a CloudStack cloud using KVM with CentOS 6.4 with NFS storage on a flat layer-2 network utilizing layer-3 network isolation (aka Security Groups), and doing it all on a single piece of hardware.
zh_CN: 该操作手册将重点介绍如何搭建Cloudstack云平台: 使用CentOS 6.4作为KVM和NFS存储主机，部署于扁平二层网络并使用三层网络隔离(安全组), 所有资源集中于一台物理主机

en: KVM, or Kernel-based Virtual Machine is a virtualization technology for the Linux kernel. KVM supports native virtualization atop processors with hardware virtualization extensions.
zh_CN: KVM或Kernel-based Virtual Machine是一种基于LInux内核的虚拟化技术。KVM支持本地虚拟化，主机的CPU处理器需支持硬件虚拟化扩展。

en: Security Groups act as distributed firewalls that control access to a group of virtual machines.
zh_CN: 安全组起到类似分布式防火墙的作用，它可以对一组虚拟机进行访问控制。

en: Prerequisites
zh_CN: 先决条件

en: To complete this runbook you'll need the following items:
zh_CN: 完成此操作手册你需要如下条件：

en: At least one computer which supports hardware virtualization.
zh_CN: 至少一台支持硬件虚拟化的主机。

en: The `CentOS 6.4 x86_64 minimal install CD <http://mirrors.kernel.org/centos/6.4/isos/x86_64/CentOS-6.4-x86_64-minimal.iso>`_
zh_CN: `"CentOS 6.4 x86_64 minimal install CD" <http://mirrors.kernel.org/centos/6.4/isos/x86_64/CentOS-6.4-x86_64-minimal.iso>`_

en: A /24 network with the gateway being at xxx.xxx.xxx.1, no DHCP should be on this network and none of the computers running CloudStack will have a dynamic address. Again this is done for the sake of simplicity.
zh_CN: 一个C类(/24)网络，网关为 xxx.xxx.xxx.1，网络中不能存在DHCP服务器，所有运行Cloudstack的主机需使用静态IP地址。

en: Environment
zh_CN: 环境

en: Before you begin , you need to prepare the environment before you install CloudStack. We will go over the steps to prepare now.
zh_CN: 首先，需要先准备要Cloudstack的安装环境，以下将详细描述准备步骤。

en: Operating System
zh_CN: 操作系统

en: Using the CentOS 6.4 x86_64 minimal install ISO, you'll need to install CentOS on your hardware. The defaults will generally be acceptable for this installation.
zh_CN: 使用 CentOS 6.4 x86_64 minimal install 镜像，在物理主机上安装CentOS，安装过程中接受使用默认选项。

en: Once this installation is complete, you'll want to connect to your freshly installed machine via SSH as the root user. Note that you should not allow root logins in a production environment, so be sure to turn off remote logins once you have finished the installation and configuration.
zh_CN: 当安装完成后，需要以root身份通过SSH连接新安装的主机，注意不要以root账户登录生产环境，请在完成安装和配置后关闭远程登录。

en: Configuring the network
zh_CN: 网络配置

en: By default the network will not come up on your hardware and you will need to configure it to work in your environment. Since we specified that there will be no DHCP server in this environment we will be manually configuring your network interface. We will assume, for the purposes of this exercise, that eth0 is the only network interface that will be connected and used.
zh_CN: 默认情况下新安装的机器并未启用网络，您需要根据实际环境进行配置。由于网络中不存在DHCP服务器，您需要手工配置网络接口。为了实现快速简化安装的目标，这里假定主机上只有eth0一个网络接口。

en: Connecting via the console you should login as root. Check the file /etc/sysconfig/network-scripts/ifcfg-eth0, it will look like this by default:
zh_CN: 使用root用户登录本地控制台。检查文件 /etc/sysconfig/network-scripts/ifcfg-eth0，默认情况，其内容如下所示：

en: Unfortunately, this configuration will not permit you to connect to the network, and is also unsuitable for our purposes with CloudStack. We want to configure that file so that it specifies the IP address, netmask, etc., as shown in the following example:
zh_CN: 但是根据以上配置您无法连接到网络，对于Cloudstack也同样不适合；您需修改配置文件，指定IP地址，网络掩码等信息，如下例所示：

en: You should not use the Hardware Address (aka the MAC address) from our example for your configuration. It is network interface specific, so you should keep the address already provided in the HWADDR directive.
zh_CN: 注意，不要在你的配置中使用示例中的Hardware地址(也叫MAC地址)。该地址为网络接口所特有的，请保留你配置文件中已经提供的HWADDR字段。

en: Now that we have the configuration files properly set up, we need to run a few commands to start up the network:
zh_CN: 配置文件准备完毕后，需要运行命令启动网络。

en: Hostname
zh_CN: 主机名

en: CloudStack requires that the hostname be properly set. If you used the default options in the installation, then your hostname is currently set to localhost.localdomain. To test this we will run:
zh_CN: Cloudstack要求正确设置主机名，如果安装时您接受了默认选项，主机名为localhost.localdomain，输入如下命令可以进行验证

en: At this point it will likely return:
zh_CN: 在此处将返回：

en: To rectify this situation - we'll set the hostname by editing the /etc/hosts file so that it follows a similar format to this example:
zh_CN: 为了纠正这个问题，需设置主机名，通过编辑/etc/hosts 文件，将其更改为类似如下内容：

en: After you've modified that file, go ahead and restart the network using:
zh_CN: 更改配置文件后，重启网络服务：

en: Now recheck with the hostname --fqdn command and ensure that it returns a FQDN response
zh_CN: 通过hostname --fqdn命令重新检查主机名，并确认返回了正确的FQDN

en: At the moment, for CloudStack to work properly SELinux must be set to permissive. We want to both configure this for future boots and modify it in the current running system.
zh_CN: 当前的CloudStack需要将SELinux设置为permissive才能正常工作，您需要改变当前配置，同时将该配置持久化，使其在主机重启后仍然生效。

en: To configure SELinux to be permissive in the running system we need to run the following command:
zh_CN: 在系统运行状态下将SELinux配置为permissive需执行如下命令：

en: To ensure that it remains in that state we need to configure the file /etc/selinux/config to reflect the permissive state, as shown in this example:
zh_CN: 为确保其持久生效需更改配置文件/etc/selinux/config，设置为permissive，如下例所示：

en: NTP configuration is a necessity for keeping all of the clocks in your cloud servers in sync. However, NTP is not installed by default. So we'll install and and configure NTP at this stage. Installation is accomplished as follows:
zh_CN: 为了同步云平台中主机的时间，需要配置NTP，但NTP默认没有安装。因此需要先安装NTP，然后进行配置。通过以下命令进行安装：

en: The actual default configuration is fine for our purposes, so we merely need to enable it and set it to start on boot as follows:
zh_CN: 实际上默认配置项即可满足的需求，仅需启用NTP并设置为开机启动，如下所示：

en: Configuring the CloudStack Package Repository
zh_CN: 配置ClouStack软件库

en: We need to configure the machine to use a CloudStack package repository.
zh_CN: 配置主机使用CloudStack软件库。

en: The Apache CloudStack official releases are source code. As such there are no 'official' binaries available. The full installation guide describes how to take the source release and generate RPMs and and yum repository. This guide attempts to keep things as simple as possible, and thus we are using one of the community-provided yum repositories.
zh_CN: Apache CloudStack官方发布源代码。因此没有可用的“官方”安装文件。完整的安装指南介绍了如何获取源代码，以及制作RPM包和yum软件库。本指南尽可能简化这些操作，所以直接使用社区提供的yum软件库。

en: To add the CloudStack repository, create /etc/yum.repos.d/cloudstack.repo and insert the following information.
zh_CN: 添加CloudStack软件仓库，创建/etc/yum.repos.d/cloudstack.repo文件，并添加如下信息。

en: Our configuration is going to use NFS for both primary and secondary storage. We are going to go ahead and setup two NFS shares for those purposes. We'll start out by installing nfs-utils.
zh_CN: 本文档将配置的环境使用NFS做为主存储和辅助存储，需配置两个NFS共享目录，在此之前需先安装nfs-utils：

en: We now need to configure NFS to serve up two different shares. This is handled comparatively easily in the /etc/exports file. You should ensure that it has the following content:
zh_CN: 接下来需配置NFS提供两个不同的挂载点。通过编辑/etc/exports文件即可简单实现。确保这个文件中包含下面内容：

en: You will note that we specified two directories that don't exist (yet) on the system. We'll go ahead and create those directories and set permissions appropriately on them with the following commands:
zh_CN: 注意配置文件中指定了系统中两个并不存在的目录，下面需要创建这些目录并设置合适的权限，对应的命令如下所示：

en: CentOS 6.x releases use NFSv4 by default. NFSv4 requires that domain setting matches on all clients. In our case, the domain is cloud.priv, so ensure that the domain setting in /etc/idmapd.conf is uncommented and set as follows: Domain = cloud.priv
zh_CN: CentOS 6.x 版本默认使用NFSv4，NFSv4要求所有客户端的域设置匹配，这里以设置cloud.priv为例，请确保文件/etc/idmapd.conf中的域设置没有被注释掉，并设置为以下内容：

en: Now you'll need uncomment the configuration values in the file /etc/sysconfig/nfs
zh_CN: 在/etc/sysconfig/nfs文件中取消如下选项的注释：

en: Now we need to configure the firewall to permit incoming NFS connections. Edit the file /etc/sysconfig/iptables
zh_CN: 接下来还需配置防火墙策略，允许NFS客户端访问。编辑文件/etc/sysconfig/iptables

en: Now you can restart the iptables service with the following command:
zh_CN: 通过以下命令重新启动iptables服务：

en: We now need to configure the nfs service to start on boot and actually start it on the host by executing the following commands:
zh_CN: 最后需要配置NFS服务为开机自启动，执行如下命令：

en: Management Server Installation
zh_CN: 管理服务器安装

en: We're going to install the CloudStack management server and surrounding tools.
zh_CN: 接下来进行CloudStack管理节点和相关工具的安装。

en: Database Installation and Configuration
zh_CN: 数据库安装和配置

en: We'll start with installing MySQL and configuring some options to ensure it runs well with CloudStack.
zh_CN: 首先安装MySQL，并对它进行配置，以确保CloudStack运行正常。

en: Install by running the following command:
zh_CN: 运行如下命令安装：

en: With MySQL now installed we need to make a few configuration changes to /etc/my.cnf. Specifically we need to add the following options to the [mysqld] section:
zh_CN: MySQL安装完成后，需更改其配置文件/etc/my.cnf。在[mysqld]下添加下列参数：

en: Now that MySQL is properly configured we can start it and configure it to start on boot as follows:
zh_CN: 正确配置MySQL后，启动它并配置为开机自启动：

en: Installation
zh_CN: 安装

en: We are now going to install the management server. We do that by executing the following command:
zh_CN: 现在将要开始安装管理服务器。执行以下命令：

en: With the application itself installed we can now setup the database, we'll do that with the following command and options:
zh_CN: 在程序执行完毕后，需初始化数据库，通过如下命令和选项完成：

en: When this process is finished, you should see a message like "CloudStack has successfully initialized the database."
zh_CN: 当该过程结束后，您应该可以看到类似信息："CloudStack has successfully initialized the database."。

en: Now that the database has been created, we can take the final step in setting up the management server by issuing the following command:
zh_CN: 数据库创建后，最后一步是配置管理服务器，执行如下命令：

en: System Template Setup
zh_CN: 上传系统模板

en: CloudStack uses a number of system VMs to provide functionality for accessing the console of virtual machines, providing various networking services, and managing various aspects of storage. This step will acquire those system images ready for deployment when we bootstrap your cloud.
zh_CN: CloudStack通过一系列系统虚拟机提供功能，如访问虚拟机控制台，如提供各类网络服务，以及管理辅助存储的中的各类资源。该步骤会获取系统虚拟机模板，用于云平台引导后系统虚拟机的部署。

en: Now we need to download the system VM template and deploy that to the share we just mounted. The management server includes a script to properly manipulate the system VMs images.
zh_CN: 然后需要下载系统虚拟机模板，并把这些模板部署于刚才创建的辅助存储中；管理服务器包含一个脚本可以正确的操作这些系统虚拟机模板：

en: That concludes our setup of the management server. We still need to configure CloudStack, but we will do that after we get our hypervisor set up.
zh_CN: 以上是管理服务器的安装和配置过程；在配置CloudStack之前，仍需配置hypervisor。

en: KVM Setup and Installation
zh_CN: KVM配置和安装

en: KVM is the hypervisor we'll be using - we will recover the initial setup which has already been done on the hypervisor host and cover installation of the agent software, you can use the same steps to add additional KVM nodes to your CloudStack environment.
zh_CN: 本文档使用KVM作为hypervisor，下文将回顾最如何配置hypervisor主机，其中大部分配置工作已在配置管理节点时完成；接下来描述如何安装agent。您可以应用相同的步骤添加额外的KVM节点到CloudStack环境中。

en: We explicitly are using the management server as a compute node as well, which means that we have already performed many of the prerequisite steps when setting up the management server, but we will list them here for clarity. Those steps are:
zh_CN: 本文档描述的环境使用管理服务器同时作为计算节点，这意味着很多先决步骤已经在搭建管理服务器时完成；但为了清晰起见，仍然列出相关步骤：

en: You shouldn't need to do that for the management server, of course, but any additional hosts will need for you to complete the above steps.
zh_CN: 你不需要在管理节点上执行这些操作，当然，如果您需要添加额外的主机以上步骤仍然需要执行。

en: Installation of the KVM agent is trivial with just a single command, but afterwards we'll need to configure a few things.
zh_CN: 安装KVM代理仅仅需要一条简单的命令，但之后我们需要进行一些配置。

en: KVM Configuration
zh_CN: 配置KVM

en: We have two different parts of KVM to configure, libvirt, and QEMU.
zh_CN: KVM中我们有两部分需要进行配置, libvirt和QEMU.

en: QEMU Configuration
zh_CN: 配置QEMU

en: KVM configuration is relatively simple at only a single item. We need to edit the QEMU VNC configuration. This is done by editing /etc/libvirt/qemu.conf and ensuring the following line is present and uncommented.
zh_CN: KVM的配置项相对简单，仅需配置一项。编辑QEMU VNC配置文件/etc/libvirt/qemu.conf并取消如下行的注释。

en: Libvirt Configuration
zh_CN: 配置Libvirt

en: CloudStack uses libvirt for managing virtual machines. Therefore it is vital that libvirt is configured correctly. Libvirt is a dependency of cloud-agent and should already be installed.
zh_CN: CloudStack使用libvirt管理虚拟机。因此正确的配置libvirt至关重要。Libvirt属于cloudstack-agent的依赖组件，应提前安装好。

en: In order to have live migration working libvirt has to listen for unsecured TCP connections. We also need to turn off libvirts attempt to use Multicast DNS advertising. Both of these settings are in /etc/libvirt/libvirtd.conf
zh_CN: 为了实现动态迁移，libvirt需要监听使用非加密的TCP连接。还需要关闭libvirts尝试使用组播DNS进行广播。这些都是在 /etc/libvirt/libvirtd.conf文件中进行配置。

en: Set the following paramaters:
zh_CN: 设置下列参数：

en: Turning on "listen_tcp" in libvirtd.conf is not enough, we have to change the parameters as well we also need to modify /etc/sysconfig/libvirtd:
zh_CN: 仅仅在libvirtd.conf中启用"listen_tcp"还不够，我们还必须修改/etc/sysconfig/libvirtd中的参数:

en: Uncomment the following line:
zh_CN: 取消如下行的注释：

en: Restart libvirt
zh_CN: 重启libvirt服务

en: KVM configuration complete
zh_CN: KVM配置完成

en: That concludes our installation and configuration of KVM, and we'll now move to using the CloudStack UI for the actual configuration of our cloud.
zh_CN: 以上内容是针对KVM的安装和配置，下面将介绍如何使用CloudStack用户界面配置云平台。

en: Configuration
zh_CN: 配置

en: As we noted before we will be using security groups to provide isolation and by default that implies that we'll be using a flat layer-2 network. It also means that the simplicity of our setup means that we can use the quick installer.
zh_CN: 如上文所述，该手册所描述的环境将使用安全组提供网络隔离，这意味着您的安装环境仅需要一个扁平的二层网络，同样意味着较为简单的配置和快速的安装。

en: UI Access
zh_CN: 访问用户界面

en: To get access to CloudStack's web interface, merely point your browser to http://172.16.10.2:8080/client The default username is 'admin', and the default password is 'password'. You should see a splash screen that allows you to choose several options for setting up CloudStack. You should choose the Continue with Basic Setup option.
zh_CN: 要访问CloudStack的WEB界面，仅需在浏览器访问 http://172.16.10.2:8080/client ，使用默认用户'admin'和密码'password'来登录。第一次登录可以看到欢迎界面，提供两个选项设置CloudStack。请选择继续执行基本配置安装。

en: You should now see a prompt requiring you to change the password for the admin user. Please do so.
zh_CN: 此时您会看到提示，要求为admin用户更改密码，请更新密码后继续。

en: Setting up a Zone
zh_CN: 配置区域

en: A zone is the largest organization entity in CloudStack - and we'll be creating one, this should be the screen that you see in front of you now. And for us there are 5 pieces of information that we need.
zh_CN: 区域是Cloudstack中最大的组织单位，下面将要讲述如何创建，此时屏幕中显示的是区域添加页面，这里需要您提供5部分信。

en: Name - we will set this to the ever-descriptive 'Zone1' for our cloud.
zh_CN: 名称 - 提供描述性的名称，这里以"Zone1"为例

en: Public DNS 1 - we will set this to '8.8.8.8' for our cloud.
zh_CN: 公共DNS1 - 我们输入8.8.8.8。

en: Public DNS 2 - we will set this to '8.8.4.4' for our cloud.
zh_CN: 公共DNS 2 - 我们输入8.8.4.4。

en: Internal DNS1 - we will also set this to '8.8.8.8' for our cloud.
zh_CN: 内部DNS 1 - 我们同样输入8.8.8.8。

en: Internal DNS2 - we will also set this to '8.8.4.4' for our cloud.
zh_CN: 内部DNS 2 - 我们同样输入8.8.4.4。

en: CloudStack distinguishes between internal and public DNS. Internal DNS is assumed to be capable of resolving internal-only hostnames, such as your NFS server’s DNS name. Public DNS is provided to the guest VMs to resolve public IP addresses. You can enter the same DNS server for both types, but if you do so, you must make sure that both internal and public IP addresses can route to the DNS server. In our specific case we will not use any names for resources internally, and we have indeed them set to look to the same external resource so as to not add a namerserver setup to our list of requirements.
zh_CN: CloudStack分为内部和公共DNS。内部DNS只负责解析内部主机名，比如NFS服务器的DNS名称。公共DNS为虚拟机提供公共IP地址解析。你可以指定同一个DNS服务器，但如果这样做，你必须确保内部和公共IP地址都能路由到该DNS服务器。在我们的案例中对内部资源不使用DNS名称，因此这里将其设置为与外部DNS一致用以简化安装，从而不必为此再安装一台DNS服务器。

en: Pod Configuration
zh_CN: 配置提供点

en: Now that we've added a Zone, the next step that comes up is a prompt for information regading a pod. Which is looking for several items.
zh_CN: 到这里我们已经添加了一个区域，下一步会显示添加提供点所需信息：

en: Name - We'll use Pod1 for our cloud.
zh_CN: 提供点名称 - 使用Pod1

en: Gateway - We'll use 172.16.10.1 as our gateway
zh_CN: 网关 - 使用172.16.10.1作为网关

en: Netmask - We'll use 255.255.255.0
zh_CN: 子网掩码 - 使用255.255.255.0

en: Start/end reserved system IPs - we will use 172.16.10.10-172.16.10.20
zh_CN: 系统预留 起始/结束 IP - 使用172.16.10.10-172.16.10.20

en: Guest gateway - We'll use 172.16.10.1
zh_CN: 来宾网络网关 - 使用172.16.10.1

en: Guest netmask - We'll use 255.255.255.0
zh_CN: 来宾网络掩码 - 使用255.255.255.0

en: Guest start/end IP - We'll use 172.16.10.30-172.16.10.200
zh_CN: 来宾网络 起始/结束IP - 使用172.16.10.30-172.16.10.200

en: Cluster
zh_CN: 群集

en: Now that we've added a Zone, we need only add a few more items for configuring the cluster.
zh_CN: 添加区域后，仅需再为配置群集提供如下信息。

en: Name - We'll use Cluster1
zh_CN: 群集名称 - 使用Cluster1

en: Hypervisor - Choose KVM
zh_CN: Hypervisor - 选择KVM

en: You should be prompted to add the first host to your cluster at this point. Only a few bits of information are needed.
zh_CN: 此时向导会提示您为集群添加第一台主机，需提供如下信息：

en: Hostname - we'll use the IP address 172.16.10.2 since we didn't set up a DNS server.
zh_CN: 主机名 - 由于没有设置DNS服务器，所以这里输入主机IP地址 172.16.10.2。

en: Username - we'll use 'root'
zh_CN: 用户名 - 我们使用root

en: Password - enter the operating system password for the root user
zh_CN: 密码 - 输入root用户的密码

en: Primary Storage
zh_CN: 主存储

en: With your cluster now setup - you should be prompted for primary storage information. Choose NFS as the storage type and then enter the following values in the fields:
zh_CN: 在配置群集时，按提示输入主存储的信息。选择NFS作为存储类型，并在如下区域中输入相应的值：

en: Name - We'll use 'Primary1'
zh_CN: 名称 - 使用 'Primary1'

en: Server - We'll be using the IP address 172.16.10.2
zh_CN: 服务器 - 使用的IP地址为 172.16.10.2

en: Path - Well define /primary as the path we are using
zh_CN: 路径 - 使用之前定义的 /primary

en: Secondary Storage
zh_CN: 辅助存储

en: If this is a new zone, you'll be prompted for secondary storage information - populate it as follows:
zh_CN: 如果添加的是一个新的区域，您需提供辅助存储相关信息 - 如下所示：

en: NFS server - We'll use the IP address 172.16.10.2
zh_CN: NFS服务器 -  使用的IP地址为 172.16.10.2

en: Path - We'll use /secondary
zh_CN: 路径 - 输入 /secondary

en: Now, click Launch and your cloud should begin setup - it may take several minutes depending on your internet connection speed for setup to finalize.
zh_CN: 现在，点击启动开始配置云-完成安装所需的时间取决于你的网络速度。

en: That's it, you are done with installation of your Apache CloudStack cloud.
zh_CN: 到这里，你的Apache CloudStack云就已经安装完成了。
