mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-09-07 20:45:19 -04:00
1.3 KiB
1.3 KiB
V2Ray 安装方式
预编译程序
编译源文件
大概流程,请根据实际情况修改
- 安装 Git: sudo apt-get install git -y
- 安装 golang:
- curl -o go_latest.tar.gz https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz
- sudo tar -C /usr/local -xzf go_latest.tar.gz
- export PATH=$PATH:/usr/local/go/bin
- export GOPATH=$HOME/work
- go get github.com/v2ray/v2ray-core
- go build github.com/v2ray/v2ray-core/release/server
Arch Linux
- 安装 Git: sudo pacman -S git
- 安装 golang:sudo pacman -S go
- export GOPATH=$HOME/work
- go get github.com/v2ray/v2ray-core
- go build -o $GOPATH/bin/v2ray -compiler gc github.com/v2ray/v2ray-core/release/server
Debian / Ubuntu
sudo bash <(curl -s https://raw.githubusercontent.com/v2ray/v2ray-core/master/release/install.sh)
此脚本会自动安装 git 和 golan 1.5 (如果系统上没有的话),然后把 v2ray 编译到 $GOPATH/bin/v2ray,新装的 golang 会把 GOPATH 设定到 /v2ray。