1. 下载并安装 v2ray 内核
## 下载v2ray-core,并保存到tmp目录
wget -O /tmp/v2ray-linux-64.zip https://ghfast.top/https://github.com/v2fly/v2ray-core/releases/download/v5.24.0/v2ray-linux-64.zip
# 核对文件的指纹信息, 如果与以下输出一致则表示安装文件是安全的,否则请谨慎安装。
# 指纹信息可以在https://github.com/v2fly/v2ray-core/releases/download/v5.24.0/v2ray-linux-64.zip.dgst中找到
openssl dgst -SHA2-256 v2ray-linux-64.zip
SHA2-256(/tmp/v2ray-linux-64.zip)= 2556dd39ac7c8dbc9de0fa2a539539e82ac864096d5eaa4191d97c22e1ee9a89
# 将其解压到/usr/local/v2ray-core, 需要root权限
sudo unzip /tmp/v2ray-linux-64.zip -d /usr/local/v2ray-core
# 将.dat文件拷贝到/usr/local/share/v2ray/
sudo mkdir -p /usr/local/share/v2ray/
sudo cp /usr/local/v2ray-core/*dat /usr/local/share/v2ray/
rm -rf /tmp/v2ray-linux-64.zip
Bash2. 下载并安装 v2rayA
对于 debian 系列发行版(Ubuntu, Mint, MX, Kubuntu, Zorin 等等):
# 下载debian安装包, 针对不同的硬件架构以下下载命令稍做调整即可.
# 所有安装包可以在这里找到https://github.com/v2rayA/v2rayA/releases/
wget -O /tmp/installer_debian_x64_2.2.6.3.deb https://ghfast.top/https://github.com/v2rayA/v2rayA/releases/download/v2.2.6.3/installer_debian_x64_2.2.6.3.deb
# 核对文件的指纹信息, 如果与以下输出一致则表示安装文件是安全的,否则请谨慎安装。
# 权威指纹信息可以在github release download 同级目录下找到。
$ openssl dgst -SHA2-256 /tmp/installer_debian_x64_2.2.6.3.deb
SHA2-256(/tmp/installer_debian_x64_2.2.6.3.deb)= 51bf5501198397adb5f43b0d396893bfb544acc7a9eba08f9e07c19cd606cd0c
# 安装v2rayA
sudo apt install /tmp/installer_debian_x64_2.2.6.3.deb
Bash对于 Redhat 系列发行版(Centos, Fedora, AlmaLinux, Rocky Linux 等):
# 使用wget下载v2rayA rpm包
wget -O /tmp/installer_redhat_x64_2.2.6.3.rpm https://ghfast.top/https://github.com/v2rayA/v2rayA/releases/download/v2.2.6.3/installer_redhat_x64_2.2.6.3.rpm
# 核对文件的指纹信息, 如果与以下输出一致则表示安装文件是安全的,否则请谨慎安装。
# 指纹信息可以在github release download 同级目录下找到。
$ openssl dgst -SHA2-256 /tmp/installer_redhat_x64_2.2.6.3.rpm
SHA2-256(/tmp/installer_redhat_x64_2.2.6.3.rpm)= f07c95760b9f63a50dbabf0e6d39f3b7572377d0a8d2716d0f0b63b922328c49
# 安装 v2rayA
sudo rpm -i /tmp/installer_redhat_x64_2.2.6.3.rpm
rm -rf /tmp/installer_redhat_x64_2.2.6.3.rpm
Bash3. 配置 v2rayA
修改配置文件:
sudo vim /etc/default/v2raya
# 将V2rayA和v2ray-core关联起来
# 添加配置两行配置
V2RAYA_V2RAY_BIN=/usr/local/v2ray-core/v2ray
V2RAYA_V2RAY_CONFDIR=/usr/local/v2ray-core
Bash系统参数配置:
# 确保回环网卡开启了ipv6
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0
# 修改/etc/sysctl.conf 回环网卡永久开启ipv6
sudo vim /etc/sysctl.conf
net.ipv6.conf.lo.disable_ipv6 = 0
Bash设置开机自启:
# --now 参数表示设置为开机启动并立即启动v2raya
sudo systemctl enable --now v2raya
# 查看服务状态
systemctl status v2raya
Bash在浏览器中打开 v2rayA web 管理界面 http://localhost:2017/
原文链接:https://pengtech.net/network/v2rayA_install.html,更详细的配置可以查看这篇博客。