Last active
July 2, 2019 20:48
-
-
Save nleiva/a2ee80ffc303430445577c2c052379ea to your computer and use it in GitHub Desktop.
Install Go in EC2
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
#!/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