安装golang

主要是用于linux安装

安装,配置

# 下载
wget https://dl.google.com/go/go1.13.6.linux-amd64.tar.gz
# 解压
tar -C /usr/local -xzf go1.13.3.linux-amd64.tar.gz
# 配置 .bashrc
export GO111MODULE=on
export GOPROXY=https://goproxy.cn
export GOPATH="/root/go"
export GOBIN="$GOPATH/bin"
export PATH=$PATH:$GOBIN:/usr/local/go/bin
source .bashrc
# 验证
go env

一键脚本

curl https://ysicing.me/hack/install/go.sh | bash
Copyright © 2020 | 仅供学习参考,不可用于其他途径. all right reserved,powered by Gitbook Updated at 2020-01-22 08:01:03

results matching ""

    No results matching ""