This is an automated email from the ASF dual-hosted git repository.
tokers pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push:
new adb76de docs: add instruction about how to add systemd unit files
(#4246)
adb76de is described below
commit adb76de293eeb2c300b94a2099dc7b7f139245f7
Author: Shuyang Wu <[email protected]>
AuthorDate: Tue May 18 21:30:21 2021 -0400
docs: add instruction about how to add systemd unit files (#4246)
Signed-off-by: yiyiyimu <[email protected]>
---
docs/en/latest/how-to-build.md | 12 ++++++++++++
docs/zh/latest/how-to-build.md | 12 ++++++++++++
2 files changed, 24 insertions(+)
diff --git a/docs/en/latest/how-to-build.md b/docs/en/latest/how-to-build.md
index 662463d..6dd3d51 100644
--- a/docs/en/latest/how-to-build.md
+++ b/docs/en/latest/how-to-build.md
@@ -167,3 +167,15 @@ Content-Type: text/html
Some features require you to build OpenResty with extra Nginx modules.
If you need those features, you can build OpenResty with
[this build
script](https://raw.githubusercontent.com/api7/apisix-build-tools/master/build-apisix-openresty.sh).
+
+## 7. Add systemd unit file for APISIX
+
+If you install APISIX with rpm package, the unit file is installed
automatically, and you could directly do
+
+```
+$ systemctl start apisix
+$ systemctl stop apisix
+$ systemctl enable apisix
+```
+
+If installed in other methods, you could refer to [the unit file
template](https://github.com/api7/apisix-build-tools/blob/master/usr/lib/systemd/system/apisix.service),
modify if needed, and place it as `/usr/lib/systemd/system/apisix.service`.
diff --git a/docs/zh/latest/how-to-build.md b/docs/zh/latest/how-to-build.md
index b64eec5..b2060cd 100644
--- a/docs/zh/latest/how-to-build.md
+++ b/docs/zh/latest/how-to-build.md
@@ -161,3 +161,15 @@ Content-Type: text/html
有些功能需要你引入额外的 Nginx 模块到 OpenResty 当中。
如果你需要这些功能,你可以用[这个脚本](https://raw.githubusercontent.com/api7/apisix-build-tools/master/build-apisix-openresty.sh)
构建 OpenResty。
+
+## 7. 为 APISIX 添加 systemd 配置文件
+
+如果通过 rpm 包安装 APISIX,配置文件已经自动安装到位,你可以直接运行
+
+```
+$ systemctl start apisix
+$ systemctl stop apisix
+$ systemctl enable apisix
+```
+
+如果通过其他方法安装,可以参考[配置文件模板](https://github.com/api7/apisix-build-tools/blob/master/usr/lib/systemd/system/apisix.service)进行修改,并将其放置在
`/usr/lib/systemd/system/apisix.service`。