Install
Install EPEL package by using yum install epel-release command:
1 | yum install -y epel-release |
Update your system:
1 | yum update |
Install Golang using yum:
1 | yum install -y golang |
Check Golang version:
1 | go version |
Update
Unless someone either adds Go 1.7+
to a repo or builds a specific repo for it, you need to manually install it.
Access https://go.dev/dl/ first PLS, select Glang
version which you prefer.
1 | yum rm golang |
Add /usr/local/go/bin
to PATH Variable:
1 | echo "export PATH=$PATH:/usr/local/go/bin">>/root/.bashrc |
Check Golang version:
1 | go version |
Reference
Done.