Last active
July 18, 2018 23:22
-
-
Save khan-rizwan/7ecb2ed9ae1d71ee06531baf34566767 to your computer and use it in GitHub Desktop.
install-go.sh
This file contains 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
#!/bin/bash | |
export GO_VERSION=1.10 | |
export GO_DOWNLOAD_URL=https://storage.googleapis.com/golang/go$GO_VERSION.linux-amd64.tar.gz | |
export GOPATH=/root/local/lib/go | |
export GOROOT=/usr/local/go | |
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin | |
mkdir ${GOPATH} | |
chown ${USER} -R ${GOPATH} | |
wget "$GO_DOWNLOAD_URL" -O golang.tar.gz | |
tar -zxvf golang.tar.gz | |
mv go ${GOROOT} | |
rm golang.tar.gz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment