Skip to content

Instantly share code, notes, and snippets.

@martezr
Last active October 23, 2019 00:11
Show Gist options
  • Save martezr/7f4feb606c741f1e3a4023f36978aaeb to your computer and use it in GitHub Desktop.
Save martezr/7f4feb606c741f1e3a4023f36978aaeb to your computer and use it in GitHub Desktop.
centos7golanginstaller.sh
#!/bin/bash
wget https://dl.google.com/go/go1.13.3.linux-amd64.tar.gz
sudo tar -C /usr/local -xvzf go1.13.3.linux-amd64.tar.gz
echo 'export PATH=$PATH:/usr/local/go/bin' > /etc/profile.d/gopath.sh
cat << EOF >> ~/.bash_profile
export GOBIN="$HOME/projects/bin"
export GOPATH="$HOME/projects/src"
EOF
mkdir -p ~/projects/{bin,pkg,src}
source /etc/profile && source ~/.bash_profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment