共2种安装方式
1、官方repo安装

rpm --import https://mirror.go-repo.io/centos/RPM-GPG-KEY-GO-REPO
curl -s https://mirror.go-repo.io/centos/go-repo.repo | tee /etc/yum.repos.d/go-repo.repo
yum install golang

2、如果网速慢,手动配置repo安装

vim /etc/yum.repos.d/go-repo.repo

[go-repo]
name=go-repo - CentOS
baseurl=https://mirror.go-repo.io/centos/$releasever/$basearch/
enabled=1
gpgcheck=0
gpgkey=https://mirror.go-repo.io/centos/RPM-GPG-KEY-GO-REPO

最后由 aliyun8 编辑于1970年01月01日 08:33