linux 安装golang环境
linux 安装golang环境
wget https://dl.google.com/go/go1.13.5.linux-amd64.tar.gz # 下载 tar -xzvf go1.13.5.linux-amd64.tar.gz -C /usr/local/ # 解压 vim /etc/profile # 编辑环境变量 export PATH=$PATH:/usr/local/go/bin export GOROOT=/usr/local/go export GOPATH=/root/01-yu/01-gopath export PATH=$PATH:/root/01-yu/01-gopath/bin source /etc/profile # 环境变量生效 go version # 看go是否安装成功