Skip to content

Instantly share code, notes, and snippets.

@khan-rizwan
Last active July 18, 2018 23:22
Show Gist options
  • Save khan-rizwan/7ecb2ed9ae1d71ee06531baf34566767 to your computer and use it in GitHub Desktop.
Save khan-rizwan/7ecb2ed9ae1d71ee06531baf34566767 to your computer and use it in GitHub Desktop.
install-go.sh
#!/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