SylviaBABY commented on code in PR #7022: URL: https://github.com/apache/apisix/pull/7022#discussion_r870008646
########## docs/zh/latest/getting-started.md: ########## @@ -68,51 +109,75 @@ curl --location --request GET "http://httpbin.org/get?foo1=bar1&foo2=bar2" } ``` -## 前提条件 +## 安装 APISIX -- 已安装 [Docker Compose 组件](https://docs.docker.com/compose/)。 +在本文中我们将使用 Docker 安装 APISIX 并启用 [Admin API](./admin-api.md)。 -- 本文使用 [curl](https://curl.se/docs/manpage.html) 命令行进行 API 测试。您也可以使用其他工具例如 [Postman](https://www.postman.com/) 等,进行测试。 +首先,通过 `git` 命令克隆 [apisix-docker](https://github.com/apache/apisix-docker) 仓库: -<!-- -# -# In addition to the basic Markdown syntax, we use remark-admonitions -# alongside MDX to add support for admonitions. Admonitions are wrapped -# by a set of 3 colons. -# Please refer to https://docusaurus.io/docs/next/markdown-features/admonitions -# for more detail. -# ---> +```bash +git clone https://github.com/apache/apisix-docker.git +cd apisix-docker/example +``` + +现在你可以 `docker-compose` 启动 APISIX。 + +<Tabs + groupId="cpu-arch" + defaultValue="x86" + values={[ + {label: 'x86', value: 'x86'}, + {label: 'ARM/M1', value: 'arm'}, + ]}> +<TabItem value="x86"> + +```shell +docker-compose -p docker-apisix up -d +``` + +</TabItem> + +<TabItem value="arm"> + +```shell +docker-compose -p docker-apisix -f docker-compose-arm64.yml up -d +``` + +</TabItem> +</Tabs> + +:::note + +你也可以参考 [APISIX 安装指南](./how-to-build.md)了解不同的安装方法。 -:::note 说明 -如果您已经安装了 Apache APISIX,请直接阅读 [第二步](getting-started.md#第二步:创建路由) ::: -## 第一步:安装 Apache APISIX +:::info IMPORTANT + +请确保其他系统进程没有占用 **9080、9443 和 2379** 端口。 -得益于 Docker,我们可以通过执行以下命令来启动 Apache APISIX 并启用 [Admin API](./admin-api.md)。 +在基于 UNIX 的系统中,可以使用以下命令来终止指定监听端口的运行: ```bash -#将 Apache APISIX 的 Docker 镜像下载到本地 -git clone https://github.com/apache/apisix-docker.git -# 将当前的目录切换到 apisix-docker/example 路径下 -cd apisix-docker/example -# 运行 docker-compose 命令,安装 Apache APISIX -docker-compose -p docker-apisix up -d +sudo fuser -k 9443/tcp ``` -> Apache APISIX 已支持 ARM64 架构。如果您正在使用 ARM64,请在最后一步执行 `docker-compose -p docker-apisix -f docker-compose-arm64.yml up -d`。 +如果 Docker 容器不能正常运行,你可以通过以下命令检查日志以诊断问题: Review Comment: ```suggestion 如果 Docker 容器不能正常运行,你可以通过以下命令检查日志进行问题诊断: ``` -- 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]
