Skip to content

Instantly share code, notes, and snippets.

@dghubble
Last active September 29, 2016 19:01
Show Gist options
  • Save dghubble/5510615 to your computer and use it in GitHub Desktop.
Save dghubble/5510615 to your computer and use it in GitHub Desktop.
Script to install Go 1.0.3 and setup development environment.
cd ~
wget http://go.googlecode.com/files/go1.0.3.linux-amd64.tar.gz
tar -zxvf go1.0.3.linux-amd64.tar.gz
rm go1.0.3.linux-amd64.tar.gz
# binary distributions assume they will be installed at /usr/local/go
# Otherwise, you must set the GOROOT environment variable
sudo mv ~/go /usr/local
echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.bashrc
mkdir -p ~/Workspace/go-workspace
mkdir -p $HOME/Workspace/go-workspace/src
mkdir -p $HOME/Workspace/go-workspace/pkg
mkdir -p $HOME/Workspace/go-workspace/bin
echo "export GOPATH=$GOPATH:$HOME/Workspace/go-workspace:$HOME/Workspace/go-workspace/bin" >> ~/.bashrc
source ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment