- 转移配置文件目录至新目录
/usr/local/etc/v2ray
mkdir -p /usr/local/etc/v2ray
mv /etc/v2ray/config.json /usr/local/etc/v2ray/config.json
- 移除旧脚本安装的 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
- 使用新脚本进行安装
bash <(curl -sL https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh)
- 启动 v2ray 服务(以下两种方法择一)
systemctl enable v2ray
systemctl start v2ray
- 单配置文件+指定档名,例如想指定
/usr/local/etc/v2ray/config.json
就是
systemctl enable v2ray@config
systemctl start v2ray@config