go安装

版本 go1.9.2 centos7.2

  1. wget https://dl.google.com/go/go1.9.2.linux-amd64.tar.gz 获取包
  2. vim ~/.bash_profile 编辑文件 添加配置
    加入如下变量:
    export GOROOT=/usr/local/go
    export GOPATH=/golib:/goproject
    export GOBIN=~/gobin
    export PATH=$PATH:$GOROOT/bin:$GOBIN
  3. source ~/.bash_profile 让配置生效
  4. go version 能打出go版本信息就安装完成

你可能感兴趣的:(go安装)