Skip to content

Latest commit

 

History

History
25 lines (20 loc) · 480 Bytes

01-golang安装配置.md

File metadata and controls

25 lines (20 loc) · 480 Bytes

linux

下载安装

wget https://studygolang.com/dl/golang/go1.13.4.linux-amd64.tar.gz
sudo tar zxvf go1.13.4.linux-amd64.tar.gz -C /usr/local 

配置

sudo mkdir -p $HOME/{src,bin,pkg}
cat >> ~/.bash_profile <<EOF
# Enable the go modules feature
export GO111MODULE=on
# Set the GOPROXY environment variable
export GOPROXY=https://goproxy.cn
export GOROOT=/usr/local/go
export GOPATH=$HOME
export PATH=\$PATH:\$GOROOT/bin
EOF

. ~/.bash_profile