Last active
August 12, 2019 19:40
-
-
Save diegopacheco/9bed0827e434abae73c4 to your computer and use it in GitHub Desktop.
How to Install GO Lang on CentOS / Amazon Linux?
This file contains hidden or 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
| # How to Install GO Lang on CentOS / Amazon Linux? | |
| ```bash | |
| sudo wget https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz | |
| tar -xzf go1.4.2.linux-amd64.tar.gz | |
| export GOROOT=PATH_WHERE_YOU_EXTRACT_GO | |
| export PATH=$PATH:$GOROOT/bin | |
| export GOBIN=$GOROOT/bin | |
| mkdir ~/golang/ | |
| export GOPATH=~/golang/ | |
| export PATH=$GOPATH/bin:$PATH | |
| go get code.google.com/p/go-tour/gotour | |
| gotour | |
| ``` |
sudo wget https://storage.googleapis.com/golang/go1.6.linux-amd64.tar.gz
BASE_DIEGO_DIR=/home/diego/bin
export GOROOT=$BASE_DIEGO_DIR/go1.6/go
export GOPATH=$GOROOT/../golang/
export GOBIN=$GOROOT/bin
export PATH=$PATH:$GOROOT/bin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
~/.bashrc
export GOROOT=/home/ec2-user/go-14
export PATH=$PATH:$GOROOT/bin
export GOPATH=/home/ec2-user/
export PATH=$GOPATH/bin:$PATH
export GOBIN=/home/ec2-user/go-14/bin/