Skip to content

Instantly share code, notes, and snippets.

@lzjluzijie
Last active September 20, 2018 04:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lzjluzijie/6b65f3f783e20ab7173589ac91ac0ffa to your computer and use it in GitHub Desktop.
Save lzjluzijie/6b65f3f783e20ab7173589ac91ac0ffa to your computer and use it in GitHub Desktop.
#! /bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
wget https://dl.google.com/go/go1.11.linux-amd64.tar.gz
tar -xzf go1.11.linux-amd64.tar.gz
rm -f go1.11.linux-amd64.tar.gz
mv go /usr/local
echo export GOROOT=/usr/local/go>/etc/profile.d/go.sh
echo export GOPATH=/root/go>>/etc/profile.d/go.sh
echo export PATH=$PATH:$GOROOT/bin>>/etc/profile.d/go.sh
source /etc/profile.d/go.sh
@1715173329
Copy link

1715173329 commented Jul 14, 2018

#! /bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
wget https://dl.google.com/go/go1.10.3.linux-amd64.tar.gz
tar -xzf go1.10.3.linux-amd64.tar.gz
rm -f go1.10.3.linux-amd64.tar.gz
mv go /usr/local
echo export GOROOT=/usr/local/go>/etc/profile.d/go.sh
echo export GOPATH=/usr/local/gopath>>/etc/profile.d/go.sh
echo export PATH=$PATH:$GOROOT/bin>>/etc/profile.d/go.sh
source /etc/profile.d/go.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment