Created
April 23, 2022 21:00
-
-
Save MetaMmodern/1649ffa3f0f847389f8744244a9720d0 to your computer and use it in GitHub Desktop.
db1000n installer for Ubuntu
This file contains 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
# 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