echo -e "\e[37;44;4;1mThe old script is abandoned, we will redirect you to the new one in 5 seconds.\e[0m" echo -e "\e[37;44;4;1mIf you want to download the new script and run it manually, press Ctrl+C and visit https://v2raya.org/en/docs/prologue/installation/\e[0m"
# The files installed by the script conform to the Filesystem Hierarchy Standard: # https://wiki.linuxfoundation.org/lsb/fhs
# The URL of the script project is: # https://github.com/v2fly/fhs-install-v2ray
# The URL of the script is: # https://hubmirror.v2raya.org/raw/v2fly/fhs-install-v2ray/master/install-release.sh
# If the script executes incorrectly, go to: # https://github.com/v2fly/fhs-install-v2ray/issues
# You can set this variable whatever you want in shell session right before running this script by issuing: # export DAT_PATH='/usr/local/share/v2ray' DAT_PATH=${DAT_PATH:-/usr/local/share/v2ray}
# You can set this variable whatever you want in shell session right before running this script by issuing: # export JSON_PATH='/usr/local/etc/v2ray' JSON_PATH=${JSON_PATH:-/usr/local/etc/v2ray}
# Set this variable only if you are starting v2ray with multiple configuration files: # export JSONS_PATH='/usr/local/etc/v2ray'
# Set this variable only if you want this script to check all the systemd unit file: # export check_all_service_files='yes'
systemd_cat_config() { if systemd-analyze --help | grep -qw 'cat-config'; then systemd-analyze --no-pager cat-config "$@" echo else echo"${aoi}~~~~~~~~~~~~~~~~" cat"$@""$1".d/* echo"${aoi}~~~~~~~~~~~~~~~~" echo"${red}warning: ${green}The systemd version on the current operating system is too low." echo"${red}warning: ${green}Please consider to upgrade the systemd or the operating system.${reset}" echo fi } ......
之后就简单了,先复制所有脚本。然后再云 Ubuntu 上新建一个名为 go.sh 的文件:
1
vim go.sh
打开时候,就可以用 sudo bash 执行这个文件了:
1
sudo bash go.sh
之后就进入了脚本执行环节(就是一些下载和执行操作):
1 2 3 4 5 6 7 8 9 10 11 12 13
root@**************:~# sudo bash go.sh info: Installing V2Ray v5.7.0 for x86_64 Downloading V2Ray archive: https://github.com/v2fly/v2ray-core/releases/download/v5.7.0/v2ray-linux-64.zip % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 11.4M 100 11.4M 0 0 18422 0 0:10:49 0:10:49 --:--:-- 11091 Downloading verification file for V2Ray archive: https://github.com/v2fly/v2ray-core/releases/download/v5.7.0/v2ray-linux-64.zip.dgst Reading package lists... Done Building dependency tree Reading state information... Done ......
这样就完成了下载,对了再加两条命令,以完成核心服务自启动和现在启动:
1 2
systemctl start v2ray systemctl enable v2ray
二、安装v2raya客户端
(一)方法一(可能会失败)
1、添加公钥
1
wget -qO - https://apt.v2raya.org/key/public-key.asc | sudo tee /etc/apt/trusted.gpg.d/v2raya.asc