Skip to content

Instantly share code, notes, and snippets.

@n5i
Created February 11, 2016 15:12
Show Gist options
  • Save n5i/826f7b7e1249e253df71 to your computer and use it in GitHub Desktop.
Save n5i/826f7b7e1249e253df71 to your computer and use it in GitHub Desktop.
Install golang 1.5.3 at CentOS 7
// https://golang.org/doc/install/source
// == Preparation ==
// Golang should be installed. Epel repo might be necessary
yum install golang
// Create a link to golang. Without it installer fails. Sudo might be required
ln -s /usr/lib/golang/bin/linux_amd64/go /usr/lib/golang/bin/go
// == Install ==
// Ser up the $GOROOT_BOOTSTRAP
export GOROOT_BOOTSTRAP="/usr/lib/golang"
// Clone repo
git clone https://go.googlesource.com/go
cd go
git checkout go1.5.3
cd src
./all.bash
// Set up path
cd
vim .bashrc
// Add the following line to the file
export PATH=$PATH:/home/go/go/bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment