From 5f566b140fbed0c6994f50b779f13a17cf4854a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Wed, 3 Aug 2022 22:23:40 +0800 Subject: [PATCH] Add documentation for simple linux installation --- docs/examples/index.md | 1 + docs/examples/linux-server-install.md | 38 +++++++++++++++++++++++++++ mkdocs.yml | 1 + 3 files changed, 40 insertions(+) create mode 100644 docs/examples/linux-server-install.md diff --git a/docs/examples/index.md b/docs/examples/index.md index 30bf76c4..3c6d5686 100644 --- a/docs/examples/index.md +++ b/docs/examples/index.md @@ -2,6 +2,7 @@ Configuration examples for sing-box. +* [Linux Server Install](./linux-server-install) * [Shadowsocks Server](./ss-server) * [Shadowsocks Client](./ss-client) * [Shadowsocks Tun](./ss-tun) diff --git a/docs/examples/linux-server-install.md b/docs/examples/linux-server-install.md new file mode 100644 index 00000000..1d27d26b --- /dev/null +++ b/docs/examples/linux-server-install.md @@ -0,0 +1,38 @@ +# Requirements + +* Linux & Systemd +* Git +* Go 1.18.5+ +* C compiler environment + +#### Install + +```shell +git clone https://github.com/SagerNet/sing-box +cd sing-box +./release/local/install.sh +``` + +Edit configuration file in `/usr/local/etc/sing-box/config.json` + +```shell +./release/local/enable.sh +``` + +#### Update + +```shell +./release/local/update.sh +``` + +#### Other commands + +| Operation | Command | +|-----------|-----------------------------------------------| +| Start | `sudo systemctl start sing-box` | +| Stop | `sudo systemctl stop sing-box` | +| Kill | `sudo systemctl kill sing-box` | +| Restart | `sudo systemctl restart sing-box` | +| Logs | `sudo journalctl -u sing-box --output cat -e` | +| New Logs | `sudo journalctl -u sing-box --output cat -f` | +| Uninstall | `./release/local/uninstall.sh` | \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 9d8fd83a..339e36e5 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -71,6 +71,7 @@ nav: - Multiplex: configuration/shared/multiplex.md - Examples: - examples/index.md + - Linux Server Install: examples/linux-server-install.md - Shadowsocks Server: examples/ss-server.md - Shadowsocks Client: examples/ss-client.md - Shadowsocks Tun: examples/ss-tun.md