Skip to content

Instantly share code, notes, and snippets.

@phlinhng
Created August 16, 2020 13:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save phlinhng/d0b7a9d754681866be54244e372b24f3 to your computer and use it in GitHub Desktop.
Save phlinhng/d0b7a9d754681866be54244e372b24f3 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/v2ray@.service
rm -f /etc/systemd/system/v2ray@.service
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