Skip to content

Instantly share code, notes, and snippets.

@fosini
Created July 4, 2018 08:19
Show Gist options
  • Save fosini/2390a9c5e07f9638df3a8a404fb9169c to your computer and use it in GitHub Desktop.
Save fosini/2390a9c5e07f9638df3a8a404fb9169c to your computer and use it in GitHub Desktop.
Installing newest Go version on Amazon EC2 Instance (Ubuntu)
#1 Download and uncompress
sudo curl -o <Download link>
sudo tar -xvf <tar file>
#2 Move the directory
sudo mv go /usr/local
#3 Edit .profile
sudo nano ~/.profile
#4 Add this to the last line
export PATH=$PATH:/usr/local/go/bin
#5 export the env variables
export GOROOT=$HOME/go
export PATH=$PATH:$GOROOT/bin
#6 update .profile
source ~/.profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment