Skip to content

Instantly share code, notes, and snippets.

@q158073378252010
Forked from phlinhng/go-to-fhs.md
Created August 17, 2020 10:19
Show Gist options
  • Save q158073378252010/5b19f19b86f2e02d78c4dd3f8e2a115f to your computer and use it in GitHub Desktop.
Save q158073378252010/5b19f19b86f2e02d78c4dd3f8e2a115f to your computer and use it in GitHub Desktop.
V2Ray 从原有 go.sh 遷移至 install-realese.sh 教程
  1. 转移配置文件目录至新目录 /usr/local/etc/v2ray
mkdir -p /usr/local/etc/v2ray
mv /etc/v2ray/config.json /usr/local/etc/v2ray/config.json
  1. 移除旧脚本安装的 v2ray-core(由于旧脚本停用,只能手动移除)
systemctl stop v2ray
systemctl disable v2ray
rm -f /etc/systemd/system/v2ray.service
rm -f /etc/systemd/system/v2ray.service
rm -f /etc/systemd/system/[email protected]
rm -f /etc/systemd/system/[email protected]
rm -rf /etc/v2ray
rm -rf /usr/bin/v2ray
# 之前手动修改过 v2ray.service 使用 domain socket 的人还需要以下三行
rm -rf /tmp/v2ray-ds
deluser v2ray
delgroup --only-if-empty v2ray
  1. 使用新脚本进行安装
bash <(curl -sL https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh)
  1. 启动 v2ray 服务(以下两种方法择一)
  • 多配置文件(兼容单配置)
systemctl enable v2ray
systemctl start v2ray
  • 单配置文件+指定档名,例如想指定 /usr/local/etc/v2ray/config.json 就是
systemctl enable v2ray@config
systemctl start v2ray@config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment