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

en: Building from Source
zh_CN: 从源码编译

en: The official CloudStack release is always in source code form. You will likely be able to find "convenience binaries," the source is the canonical release. In this section, we'll cover acquiring the source release and building that so that you can deploy it using Maven or create Debian packages or RPMs.
zh_CN: CloudStack官方总是以源代码形式发布。你可以找到 "方便的二进制文件"， 这些源都是规范的发布版本。在本节将包括获取和编译发行版源代码，使用Maven、创建Debian或rpm软件包来进行部署。

en: Note that building and deploying directly from source is typically not the most efficient way to deploy an IaaS. However, we will cover that method as well as building RPMs or Debian packages for deploying CloudStack.
zh_CN: 请注意，直接从源代码构建和部署一个IaaS通常不是最有效的方式。然而，我们仍将介绍这种方法，就像构建RPMs或Debian软件包来部署CloudStack一样。

en: The instructions here are likely version-specific. That is, the method for building from source for the 4.0.x series is different from the 4.1.x series.
zh_CN: 本节中的指令仅限定于特定的版本。也就是说，从源码编译4.0.x系列和4.1.x系列的方法是不同的。

en: If you are working with a unreleased version of CloudStack, see the INSTALL.md file in the top-level directory of the release.
zh_CN: 如果你正在使用一个非发行版的CloudStack，请查阅该版本主目录下的INSTALL.md文件。

en: Getting the release
zh_CN: 获得发行版

en: You can download the latest CloudStack release from the `Apache CloudStack project download page <http://cloudstack.apache.org/downloads.html>`_.
zh_CN: 下载CloudStack最新发行版，可以在 `Apache CloudStack 项目下载页面： <http://cloudstack.apache.org/downloads.html>`_.

en: Prior releases are available via archive.apache.org as well. See the downloads page for more information on archived releases.
zh_CN: 之前的版本同样可以通过archive.apache.org获得。请参阅下载页面上的存档版本的更多信息。

en: You'll notice several links under the 'Latest release' section. A link to a file ending in ``tar.bz2``, as well as a PGP/GPG signature, MD5, and SHA512 file.
zh_CN: 你会注意到在'最新发行版'下方有几个链接。一个链接以 ``tar.bz2`` 文件结尾，以及PGP/GPG签名，MD5和ShA512文件。

en: The ``tar.bz2`` file contains the Bzip2-compressed tarball with the source code.
zh_CN: ``tar.bz2`` 文件包含使用Bzip2压缩的源代码。

en: The ``.asc`` file is a detached cryptographic signature that can be used to help verify the authenticity of the release.
zh_CN:  ``.asc`` 是一个独立加密签名文件，可以用来帮助验证发行版的真实性。

en: The ``.md5`` file is an MD5 hash of the release to aid in verify the validity of the release download.
zh_CN:  ``.md5`` 是MD5哈希值文件，用于帮助验证下载的发行版是否有效。

en: The ``.sha`` file is a SHA512 hash of the release to aid in verify the validity of the release download.
zh_CN:  ``.sha`` 是SHA512哈希值文件，用于帮助验证下载的发行版是否有效。

en: Verifying the downloaded release
zh_CN: 验证下载的版本

en: There are a number of mechanisms to check the authenticity and validity of a downloaded release.
zh_CN: 有很多机制可以检查下载的发行版的真实性和有效性。

en: Getting the KEYS
zh_CN: 获取密钥

en: To enable you to verify the GPG signature, you will need to download the `KEYS <http://www.apache.org/dist/cloudstack/KEYS>`_ file.
zh_CN: 为了实现GPG签名验证，你需要下载 `密钥 <http://www.apache.org/dist/cloudstack/KEYS>`_ 文件。

en: You next need to import those keys, which you can do by running:
zh_CN: 下一步需要导入这些密钥，你可以运行如下命令：

en: The CloudStack project provides a detached GPG signature of the release. To check the signature, run the following command:
zh_CN: CloudStack项目提供了发行版的分离GPG签名。运行如下命令检查签名：

en: If the signature is valid you will see a line of output that contains 'Good signature'.
zh_CN: 如果签名是有效的，你会看到一行包含“Good signature”的信息。

en: In addition to the cryptographic signature, CloudStack has an MD5 checksum that you can use to verify the download matches the release. You can verify this hash by executing the following command:
zh_CN: 除了加密签名，CloudStack还提供了MD5校验和，用于验证下载的发行版。您可以通过执行下面的命令验证这个哈希值:

en: If this successfully completes you should see no output. If there is any output from them, then there is a difference between the hash you generated locally and the hash that has been pulled from the server.
zh_CN: 如果成功完成，你应该看不到任何输出。如果有任何输出，则说明你本地生成的哈希值与服务器上获取的是不同的。

