CentOS安装Go语言

解压:


wget https://dl.google.com/go/go1.9.2.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.9.2.linux-amd64.tar.gz

添加系统环境变量


ln -s /usr/local/go/bin/go /usr/local/bin/
mkdir /usr/local/go/path
echo 'export GOPATH=/usr/local/go/path' >> /etc/profile
source /etc/profile