注:root账户或添加sudo命令运行。

  • 下载到/usr/local位置并解压
    • cd /usr/local
    • wget https://studygolang.com/dl/golang/go1.13.linux-amd64.tar.gz
    • tar -xzvf go1.13.linux-amd64.tar.gz

  • $HOME位置创建go工作目录
    • cd
    • mkdir go

  • 配置环境变量并设置代理
    • vim /etc/profile
      • export GOROOT=/usr/local/go
      • export PATH=$PATH:$GOROOT/bin
      • export GOPATH=$HOME/go
      • export GO111MODULE=auto
      • export GOPROXY=https://goproxy.cn,direct
    • source /etc/profile

  • 安装git
    • yum update
    • yum install -y git

相关文章:

  • 2021-08-08
  • 2022-12-23
  • 2021-10-18
  • 2022-12-23
  • 2021-11-28
  • 2021-08-27
  • 2022-12-23
  • 2022-02-08
猜你喜欢
  • 2021-12-10
  • 2021-12-20
  • 2021-06-29
  • 2021-08-16
  • 2021-06-19
  • 2021-12-04
  • 2022-12-23
相关资源
相似解决方案