en: In addition to the MD5 hash, the CloudStack project provides a SHA512 cryptographic hash to aid in assurance of the validity of the downloaded release. You can verify this hash by executing the following command:
zh_CN: 除了MD5校验和，CloudStack还提供了SHA512加密哈希，用于验证下载的发行版。您可以通过执行下面的命令验证这个哈希值:

en: If this command successfully completes you should see no output. If there is any output from them, then there is a difference between the hash you generated locally and the hash that has been pulled from the server.
zh_CN: 如果命令成功完成，你应该看不到任何输出。如果有任何输出，则说明你本地生成的哈希值与服务器上获取的不同。

en: Prerequisites for building Apache CloudStack
zh_CN: 编译Apache CloudStack的先决条件

en: There are a number of prerequisites needed to build CloudStack. This document assumes compilation on a Linux system that uses RPMs or DEBs for package management.
zh_CN: 编译CloudStack所需的先决条件很多，本文假定在Linux系统上编译，使用RPMs或DEBs包管理。

en: You will need, at a minimum, the following to compile CloudStack:
zh_CN: 如下是编译CloudStack的最低需求：

en: Maven (version 3)
zh_CN: Maven (版本 3)

en: Java (OpenJDK 1.6 or Java 7/OpenJDK 1.7)
zh_CN: Java (OpenJDK 1.6 或 Java 7/OpenJDK 1.7)

en: Apache Web Services Common Utilities (ws-commons-util)
zh_CN: Apache网页服务器常用工具（ws-commons-util）

en: MySQLdb (provides Python database API)
zh_CN: MySQLdb (提供python数据库API)

en: Tomcat 6 (not 6.0.35)
zh_CN: Tomcat 6 (非 6.0.35)

en: rpmbuild or dpkg-dev
zh_CN: rpmbuild 或 dpkg-dev

en: Extracting source
zh_CN: 提取的源代码

en: Extracting the CloudStack release is relatively simple and can be done with a single command as follows:
zh_CN: 提取CloudStack发行版源代码相对简单，使用如下命令：

en: You can now move into the directory:
zh_CN: 你现在可以进入该目录：

en: Building DEB packages
zh_CN: 编译DEB包

en: In addition to the bootstrap dependencies, you'll also need to install several other dependencies. Note that we recommend using Maven 3, which is not currently available in 12.04.1 LTS. So, you'll also need to add a PPA repository that includes Maven 3. After running the command ``add-apt-repository``, you will be prompted to continue and a GPG key will be added.
zh_CN: 除了引导依赖项，还需要安装几个其他的依赖包。请注意，我们推荐使用的Maven 3，在Ubuntu 12.04.1 LTS目前不支持。所以，还需要添加一个包含Maven 3 的PPA库。运行命令“add-apt-repository”，系统将提示您继续添加GPG密钥后继续。

en: While we have defined, and you have presumably already installed the bootstrap prerequisites, there are a number of build time prerequisites that need to be resolved. CloudStack uses maven for dependency resolution. You can resolve the buildtime depdencies for CloudStack by running:
zh_CN: 虽然我们做了一些定义，并且可能已经安装了引导的前提条件，但仍有一些在编译时需要解决的先决条件。CloudStack使用Maven进行依赖性解析。您可以通过运行以下命令，来解决编译CloudStack时的依赖性：

en: Now that we have resolved the dependencies we can move on to building CloudStack and packaging them into DEBs by issuing the following command.
zh_CN: 现在我们已经解决了依赖关系，可以使用如下命令编译CloudStack和创建DEB包：

en: This command will build the following debian packages. You should have all of the following:
zh_CN: 该命令将创建如下debian软件包。应该有如下这些内容:

en: Setting up an APT repo
zh_CN: 设置APT仓库

en: After you've created the packages, you'll want to copy them to a system where you can serve the packages over HTTP. You'll create a directory for the packages and then use ``dpkg-scanpackages`` to create ``Packages.gz``, which holds information about the archive structure. Finally, you'll add the repository to your system(s) so you can install the packages using APT.
zh_CN: 软件包创建完成后，你需要将软件包拷贝至可以提供HTTP服务的系统上。创建用于存放软件包的目录，并使用 ``dpkg-scanpackages`` 命令创建包含归档结构信息的 ``Packages.gz`` 文件。在系统中添加这个仓库源，最后使用该APT安装软件包。

en: The first step is to make sure that you have the **dpkg-dev** package installed. This should have been installed when you pulled in the **debhelper** application previously, but if you're generating ``Packages.gz`` on a different system, be sure that it's installed there as well.
zh_CN: 第一步是确保你已经安装了 **dpkg-dev** 软件。一般在使用 **debhelper** 程序之前就已经安装了。如果你是在其他系统中生成的 ``Packages.gz`` 文件，请确保它已经被安装。

