Skip to content

Instantly share code, notes, and snippets.

@ComeBey
Created May 14, 2020 09:55
Show Gist options
  • Save ComeBey/c63453fae7596fc63bd522eb90561f26 to your computer and use it in GitHub Desktop.
Save ComeBey/c63453fae7596fc63bd522eb90561f26 to your computer and use it in GitHub Desktop.
v2ray官方脚本搭建
1.V2Ray 提供了一个在 Linux 中的自动化安装脚本。这个脚本会自动检测有没有安装过 V2Ray,如果没有,则进行完整的安装和配置;如果之前安装过 V2Ray,则只更新 V2Ray 二进制程序而不更新配置。
以下指令假设已在 su 环境下,如果不是,请先运行 sudo su。
运行下面的指令下载并安装 V2Ray。当 yum 或 apt-get 可用的情况下,此脚本会自动安装 unzip 和 daemon。这两个组件是安装 V2Ray 的必要组件。如果你使用的系统不支持 yum 或 apt-get,请自行安装 unzip 和 daemon
2.(1)debian系统vps时间同步本地时间 (先输入sudo -i在同步时间 必须同步时间切记)
rm -rf /etc/localtime
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
(2)centos7系统vps时间同步本地时间(先输入dudo -i在同步时间 必须同步时间切记)
#设置硬件时钟调整为与本地时钟一致
timedatectl set-local-rtc 1
#设置时区为上海
timedatectl set-timezone Asia/Shangha
3.v2ray官方代码
输入代码安装 bash <(curl -L -s https://install.direct/go.sh)
4.查看v2ray运行程序
输入代码service v2ray start 开启v2ray
输入代码service v2ray stop 关闭v2ray
输入代码service v2ray restart 重新启动v2ray
输入代码service v2ray status -l 查看v2ray运行状态
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment