Migrate from the old script to this

master
Dct Mei 2020-08-15 03:21:56 +00:00
parent a1f976aeb9
commit ad1d0a9aa4
1 changed files with 93 additions and 0 deletions

@ -0,0 +1,93 @@
## 從舊腳本遷移至此
* 請確保你正在使用主流且不過時的發行版。
### 停止 V2Ray 服務
```
# systemctl disable v2ray.service --now
```
### 移除原有文檔
```
# rm -r /usr/bin/v2ray/
# rm /etc/systemd/system/v2ray.service
# rm /lib/systemd/system/v2ray.service
# rm /etc/init.d/v2ray
```
### 遷移配置文檔
```
# mv /etc/v2ray/ /usr/local/etc/
```
如果你不想遷移配置文檔,請在下載腳本後自行修改:
```
# vim install-release.sh
JSON_PATH='/etc/v2ray/'
```
### 修改 Log 權限
#### nobody:nogroup
```
$ id nobody
uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup)
```
```
# chown -R nobody:nogroup /var/log/v2ray/
```
#### nobody:nobody
```
$ id nobody
uid=65534(nobody) gid=65534(nobody) groups=65534(nobody)
```
```
# chown -R nobody:nobody /var/log/v2ray/
```
### 安裝 cURL
#### Debian
```
# apt update
# apt install curl
```
#### CentOS / Fedora
```
# dnf makecache
# dnf install curl
```
#### openSUSE
```
# zypper refresh
# zypper install curl
```
### 下載此腳本
```
$ curl -O https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh
```
### 執行此腳本
```
# bash install-release.sh
```