V2ray 官方安装脚本
安裝和更新 V2Ray

apt-get install -y curl bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh)

安裝最新發行的 geoip.dat 和 geosite.dat

bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-dat-release.sh)

移除 V2Ray

bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh) --remove

该脚本在运行时会提供 info 和 error 等信息,请仔细阅读。

V2Ray 控制命令:

service v2ray restart | force-reload |start|stop|status|reload

测试V2Ray配置文件:

/usr/local/bin/v2ray -test -config /usr/local/etc/v2ray/config.json

启动服务

systemctl start v2ray

设置开机启动

systemctl enable v2ray

项目地址:https://github.com/v2fly/fhs-install-v2ray