Created
March 24, 2021 11:02
-
-
Save novalagung/23eb2723b2b5b3b44a973acbfedf8db4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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