mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-22 08:31:30 +00:00
Simplify server installation
This commit is contained in:
parent
561a9e5275
commit
122daa4bfb
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
* Linux & Systemd
|
* Linux & Systemd
|
||||||
* Git
|
* Git
|
||||||
* Go 1.18.5+
|
|
||||||
* C compiler environment
|
* C compiler environment
|
||||||
|
|
||||||
#### Install
|
#### Install
|
||||||
|
@ -10,6 +9,7 @@
|
||||||
```shell
|
```shell
|
||||||
git clone https://github.com/SagerNet/sing-box
|
git clone https://github.com/SagerNet/sing-box
|
||||||
cd sing-box
|
cd sing-box
|
||||||
|
./release/local/install_go.sh # skip if you have go1.19 already installed
|
||||||
./release/local/install.sh
|
./release/local/install.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
* Linux & Systemd
|
* Linux & Systemd
|
||||||
* Git
|
* Git
|
||||||
* Go 1.18.5+
|
|
||||||
* C 编译器环境
|
* C 编译器环境
|
||||||
|
|
||||||
#### 安装
|
#### 安装
|
||||||
|
@ -10,10 +9,11 @@
|
||||||
```shell
|
```shell
|
||||||
git clone https://github.com/SagerNet/sing-box
|
git clone https://github.com/SagerNet/sing-box
|
||||||
cd sing-box
|
cd sing-box
|
||||||
|
./release/local/install_go.sh # 如果已安装 go1.19 则跳过
|
||||||
./release/local/install.sh
|
./release/local/install.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
Edit configuration file in `/usr/local/etc/sing-box/config.json`
|
编辑配置文件 `/usr/local/etc/sing-box/config.json`
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
./release/local/enable.sh
|
./release/local/enable.sh
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
set -e -o pipefail
|
set -e -o pipefail
|
||||||
|
|
||||||
|
if [ -d /usr/local/go ]; then
|
||||||
|
export PATH="$PATH:/usr/local/go/bin"
|
||||||
|
fi
|
||||||
|
|
||||||
DIR=$(dirname "$0")
|
DIR=$(dirname "$0")
|
||||||
PROJECT=$DIR/../..
|
PROJECT=$DIR/../..
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
set -e -o pipefail
|
set -e -o pipefail
|
||||||
|
|
||||||
|
if [ -d /usr/local/go ]; then
|
||||||
|
export PATH="$PATH:/usr/local/go/bin"
|
||||||
|
fi
|
||||||
|
|
||||||
DIR=$(dirname "$0")
|
DIR=$(dirname "$0")
|
||||||
PROJECT=$DIR/../..
|
PROJECT=$DIR/../..
|
||||||
|
|
||||||
|
|
7
release/local/install_go.sh
Executable file
7
release/local/install_go.sh
Executable file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e -o pipefail
|
||||||
|
curl -o go.tar.gz https://go.dev/dl/go1.19.linux-amd64.tar.gz
|
||||||
|
sudo rm -rf /usr/local/go
|
||||||
|
sudo tar -C /usr/local -xzf go.tar.gz
|
||||||
|
rm go.tar.gz
|
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
set -e -o pipefail
|
set -e -o pipefail
|
||||||
|
|
||||||
|
if [ -d /usr/local/go ]; then
|
||||||
|
export PATH="$PATH:/usr/local/go/bin"
|
||||||
|
fi
|
||||||
|
|
||||||
DIR=$(dirname "$0")
|
DIR=$(dirname "$0")
|
||||||
PROJECT=$DIR/../..
|
PROJECT=$DIR/../..
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue