#!bin/sh # Update installed packages and package cache sudo yum update -y # make sure in the home folder cd ~/ # Golang installation # specify go version to install VERSION=go1.9.linux-amd64.tar.gz # download the go archive for the specified version sudo curl -O https://storage.googleapis.com/golang/$VERSION # extract the downloaded archive into the /usr/local folder sudo tar -C /usr/local -xzf $VERSION # setup the default GOPATH workspace mkdir -p ~/go/bin # set necessary go env variables cat > ./go-env.sh < ./docker-compose # mv docker-compose binary to usr/bin folder sudo mv ./docker-compose /usr/bin/docker-compose # make docker-compose binary executable sudo chmod +x /usr/bin/docker-compose # start the docker service sudo service docker start # add ec2-user to the docker group to lose the sudo command when using docker sudo usermod -a -G docker ec2-user