source/installguide/locale/zh_CN/LC_MESSAGES/building_from_source.mo (16 lines of code) (raw):

��T�\\q]6�:3Au � �� y � l� 3 7I � � h�   8$ ] n W� �� �� ~����m��1(�#b5�&�������bQ���?�p��T�6,0~]����_�{�x^f�h> P� r� k!��"�#0�#`%�r%\&lr&��&c')y' �'��'p(��)$*@C*@�*��*@�+��+4�,A�,��, �-�-��-/�/6�0��0��1 �2�2��2�3�3U�3!4'74_4o4F�4�4 �4+�4 55S#5�w5�6k�6�7��7&o8��9),:V:Z:Rk:�:"�:��:��;�<d�=\>v]>��>��?m@@��@�yA&JBuqB�B�Bl�B_kDX�D^$EU�EX�E82FZkF��F�G� H��HH�IqJF�JO�Jn K�K#�K�K��K nL�xM!�M@ N3aN��NBbO~�O$$P+IP�uP QQAfter 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.Apache Web Services Common Utilities (ws-commons-util)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.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.Building DEB packagesBuilding Non-OSSBuilding 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.Building RPMs from SourceBuilding from SourceCompleting this step will allow you to easily install CloudStack on a number of machines across the network.Configuring your machines to use the APT repositoryConfiguring your systems to use your new yum repositoryCreating a yum repoExtracting sourceExtracting the CloudStack release is relatively simple and can be done with a single command as follows:GPGGenerating RPMSGenerating RPMs is done using the ``package.sh`` script:Getting the KEYSGetting the releaseIf the signature is valid you will see a line of output that contains 'Good signature'.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.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.If you are working with a unreleased version of CloudStack, see the INSTALL.md file in the top-level directory of the release.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.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: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.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:Java (OpenJDK 1.6 or Java 7/OpenJDK 1.7)MD5Maven (version 3)Maven also needs to know where Java is, and expects the JAVA\_HOME environment variable to be set:MySQLMySQLdb (provides Python database API)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):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.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:Now that we have resolved the dependencies we can move on to building CloudStack and packaging them into DEBs by issuing the following command.Now that we have the prerequisites and source, you will cd to the `packaging/centos63/` directory.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.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: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.)Once you have all the dependencies copied over, you'll be able to build CloudStack with the ``noredist`` option: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.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.Prerequisites for building Apache CloudStackPrior releases are available via archive.apache.org as well. See the downloads page for more information on archived releases.SHA512Setting up an APT repoSome 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>`_.That will run for a bit and then place the finished packages in ``dist/rpmbuild/RPMS/x86_64/``.The CloudStack project provides a detached GPG signature of the release. To check the signature, run the following command:The ``.asc`` file is a detached cryptographic signature that can be used to help verify the authenticity of the release.The ``.md5`` file is an MD5 hash of the release to aid in verify the validity of the release download.The ``.sha`` file is a SHA512 hash of the release to aid in verify the validity of the release download.The ``tar.bz2`` file contains the Bzip2-compressed tarball with the source code.The files and directories within ``~/tmp/repo`` can now be uploaded to a web server and serve as a yum repository.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.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.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.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.There are a number of mechanisms to check the authenticity and validity of a downloaded release.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.This command will build the following debian packages. You should have all of the following:To build the Non-OSS plugins, you'll need to have the requisite JARs installed under the ``deps`` directory.To enable you to verify the GPG signature, you will need to download the `KEYS <http://www.apache.org/dist/cloudstack/KEYS>`_ file.Tomcat 6 (not 6.0.35)Verify that Maven is installed correctly:Verifying the downloaded releaseWhile 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: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:You can download the latest CloudStack release from the `Apache CloudStack project download page <http://cloudstack.apache.org/downloads.html>`_.You can now move into the directory:You can now move on to the instructions under Install on Ubuntu.You can safely ignore the warning about a missing override file.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.You next need to import those keys, which you can do by running: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.You should see the following RPMs in that directory:You will need, at a minimum, the following to compile CloudStack: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.genisoimagerpmbuild or dpkg-devProject-Id-Version: Apache CloudStack Installation RTD Report-Msgid-Bugs-To: POT-Creation-Date: 2014-06-30 11:42+0200 PO-Revision-Date: 2014-06-30 09:52+0000 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language-Team: Chinese (China) (http://www.transifex.com/projects/p/apache-cloudstack-installation-rtd/language/zh_CN/) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Language: zh_CN Plural-Forms: nplurals=1; plural=0; 软件包创建完成后,你需要将软件包拷贝至可以提供HTTP服务的系统上。创建用于存放软件包的目录,并使用 ``dpkg-scanpackages`` 命令创建包含归档结构信息的 ``Packages.gz`` 文件。在系统中添加这个仓库源,最后使用该APT安装软件包。 Apache网页服务器常用工具(ws-commons-util)正如先前 `“编译Apache CloudStack的先决条件 <#prerequisites-for-building-apache-cloudstack>`_所说,在编译CloudStack之前需要安装一些先决条件。这里假设你使用的是64位的CentOS或Red Hat Enterprise Linux.由于这些模块需要的依赖项不能和CloudStack一起发行,你需要自行下载。最新的依赖项都列在wiki页面中:`*如何编译CloudStack* <https://cwiki.apache.org/confluence/display/CLOUDSTACK/How+to+build+CloudStack>`_编译DEB包编译 Non-OSS编译CloudStack的RPM包相当简单。假设你已经下载了源码并解压压缩文件到一个本地目录中,你可以在几分钟之内完成编译。从源码编译RPM包从源码编译完成这一步,您可以轻松地在整个网络中的机器上安装CloudStack。配置使用APT仓库源的主机配置你的系统使用新的yum仓库创建yum仓库提取的源代码提取CloudStack发行版源代码相对简单,使用如下命令:GPG生成RPM包使用 ``package.sh`` 脚本生成RPM包:获取密钥获得发行版如果签名是有效的,你会看到一行包含“Good signature”的信息。如果命令成功完成,你应该看不到任何输出。如果有任何输出,则说明你本地生成的哈希值与服务器上获取的不同。如果成功完成,你应该看不到任何输出。如果有任何输出,则说明你本地生成的哈希值与服务器上获取的是不同的。如果你正在使用一个非发行版的CloudStack,请查阅该版本主目录下的INSTALL.md文件。如果你需要支持VMware,NetAPP,F5,NetScaler,SRX或其他非开源软件(nonoss)插件。你需要下载一些独立的组件并遵循从源代码构建稍微不同的过程。除了MD5校验和,CloudStack还提供了SHA512加密哈希,用于验证下载的发行版。您可以通过执行下面的命令验证这个哈希值:除了引导依赖项,还需要安装几个其他的依赖包。请注意,我们推荐使用的Maven 3,在Ubuntu 12.04.1 LTS目前不支持。所以,还需要添加一个包含Maven 3 的PPA库。运行命令“add-apt-repository”,系统将提示您继续添加GPG密钥后继续。除了加密签名,CloudStack还提供了MD5校验和,用于验证下载的发行版。您可以通过执行下面的命令验证这个哈希值:Java (OpenJDK 1.6 或 Java 7/OpenJDK 1.7)MD5Maven (版本 3)Maven还需要知道Java程序路径,和JAVA\_HOME环境变量输出的设置:MySQLMySQLdb (提供python数据库API)接下来,你将需要安装编译CloudStack时依赖的Maven。 使用 Maven 3, 所以你需要 `提取 Maven 3 压缩包 <http://maven.apache.org/download.cgi>`_ 并解压到你的主目录 (或任何你喜欢的目录):请注意,直接从源代码构建和部署一个IaaS通常不是最有效的方式。然而,我们仍将介绍这种方法,就像构建RPMs或Debian软件包来部署CloudStack一样。现在,我们已经创建了仓库,然后配置你的服务器来使用APT仓库源。你可以在 ``/etc/apt/sources.list.d`` 目录中添加仓库文件。使用你喜欢的编辑器来创建``/etc/apt/sources.list.d/cloudstack.list`` 文件并加入类似如下信息:现在我们已经解决了依赖关系,可以使用如下命令编译CloudStack和创建DEB包:现在我们已经满足先决条件和源码,然后进入 `packaging/centos63/` 目录。现在,您已经准备好软件仓库,然后更新以下,使得APT知道从哪里找到CloudStack的软件包。现在你的yum仓库中拥有了RPM包和元数据,我们为需要安装CloudStack的机器创建一个名为``/etc/yum.repos.d/cloudstack.repo``的文件,内容如下:现在你应该可以通过HTTP访问 ``binary`` 目录中所有的DEB安装包和 ``Packages.gz`` 文件。(在进行下一步前,你需要使用 ``wget`` 或 ``curl`` 命令测试。)一旦你复制过来所有的依赖项,你就可以开始使用 ``noredist`` 选项编译CloudStack了。 一旦你创建了CloudStack的 ``noredist`` 配置文件,你可以使用 `“从源码编译RPM包” <#building-rpms-from-source>`_ 或 `“编译DEB包” <#building-deb-packages>`_ 指令打包。打包方式的变化。如果你之前创建过CloudStack软件包,你会意识到自从该项目开始使用Apache Maven,这个步骤发生了很大变化。请一定要密切关注本节中的步骤。编译Apache CloudStack的先决条件之前的版本同样可以通过archive.apache.org获得。请参阅下载页面上的存档版本的更多信息。SHA512设置APT仓库因为许可的问题,一些CloudStack支持的插件不能与CloudStack一起发行。一些原因是,所需要的一些库或JAR文件都有专用的许可。另外一些是因为所需要第三方产品库的许可证不能与Apache的许可相兼容,见`针对第三方产品的Apache许可指南 <http://www.apache.org/legal/resolved.html#category-x>`_.这会需要一些时间,生成的软件包会在 ``dist/rpmbuild/RPMS/x86_64/`` 目录中。CloudStack项目提供了发行版的分离GPG签名。运行如下命令检查签名: ``.asc`` 是一个独立加密签名文件,可以用来帮助验证发行版的真实性。 ``.md5`` 是MD5哈希值文件,用于帮助验证下载的发行版是否有效。 ``.sha`` 是SHA512哈希值文件,用于帮助验证下载的发行版是否有效。``tar.bz2`` 文件包含使用Bzip2压缩的源代码。``~/tmp/repo`` 中的文件和目录现在可以上传到WEB服务器中作为YUM仓库。第一步是确保你已经安装了 **dpkg-dev** 软件。一般在使用 **debhelper** 程序之前就已经安装了。如果你是在其他系统中生成的 ``Packages.gz`` 文件,请确保它已经被安装。本节中的指令仅限定于特定的版本。也就是说,从源码编译4.0.x系列和4.1.x系列的方法是不同的。下一步是将DEB文件复制到提供HTTP服务的目录中。在示例中,我们使用 ``/var/www/cloudstack/repo``作为示例 ,你也可以更改为更适合你的目录。CloudStack官方总是以源代码形式发布。你可以找到 "方便的二进制文件", 这些源都是规范的发布版本。在本节将包括获取和编译发行版源代码,使用Maven、创建Debian或rpm软件包来进行部署。有很多机制可以检查下载的发行版的真实性和有效性。编译CloudStack所需的先决条件很多,本文假定在Linux系统上编译,使用RPMs或DEBs包管理。该命令将创建如下debian软件包。应该有如下这些内容:为了编译NON-OSS插件,你需要安装必要的JAR在``deps`` 目录中。为了实现GPG签名验证,你需要下载 `密钥 <http://www.apache.org/dist/cloudstack/KEYS>`_ 文件。Tomcat 6 (非 6.0.35)验证Maven是否被正确安装:验证下载的版本RPMs是一个有用的包装格式 - 通过网络上YUM仓库来使用是非常简单的。下一步是使用这些软件包创建YUM仓库:虽然我们做了一些定义,并且可能已经安装了引导的前提条件,但仍有一些在编译时需要解决的先决条件。CloudStack使用Maven进行依赖性解析。您可以通过运行以下命令,来解决编译CloudStack时的依赖性:下载CloudStack最新发行版,可以在 `Apache CloudStack 项目下载页面: <http://cloudstack.apache.org/downloads.html>`_.你现在可以进入该目录:现在可以翻到在Ubuntu上安装CloudStack的一章去了。你可以忽略缺少覆盖文件的警告信息。你可能还需要下载`vhd-util <http://download.cloud.com.s3.amazonaws.com/tools/vhd-util>`_, 也是由于授权问题而被移除。 复制vhd-util到该目录: ``scripts/vm/hypervisor/xenserver/``.下一步需要导入这些密钥,你可以运行如下命令:如果想确保环境变量将在注销或重启后仍保留。一定要更新 ``~/.bashrc`` 中的PATH和JAVA\_HOME 变量。你应该看到目录中的RPM包:如下是编译CloudStack的最低需求:你会注意到在'最新发行版'下方有几个链接。一个链接以 ``tar.bz2`` 文件结尾,以及PGP/GPG签名,MD5和ShA512文件。genisoimagerpmbuild 或 dpkg-dev