en: The next step is to copy the DEBs to the directory where they can be served over HTTP. We'll use ``/var/www/cloudstack/repo`` in the examples, but change the directory to whatever works for you.
zh_CN: 下一步是将DEB文件复制到提供HTTP服务的目录中。在示例中，我们使用 ``/var/www/cloudstack/repo``作为示例 ，你也可以更改为更适合你的目录。

en: You can safely ignore the warning about a missing override file.
zh_CN: 你可以忽略缺少覆盖文件的警告信息。

en: Now you should have all of the DEB packages and ``Packages.gz`` in the ``binary`` directory and available over HTTP. (You may want to use ``wget`` or ``curl`` to test this before moving on to the next step.)
zh_CN: 现在你应该可以通过HTTP访问 ``binary`` 目录中所有的DEB安装包和 ``Packages.gz`` 文件。(在进行下一步前，你需要使用 ``wget`` 或 ``curl`` 命令测试。)

en: Configuring your machines to use the APT repository
zh_CN: 配置使用APT仓库源的主机

en: Now that we have created the repository, you need to configure your machine to make use of the APT repository. You can do this by adding a repository file under ``/etc/apt/sources.list.d``. Use your preferred editor to create ``/etc/apt/sources.list.d/cloudstack.list`` with this line:
zh_CN: 现在,我们已经创建了仓库，然后配置你的服务器来使用APT仓库源。你可以在 ``/etc/apt/sources.list.d`` 目录中添加仓库文件。使用你喜欢的编辑器来创建``/etc/apt/sources.list.d/cloudstack.list`` 文件并加入类似如下信息:

en: Now that you have the repository info in place, you'll want to run another update so that APT knows where to find the CloudStack packages.
zh_CN: 现在，您已经准备好软件仓库，然后更新以下，使得APT知道从哪里找到CloudStack的软件包。

en: You can now move on to the instructions under Install on Ubuntu.
zh_CN: 现在可以翻到在Ubuntu上安装CloudStack的一章去了。

en: Building RPMs from Source
zh_CN: 从源码编译RPM包

en: As mentioned previously in `“Prerequisites for building Apache CloudStack” <#prerequisites-for-building-apache-cloudstack>`_, you will need to install several prerequisites before you can build packages for CloudStack. Here we'll assume you're working with a 64-bit build of CentOS or Red Hat Enterprise Linux.
zh_CN: 正如先前 `“编译Apache CloudStack的先决条件 <#prerequisites-for-building-apache-cloudstack>`_所说，在编译CloudStack之前需要安装一些先决条件。这里假设你使用的是64位的CentOS或Red Hat Enterprise Linux.

en: Next, you'll need to install build-time dependencies for CloudStack with Maven. We're using Maven 3, so you'll want to `grab a Maven 3 tarball <http://maven.apache.org/download.cgi>`_ and uncompress it in your home directory (or whatever location you prefer):
zh_CN: 接下来，你将需要安装编译CloudStack时依赖的Maven。 使用 Maven 3, 所以你需要 `提取 Maven 3 压缩包 <http://maven.apache.org/download.cgi>`_ 并解压到你的主目录 (或任何你喜欢的目录):

en: Maven also needs to know where Java is, and expects the JAVA\_HOME environment variable to be set:
zh_CN: Maven还需要知道Java程序路径，和JAVA\_HOME环境变量输出的设置：

en: Verify that Maven is installed correctly:
zh_CN: 验证Maven是否被正确安装：

en: You probably want to ensure that your environment variables will survive a logout/reboot. Be sure to update ``~/.bashrc`` with the PATH and JAVA\_HOME variables.
zh_CN: 如果想确保环境变量将在注销或重启后仍保留。一定要更新 ``~/.bashrc`` 中的PATH和JAVA\_HOME 变量。

en: Building RPMs for CloudStack is fairly simple. Assuming you already have the source downloaded and have uncompressed the tarball into a local directory, you're going to be able to generate packages in just a few minutes.
zh_CN: 编译CloudStack的RPM包相当简单。假设你已经下载了源码并解压压缩文件到一个本地目录中，你可以在几分钟之内完成编译。

en: Packaging has Changed. If you've created packages for CloudStack previously, you should be aware that the process has changed considerably since the project has moved to using Apache Maven. Please be sure to follow the steps in this section closely.
zh_CN: 打包方式的变化。如果你之前创建过CloudStack软件包，你会意识到自从该项目开始使用Apache Maven，这个步骤发生了很大变化。请一定要密切关注本节中的步骤。

en: Generating RPMS
zh_CN: 生成RPM包

en: Now that we have the prerequisites and source, you will cd to the `packaging/centos63/` directory.
zh_CN: 现在我们已经满足先决条件和源码，然后进入 `packaging/centos63/` 目录。

en: Generating RPMs is done using the ``package.sh`` script:
zh_CN: 使用 ``package.sh`` 脚本生成RPM包：

en: That will run for a bit and then place the finished packages in ``dist/rpmbuild/RPMS/x86_64/``.
zh_CN: 这会需要一些时间，生成的软件包会在 ``dist/rpmbuild/RPMS/x86_64/`` 目录中。

en: You should see the following RPMs in that directory:
zh_CN: 你应该看到目录中的RPM包：

en: Creating a yum repo
zh_CN: 创建yum仓库

en: While RPMs is a useful packaging format - it's most easily consumed from Yum repositories over a network. The next step is to create a Yum Repo with the finished packages:
zh_CN: RPMs是一个有用的包装格式 - 通过网络上YUM仓库来使用是非常简单的。下一步是使用这些软件包创建YUM仓库：

en: The files and directories within ``~/tmp/repo`` can now be uploaded to a web server and serve as a yum repository.
zh_CN: ``~/tmp/repo`` 中的文件和目录现在可以上传到WEB服务器中作为YUM仓库。

en: Configuring your systems to use your new yum repository
zh_CN: 配置你的系统使用新的yum仓库

en: Now that your yum repository is populated with RPMs and metadata we need to configure the machines that need to install CloudStack. Create a file named ``/etc/yum.repos.d/cloudstack.repo`` with this information:
zh_CN: 现在你的yum仓库中拥有了RPM包和元数据，我们为需要安装CloudStack的机器创建一个名为``/etc/yum.repos.d/cloudstack.repo``的文件，内容如下：

en: Completing this step will allow you to easily install CloudStack on a number of machines across the network.
zh_CN: 完成这一步，您可以轻松地在整个网络中的机器上安装CloudStack。

en: Building Non-OSS
zh_CN: 编译 Non-OSS

en: If you need support for the VMware, NetApp, F5, NetScaler, SRX, or any other non-Open Source Software (nonoss) plugins, you'll need to download a few components on your own and follow a slightly different procedure to build from source.
zh_CN: 如果你需要支持VMware，NetAPP，F5，NetScaler，SRX或其他非开源软件(nonoss)插件。你需要下载一些独立的组件并遵循从源代码构建稍微不同的过程。

en: Some of the plugins supported by CloudStack cannot be distributed with CloudStack for licensing reasons. In some cases, some of the required libraries/JARs are under a proprietary license. In other cases, the required libraries may be under a license that's not compatible with `Apache's licensing guidelines for third-party products <http://www.apache.org/legal/resolved.html#category-x>`_.
zh_CN: 因为许可的问题，一些CloudStack支持的插件不能与CloudStack一起发行。一些原因是，所需要的一些库或JAR文件都有专用的许可。另外一些是因为所需要第三方产品库的许可证不能与Apache的许可相兼容，见`针对第三方产品的Apache许可指南 <http://www.apache.org/legal/resolved.html#category-x>`_.

en: To build the Non-OSS plugins, you'll need to have the requisite JARs installed under the ``deps`` directory.
zh_CN: 为了编译NON-OSS插件，你需要安装必要的JAR在``deps`` 目录中。

en: Because these modules require dependencies that can't be distributed with CloudStack you'll need to download them yourself. Links to the most recent dependencies are listed on the `*How to build CloudStack* <https://cwiki.apache.org/confluence/display/CLOUDSTACK/How+to+build+CloudStack>`_ page on the wiki.
zh_CN: 由于这些模块需要的依赖项不能和CloudStack一起发行，你需要自行下载。最新的依赖项都列在wiki页面中：`*如何编译CloudStack* <https://cwiki.apache.org/confluence/display/CLOUDSTACK/How+to+build+CloudStack>`_

en: You may also need to download `vhd-util <http://download.cloud.com.s3.amazonaws.com/tools/vhd-util>`_, which was removed due to licensing issues. You'll copy vhd-util to the ``scripts/vm/hypervisor/xenserver/`` directory.
zh_CN: 你可能还需要下载`vhd-util <http://download.cloud.com.s3.amazonaws.com/tools/vhd-util>`_, 也是由于授权问题而被移除。 复制vhd-util到该目录： ``scripts/vm/hypervisor/xenserver/``.

en: Once you have all the dependencies copied over, you'll be able to build CloudStack with the ``noredist`` option:
zh_CN: 一旦你复制过来所有的依赖项，你就可以开始使用 ``noredist`` 选项编译CloudStack了。

en: Once you've built CloudStack with the ``noredist`` profile, you can package it using the `“Building RPMs from Source” <#building-rpms-from-source>`_ or `“Building DEB packages” <#building-deb-packages>`_ instructions.
zh_CN: 一旦你创建了CloudStack的 ``noredist`` 配置文件，你可以使用 `“从源码编译RPM包” <#building-rpms-from-source>`_ 或 `“编译DEB包” <#building-deb-packages>`_ 指令打包。
