Created
November 15, 2017 15:49
-
-
Save joshuabalduff/6db1c7435c9555222b8fe509706a69b5 to your computer and use it in GitHub Desktop.
Install Go/Glide on AWS Ubuntu
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 | |
# Install and extract go | |
sudo apt-get update | |
sudo apt-get -y upgrade | |
# Get current go file and put it in path | |
sudo curl -O https://storage.googleapis.com/golang/go1.8.linux-amd64.tar.gz | |
sudo tar -xvf go1.8.linux-amd64.tar.gz | |
sudo mv go /usr/local | |
# Set up env. variables | |
export PATH=$PATH:/usr/local/go/bin | |
export GOPATH=$HOME | |
# Make go environment | |
mkdir /home/ubuntu/src | |
# install glide (package manager for Go) | |
sudo add-apt-repository ppa:masterminds/glide && sudo apt-get -y update | |
sudo apt-get install glide | |
# install git | |
sudo apt install git | |
# Update .bashrc with new env. variables | |
cat <<EOT >> /home/ubuntu/.bashrc | |
export PATH=$PATH:/usr/local/go/bin | |
export GOPATH=$HOME | |
EOT | |
#clone your rep into ~/src |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment