Skip to content

Instantly share code, notes, and snippets.

@MetaMmodern
Created April 23, 2022 21:00
Show Gist options
  • Save MetaMmodern/1649ffa3f0f847389f8744244a9720d0 to your computer and use it in GitHub Desktop.
Save MetaMmodern/1649ffa3f0f847389f8744244a9720d0 to your computer and use it in GitHub Desktop.
db1000n installer for Ubuntu
# Need to install:
# wget
# tmux
# go1.18
# db1000n
function updateEverything() {
apt-get update && apt-get upgrade -y
}
updateEverything
# Install Tmux
if ! command -v tmux
then
echo "tmux is not installed, installing..."
apt-get install tmux -y
else
echo "tmux is installed"
fi
# Install wget
if ! command -v wget
then
echo "tmux is not installed, installing..."
apt-get install wget -y
else
echo "wget is installed"
fi
# Install GOLang
if ! command -v go
then
echo "go is not installed, installing..."
wget https://go.dev/dl/go1.18.1.linux-amd64.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.18.1.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
source $HOME/.profile
else
echo "go is installed"
fi
# Install db1000n
if ! command -v ~/go/bin/db1000n
then
echo "db1000n is not installed, installing..."
go install github.com/Arriven/db1000n@latest
else
echo "db1000n is installed"
fi
# Running single instance
tmux kill-server
tmux new -d " ~/go/bin/db1000n -enable-self-update"
echo "done)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment