Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update how-to-build.md #5136

Merged
merged 3 commits into from
Sep 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/en/latest/how-to-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ Please refer to: [Installing Apache APISIX with Helm Chart](https://github.com/a
cd apisix-2.9
# Create dependencies
make deps
# Install apisix command
make install
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update CN version at the same time.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think make install means installing the APISIX code into luarocks. The context here is to download the APISIX source code, so does the source code still need to be installed to luarocks? I thought it was no longer needed. what's your option? @spacewander @membphis

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. See the comment here:

apisix/Makefile

Line 167 in 6162ca0

### install: Install the apisix (only for luarocks)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed my mind. Look like we still need this command to install APISIX to PATH even make install is designed for luarocks.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As there is no other command to do it.

```

## Step 3: Manage Apache APISIX Server
Expand Down
18 changes: 10 additions & 8 deletions docs/zh/latest/how-to-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,21 @@ sudo yum install -y https://github.com/apache/apisix/releases/download/2.9/apisi
cd apisix-2.9
# 创建依赖
make deps
# 安装 apisix 命令
make install
```

## 步骤3:管理 Apache APISIX 服务

我们可以在 Apache APISIX 的目录下使用命令初始化依赖、启动服务和停止服务,也可以通过 `make help` 命令查看所有命令和对应的功能。
我们可以在 Apache APISIX 的目录下使用命令初始化依赖、启动服务和停止服务,也可以通过 `apisix help` 命令查看所有命令和对应的功能。

### 初始化依赖

运行以下命令初始化 NGINX 配置文件和 etcd。

```shell
# initialize NGINX config file and etcd
make init
apisix init
```

### 启动 Apache APISIX
Expand All @@ -97,34 +99,34 @@ make init

```shell
# start Apache APISIX server
make run
apisix start
```

### 停止运行 Apache APISIX

优雅停机 `make quit` 和强制停机 `make stop`都可以停止运行 Apache APISIX。建议您优先选择优雅停机的方式停止 Apache APISIX,因为这种停止方式能够保证 Apache APISIX 完成了已经接受到的请求之后再停止;而强制停机则是立即停止 Apache APISIX,在这种情况下,Apache APISIX 接收到但未完成的请求会随着强制停机一并停止。
优雅停机 `apisix quit` 和强制停机 `apisix stop`都可以停止运行 Apache APISIX。建议您优先选择优雅停机的方式停止 Apache APISIX,因为这种停止方式能够保证 Apache APISIX 完成了已经接受到的请求之后再停止;而强制停机则是立即停止 Apache APISIX,在这种情况下,Apache APISIX 接收到但未完成的请求会随着强制停机一并停止。

执行优雅停机的命令如下所示:

```shell
# stop Apache APISIX server gracefully
make quit
apisix quit
```

执行强制停机的命令如下所示:

```shell
# stop Apache APISIX server immediately
make stop
apisix stop
```

### 查看其他操作

运行 `make help` 命令,查看返回结果,获取其他操作的命令和描述。
运行 `apisix help` 命令,查看返回结果,获取其他操作的命令和描述。

```shell
# more actions find by `help`
make help
apisix help
```

## 步骤4:运行测试案例
Expand Down