github.com/inazumav/sing-box@v0.0.0-20230926072359-ab51429a14f1/docs/examples/linux-server-installation.zh.md (about) 1 #### 依赖 2 3 * Linux & Systemd 4 * Git 5 * C 编译器环境 6 7 #### 安装 8 9 ```shell 10 git clone -b main https://github.com/SagerNet/sing-box 11 cd sing-box 12 ./release/local/install_go.sh # 如果已安装 golang 则跳过 13 ./release/local/install.sh 14 ``` 15 16 编辑配置文件 `/usr/local/etc/sing-box/config.json` 17 18 ```shell 19 ./release/local/enable.sh 20 ``` 21 22 #### 更新 23 24 ```shell 25 ./release/local/update.sh 26 ``` 27 28 #### 其他命令 29 30 | 操作 | 命令 | 31 |------|-----------------------------------------------| 32 | 启动 | `sudo systemctl start sing-box` | 33 | 停止 | `sudo systemctl stop sing-box` | 34 | 强制停止 | `sudo systemctl kill sing-box` | 35 | 重启 | `sudo systemctl restart sing-box` | 36 | 查看日志 | `sudo journalctl -u sing-box --output cat -e` | 37 | 实时日志 | `sudo journalctl -u sing-box --output cat -f` | 38 | 卸载 | `./release/local/uninstall.sh` |