Last active
March 7, 2016 16:28
-
-
Save codematix/7b02cb01c4ad580cf24d to your computer and use it in GitHub Desktop.
Install Golang
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
sudo apt-get update | |
sudo apt-get install build-essential curl vim git mercurial bison | |
# install gvm | |
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer) | |
# install Go | |
gvm install go1.4 | |
gvm use go1.4 | |
gvm install go1.5 | |
gvm use go1.5 | |
gvm alias create alias go1.5 | |
# Create Go workspace | |
mkdir -p /home/codematix/go | |
cd /home/codematix/go | |
mkdir -p src pkg bin | |
# Edit ~/.bashrc or ~/.bash_profile or ~/.zshrc appropriately to add the following | |
export GOPATH="/home/codematix/go" | |
export PATH="$PATH:$GOPATH/bin" | |
source ~/.bashrc # or ~/.bash_profile or ~/.zshrc | |
# install gb | |
go get github.com/constabulary/gb/... | |
# install godoc | |
go get golang.org/x/tools/cmd/godoc | |
# install oracle | |
go get golang.org/x/tools/cmd/oracle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment