CentOS7 Go安装

环境:

# Centos 7.x

# GO v1.11.2


# wget https://dl.google.com/go/go1.11.2.linux-amd64.tar.gz

# tar xf go1.11.2.linux-amd64.tar.gz -C /usr/local


添加/usr/loacl/go/bin目录到PATH变量中

# vim /etc/profile

在最后一行添加

export GOROOT=/usr/local/go

export PATH=$PATH:$GOROOT/bin


保存

# source /etc/profile


执行go version,如果现实版本号,则Go环境安装成功。


猜你喜欢

转载自blog.51cto.com/ywliyq/2449617