Created
          February 20, 2018 12:20 
        
      - 
      
- 
        Save ruanbekker/1488811813b20c3d8cf80a6c9a6c09a6 to your computer and use it in GitHub Desktop. 
    Setup Golang on 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
    
  
  
    
  | #!/usr/bin/env bash | |
| mkdir -p ~/workspace/go | |
| cd /tmp | |
| wget https://storage.googleapis.com/golang/go1.8.1.linux-amd64.tar.gz | |
| tar -xf go1.8.1.linux-amd64.tar.gz | |
| sudo chown -R root:root ./go | |
| sudo mv go /usr/local | |
| rm -rf go1.8.1.linux-amd64.tar.gz | |
| echo 'export GOPATH=$HOME/workspace/go' >> ~/.profile | |
| echo 'export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin' >> ~/.profile | |
| source ~/.profile | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment