Last active
October 23, 2019 00:11
-
-
Save martezr/7f4feb606c741f1e3a4023f36978aaeb to your computer and use it in GitHub Desktop.
centos7golanginstaller.sh
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 | |
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