Skip to content

Instantly share code, notes, and snippets.

@novalagung
Created March 24, 2021 11:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save novalagung/23eb2723b2b5b3b44a973acbfedf8db4 to your computer and use it in GitHub Desktop.
Save novalagung/23eb2723b2b5b3b44a973acbfedf8db4 to your computer and use it in GitHub Desktop.
# install development dependencies
yum groupinstall -y 'Development Tools'
yum install -y curl git
# install go toolchain
export GOROOT_BOOTSTRAP=/usr/local/go1.4
curl -O https://storage.googleapis.com/golang/go1.4.3.linux-amd64.tar.gz
tar -zxf go1.4.3.linux-amd64.tar.gz && mv go ${GOROOT_BOOTSTRAP}
# obtain go source code
cd /usr/local
git clone --progress --verbose --depth 1 https://go.googlesource.com/go
# perform the build
cd /usr/local/go/src
bash ./all.bash
# set additionl env vars
export GOROOT=/usr/local/go
export PATH=${GOROOT}/bin:${PATH}
# test binary
go version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment