yzeng25 commented on a change in pull request #4577: URL: https://github.com/apache/apisix/pull/4577#discussion_r667647026
########## File path: docs/zh/latest/how-to-build.md ########## @@ -21,146 +21,200 @@ title: 如何构建 Apache APISIX # --> -## 1. 安装依赖 +## 步骤1:安装依赖 -Apache APISIX 的运行环境需要 Nginx 和 etcd, +Apache APISIX 的运行环境需要依赖 Nginx 和 etcd,所以在安装 Apache APISIX 前,请根据您使用的操作系统安装对应的依赖。我们提供了 **CentOS7** 、**Fedora 31 & 32** 、**Ubuntu 16.04 & 18.04** 、 **Debian 9 & 10** 和 **MacOS X** 的依赖安装操作步骤,详情请参考[安装依赖](install-dependencies.md)。 -所以在安装前,请根据不同的操作系统来[安装依赖](install-dependencies.md)。 +通过 Docker 或 Helm Chart 安装 Apache APISIX 时,已经包含了所需的 Nginx 和 etcd,请参照各自对应的文档。 -通过 Docker / Helm Chart 安装时可能已经包含了所需的 Nginx 和 etcd。 -请参照各自对应的文档。 +## 步骤2:安装 Apache APISIX -## 2. 安装 Apache APISIX +你可以通过源码包、RPM 包、Docker、Helm Chart 等多种方式来安装 Apache APISIX。请在以下选项中选择其中一种执行。 -你可以通过源码包、Docker、Helm Chart 等多种方式来安装 Apache APISIX。 +### 通过源码包安装 + +1. 创建一个名为 `apisix-2.7` 的文件夹。 + + ```shell + mkdir apisix-2.7 + ``` + +2. 下载 Apache Release 源码包: + + ```shell + wget https://downloads.apache.org/apisix/2.7/apache-apisix-2.7-src.tgz + ``` + +3. 解压 Apache Release 源码包: + + ```shell + tar zxvf apache-apisix-2.7-src.tgz -C apisix-2.7 + ``` + +4. 安装运行时依赖的 Lua 库: + + ```shell + # 切换到 apisix-2.7 文件夹 + cd apisix-2.7 + # 创建依赖 + make deps + ``` ### 通过 RPM 包安装(CentOS 7) +这种安装方式适用于 CentOS 7 操作系统,请运行以下命令安装 Apache APISIX。 + ```shell sudo yum install -y https://github.com/apache/apisix/releases/download/2.7/apisix-2.7-0.x86_64.rpm ``` ### 通过 Docker 安装 -见 https://hub.docker.com/r/apache/apisix +详情请参考:[使用 Docker 安装 Apache APISIX](https://hub.docker.com/r/apache/apisix)。 ### 通过 Helm Chart 安装 -见 https://github.com/apache/apisix-helm-chart +详情请参考:[使用 Helm Chart 安装 Apache APISIX](https://github.com/apache/apisix-helm-chart)。 -### 通过源码包安装 +## 步骤3:管理 APISIX 服务 -你需要先下载 Apache Release 源码包: +我们可以在 APISIX 的目录下使用命令初始化依赖、启动服务和停止服务,也可以通过 `make help` 命令查看所有命令和对应的功能。 -```shell -$ mkdir apisix-2.7 -$ wget https://downloads.apache.org/apisix/2.7/apache-apisix-2.7-src.tgz -$ tar zxvf apache-apisix-2.7-src.tgz -C apisix-2.7 -``` +### 初始化依赖 -安装运行时依赖的 Lua 库: +运行以下命令初始化 Nginx 配置文件和 etcd。 -``` -cd apisix-2.7 -make deps +```shell +# init nginx config file and etcd +make init ``` -## 3. 管理(启动、关闭等)APISIX 服务 +### 启动 APISIX Review comment: Fixed -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
