Browse Source

Add documentation for simple linux installation

世界 3 years ago
parent
commit
5f566b140f
3 changed files with 40 additions and 0 deletions
  1. 1 0
      docs/examples/index.md
  2. 38 0
      docs/examples/linux-server-install.md
  3. 1 0
      mkdocs.yml

+ 1 - 0
docs/examples/index.md

@@ -2,6 +2,7 @@
 
 
 Configuration examples for sing-box.
 Configuration examples for sing-box.
 
 
+* [Linux Server Install](./linux-server-install)
 * [Shadowsocks Server](./ss-server)
 * [Shadowsocks Server](./ss-server)
 * [Shadowsocks Client](./ss-client)
 * [Shadowsocks Client](./ss-client)
 * [Shadowsocks Tun](./ss-tun)
 * [Shadowsocks Tun](./ss-tun)

+ 38 - 0
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`                |

+ 1 - 0
mkdocs.yml

@@ -71,6 +71,7 @@ nav:
           - Multiplex: configuration/shared/multiplex.md
           - Multiplex: configuration/shared/multiplex.md
   - Examples:
   - Examples:
       - examples/index.md
       - examples/index.md
+      - Linux Server Install: examples/linux-server-install.md
       - Shadowsocks Server: examples/ss-server.md
       - Shadowsocks Server: examples/ss-server.md
       - Shadowsocks Client: examples/ss-client.md
       - Shadowsocks Client: examples/ss-client.md
       - Shadowsocks Tun: examples/ss-tun.md
       - Shadowsocks Tun: examples/ss-tun.md