Skip to content

Instantly share code, notes, and snippets.

@ilkereroglu
Created August 31, 2016 11:18
Show Gist options
  • Save ilkereroglu/65892153f0d1199fb9c59a382ae3b8d4 to your computer and use it in GitHub Desktop.
Save ilkereroglu/65892153f0d1199fb9c59a382ae3b8d4 to your computer and use it in GitHub Desktop.
How to install Go Lang on CentOS | AWS

How to Install GO Lang on CentOS / Amazon Linux?

sudo wget https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz
tar -xzf go1.4.2.linux-amd64.tar.gz 
export GOROOT=PATH_WHERE_YOU_EXTRACT_GO
export PATH=$PATH:$GOROOT/bin 
export GOBIN=$GOROOT/bin 
mkdir ~/golang/ 
export GOPATH=~/golang/ 
export PATH=$GOPATH/bin:$PATH 
go get code.google.com/p/go-tour/gotour
gotour 

Add system vars on ~/.bashrc

export GOROOT=/home/ec2-user/go-14
export PATH=$PATH:$GOROOT/bin
export GOPATH=/home/ec2-user/
export PATH=$GOPATH/bin:$PATH
export GOBIN=/home/ec2-user/go-14/bin/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment