-
Notifications
You must be signed in to change notification settings - Fork 6
Installing Go
NginProject edited this page Oct 6, 2018
·
1 revision
Download and run the installer found at http://golang.org/doc/install
Download the latest distribution:
`curl -O https://dl.google.com/go/go1.11.1.linux-amd64.tar.gz
Unpack it to the /usr/local
(might require sudo)
`tar -C /usr/local -xzf go1.11.1.linux-amd64.tar.gz
For Go to work properly, you need to set the following two environment variables:
# setup a go folder
mkdir -p ~/go; echo "export GOPATH=$HOME/go" >> ~/.bashrc
# update your path
echo "export PATH=$PATH:$HOME/go/bin:/usr/local/go/bin" >> ~/.bashrc
# read the environment variables into current session
source ~/.bashrc