Skip to content

Instantly share code, notes, and snippets.

@rday
Created September 13, 2012 03:36
Show Gist options
  • Save rday/3711685 to your computer and use it in GitHub Desktop.
Save rday/3711685 to your computer and use it in GitHub Desktop.
Install Golang
# Setup your home directory to handle a go installation
mkdir ~/go
cd ~/
# Grab and untar the binary the binary
# If you have a 64bit system, use http://go.googlecode.com/files/go1.0.2.linux-amd64.tar.gz
wget http://go.googlecode.com/files/go1.0.2.linux-386.tar.gz
tar -xzf go1.0.2.linux-386.tar.gz
# Setup your environment to handle the root Go install
export GOROOT=$HOME/go
export PATH=$GOROOT/bin:$PATH
# Setup your environment to handle installed packages
mkdir ~/go/gocode
export GOPATH=$HOME/go/gocode
export PATH=$GOPATH/bin:$PATH
# Save those changes for the next time you login
echo "export GOROOT=$HOME/go" > ~/.profile
echo "export GOPATH=$HOME/go/gocode" >> ~/.profile
echo "export PATH=$GOPATH/bin:$PATH" >> ~/.profile
# Install and run the tour
go get code.google.com/p/go-tour/gotour
gotour
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment