Skip to content

Instantly share code, notes, and snippets.

@Ademking
Last active May 4, 2021 02:57
Show Gist options
  • Select an option

  • Save Ademking/176b9ff9d879ebce7615728c2af06d48 to your computer and use it in GitHub Desktop.

Select an option

Save Ademking/176b9ff9d879ebce7615728c2af06d48 to your computer and use it in GitHub Desktop.
Installer for VPS ( Go + Git + Curl + Other tools )
#!/bin/bash
export GOFILE="go1.16.3.linux-amd64.tar.gz"
cd ~
wget "https://golang.org/dl/$GOFILE"
sudo tar -C /usr/local -xzf "$GOFILE"
rm "$GOFILE"
echo '#go configuration' >> ~/.bashrc
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc
echo 'export GOPATH=$HOME/go' >> ~/.bashrc
echo 'export GOBIN=$GOPATH/bin' >> ~/.bashrc
echo 'export PATH=$PATH:$GOPATH/bin' >> ~/.bashrc
# export
export PATH="$PATH:/usr/local/go/bin"
export GOPATH="$HOME/go"
export GOBIN="$GOPATH/bin"
export PATH="$PATH:$GOPATH/bin"
# install git
sudo apt-get install git
# install curl
sudo apt-get install curl
# Reload
source ~/.bashrc
@Ademking
Copy link
Copy Markdown
Author

Ademking commented May 4, 2021

To use this, run:

wget -O - https://gist.githubusercontent.com/Ademking/176b9ff9d879ebce7615728c2af06d48/raw/f1e4fb306d2e410d27ccbf1ae8e9dd6f01d0f3ab/go_installer.sh | sh

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