V2RY

安装

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

升级库

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

移除

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

配置

vi /usr/local/etc/v2ray/config.json

启动

systemctl start v2ray

自启动

systemctl enable v2ray;

看状态

systemctl status v2ray

sed -i "s/v2ray -config/v2ray run -config/g" /etc/systemd/system/v2ray.service.d/10-donot_touch_single_conf.conf
systemctl daemon-reload
systemctl restart v2ray

防火墙

firewall-cmd --zone=public --add-port=2011/tcp --permanent

firewall-cmd --zone=public --add-port=2012/tcp --permanent
firewall-cmd --zone=public --add-port=2013/tcp --permanent
firewall-cmd --zone=public --add-port=2014/tcp --permanent
firewall-cmd --reload

关于V2 到5.1.0不能用的问题

是这种报错的
● v2ray.service - V2Ray Service
     Loaded: loaded (/etc/systemd/system/v2ray.service; enabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/v2ray.service.d
             └─10-donot_touch_single_conf.conf

    Process: 3975576 ExecStart=/usr/local/bin/v2ray -config /usr/local/etc/v2ray/config.json (code=exited, status=2)
   Main PID: 3975576 (code=exited, status=2)

这种报错的  

处理方式1:
rm -rf /etc/systemd/system/v2ray.service.d/10-donot_touch_single_conf.conf
systemctl daemon-reload
systemctl restart v2ray
处理方式2:
vi /etc/systemd/system/v2ray.service.d/10-donot_touch_single_conf.conf
把ExecStart=/usr/local/bin/v2ray -config /usr/local/etc/v2ray/config.json
改为ExecStart=/usr/local/bin/v2ray run -config /usr/local/etc/v2ray/config.json
systemctl daemon-reload
systemctl restart v2ray
具体命令↓
sed -i "s/v2ray -config/v2ray run -config/g" /etc/systemd/system/v2ray.service.d/10-donot_touch_single_conf.conf
systemctl daemon-reload
systemctl restart v2ray
处理方式3:
切回老版本:
bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh) --version v4.45.2 就好啦