Skip to content

Instantly share code, notes, and snippets.

@nleiva
Last active July 2, 2019 20:48
Show Gist options
  • Save nleiva/a2ee80ffc303430445577c2c052379ea to your computer and use it in GitHub Desktop.
Save nleiva/a2ee80ffc303430445577c2c052379ea to your computer and use it in GitHub Desktop.
Install Go in EC2
#!/bin/bash
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y install make
curl -O https://storage.googleapis.com/golang/go1.12.6.linux-amd64.tar.gz
tar -xvf go1.12.6.linux-amd64.tar.gz
sudo mv go /usr/local
echo 'export PATH=$PATH:/usr/local/go/bin
export GO111MODULE=on
export GOPROXY=https://proxy.golang.org
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin' > ~/go-stuff.sh
chmod +x ~/go-stuff.sh
sudo mv ~/go-stuff.sh /etc/profile.d/.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment