环境
| 版本 | 关联 |
---|---|---|
CentOS 7 | x86_64-DVD-2009 | 下载 |
安装
同步时间
# 安装服务yum install -y ntpdate
# 设置时区timedatectl set-timezone Asia/Shanghai
# 开始同步ntpdate us.pool.ntp.org
开始安装
# 安装依赖yum makecacheyum install curl
# 下载脚本curl -O https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh
# 执行安装bash install-release.sh
或者这样安装
已经弃用 bash <(curl -L -s https://install.direct/go.sh)使用这个 curl -Ls https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh | sudo bash
官方是这样安装
安裝和更新 V2Ray
// 安裝執行檔和 .dat 資料檔# bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh)
安裝最新發行的 geoip.dat 和 geosite.dat
// 只更新 .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
安装完成
# 开机启动systemctl enable v2ray
# 启动运行systemctl start v2ray
配置
# 生成 UUIDcat /proc/sys/kernel/random/uuid
# 配置文件vi /usr/local/etc/v2ray/config.json
{
"inbounds":[{
"port":1080,
"protocol":"vmess",
"settings":{
"clients":[{//改为上面生成的UUID
"id":"faabe58b-7ed5-4f7f-ba3a-bad10c1cb08b",
"alterId":64}]
}
}],
"outbounds":[{"protocol":"freedom","settings":{}}]
}
# 重新启动systemctl restart v2ray
V2ray Core 下载地址
https://github.com/v2ray/v2ray-core/releases
V2rayN PC 端下载地址
https://github.com/2dust/v2rayN/releases
V2rayNG Android 端下载地址
https://github.com/2dust/v2rayNG/releases
V2rayNG Mac 端下载地址
可以试试这个 https://github.com/yanue/V2rayU/releases
相关文章: