Last active
March 22, 2024 20:47
-
-
Save digitalnomad91/77a8caf7b071648623acb1dca19edbae to your computer and use it in GitHub Desktop.
Debian Server Initialization Script
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
#!/usr/bin/env bash | |
# | |
# ./init_server.sh | |
# | |
### MAIN CONFIG VARS #### | |
ENVIRONMENT=dev | |
GITHUB_TOKEN= | |
SHELL_USER=digitalnomad91 | |
########### PARSE .ENV FILE FOR VARIABLES ################## | |
while read -r LINE; do | |
if [[ $LINE == *'='* ]] && [[ $LINE != '#'* ]]; then | |
ENV_VAR="$(echo $LINE | envsubst)" | |
eval "declare $ENV_VAR" | |
fi | |
done <.env | |
DEX_SHELL_USER=admin | |
DEX_GITHUB_TOKEN=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 | |
############################ SSH KEYS / AUTHORIZED_KEY #################### | |
cd | |
yes '' | ssh-keygen -t ed25519 -C "${DEX_SHELL_USER}@dexcelerate.com" -N '' >/dev/null | |
#cat >> ~/.ssh/authorized_keys <<<'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDITCHq0meLWQBV4nvGgdEycdfE5xBDFbBbNJL2nNUHNAzFNUHEyAVAvVdp/UuYXu+UbU0sAr2StxLGS9fCHlcwM323bb5wU1Vb5lZncPF5qjEKPaAyNUJGdTslYlP96Q9HaOeF8Wd7ddOtKQ2ppQucdt69ABijdsgySQnacPu0iYxj7n7jhjsxDPgZ7WFUaeq1eSBmSB4AlZKGQ5ka4TpOxbPRHvt2nr3viSgvPHeVdAjX9fQNHpX9jydVJVOINRxQ32nMmA4IwScI+rT9lCp/Af8t7E0wXsB4n37N93kY4H2rQyOyWLipqhbtb9xf5bqmM+7Unl8IOIHxbkMacL+AOLQPLAZiXHlvQgUX1dxPPMgE0RAikA2sBZwCMO93TybPq5u+DcqzbCnOhKQwkQXuD9J2iysgzqet3PwnP5ERwnpYG6K1GM5LH2tUayZ86DlGHNcUrgQShF9sSlYE94wGYsdPNnjLDuxKfloDHNvO2dBvz0hWaR/LOqia3jINKjwM= andew@Asus-ROG-I9' | |
########################### CORE PACKAGES ###################### | |
apt-get update | |
yes | apt-get install --assume-yes git htop ca-certificates curl gnupg tmux python3 python3-pip python3-venv fail2ban neofetch snapd build-essential procps curl file rsync nginx exa ncdu gnupg2 wget ffmpeg libpcre3 libpcre3-dev libssl-dev zlib1g-dev software-properties-common ufw cmake cifs-utils bc jq bleachbit tor uget pcmanfm zip buku speedometer slay rsync nmap nmap-common locate findutils fdisk fail2ban aria2 inxi bat arpwatch tig linuxlogo bmon lm-sensors psensor monit sysstat munin websocketd cockpit cockpit-podman googler firefox-esr links links2 lynx axel w3m cpustat librsync-dev rdiff-backup partimage partclone cryptsetup duplicity flashrom gzip hwinfo rdiff-backup restic rsync boxbackup-client boxbackup-server burp elinks lolcat cmatrix pv toilet rig x11-apps cowsay sl fortune xcowsay oneko espeak bb xjokes sshfs psmisc fuse3 autofs cifs-utils sudo python3-full pipx | |
yes | snap install core | |
yes | snap install nvtop | |
yes | sudo snap install btop | |
################# homebrew ############## | |
yes N | sudo -u "${DEX_SHELL_USER}" /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" | |
sudo -u "${DEX_SHELL_USER}" /home/linuxbrew/.linuxbrew/bin/brew install gcc navi | |
############################# SETUP GIT ############################ | |
sudo -u "${DEX_SHELL_USER}" /home/linuxbrew/.linuxbrew/bin/brew install gh | |
#cat >>"/home/${DEX_SHELL_USER}/.githubtoken" <<<"${DEX_GITHUB_TOKEN}" && chown "${DEX_SHELL_USER}" "/home/${DEX_SHELL_USER}/.githubtoken" | |
#sudo -u "${DEX_SHELL_USER}" /home/linuxbrew/.linuxbrew/bin/gh auth login --with-token <"/home/digitalnomad91/.githubtoken" | |
#git config --global credential.helper store | |
#sudo -u "${DEX_SHELL_USER}" /home/linuxbrew/.linuxbrew/bin/gh auth setup-git | |
########## SETUP DOCKER ########### | |
yes | sudo install -m 0755 -d /etc/apt/keyrings | |
yes | curl -fsSL https://download.docker.com/linux/debian/gpg | yes | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg | |
sudo chmod a+r /etc/apt/keyrings/docker.gpg | |
echo \ | |
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \ | |
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | | |
yes | sudo tee /etc/apt/sources.list.d/docker.list >/dev/null | |
yes | sudo apt-get update | |
yes | sudo apt-get --assume-yes install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin | |
############# docker-compose ################# | |
#sudo curl -L "https://github.com/docker/compose/releases/download/2.19.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
sudo curl -L "https://github.com/docker/compose/releases/download/v2.19.1/docker-compose-linux-x86_64" -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
############# docker ctop ################### | |
sudo wget https://github.com/bcicen/ctop/releases/download/v0.7.1/ctop-0.7.1-linux-amd64 -O /usr/local/bin/ctop | |
sudo chmod +x /usr/local/bin/ctop | |
######### ctop2?? ########## | |
#yes | sudo apt-get install ca-certificates curl gnupg lsb-release | |
#curl -fsSL https://azlux.fr/repo.gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/azlux-archive-keyring.gpg | |
#echo \ | |
# "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/azlux-archive-keyring.gpg] http://packages.azlux.fr/debian \ | |
#$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/azlux.list >/dev/null | |
#yes | sudo apt-get update | |
#yes | sudo apt-get install docker-ctop | |
############ docker dry ########## | |
curl -sSf https://moncho.github.io/dry/dryup.sh | sudo sh | |
sudo chmod 755 /usr/local/bin/dry | |
###### docker dive ########### | |
wget https://github.com/wagoodman/dive/releases/download/v0.9.2/dive_0.9.2_linux_amd64.deb | |
yes | sudo apt install ./dive_0.9.2_linux_amd64.deb | |
################### Setup ZSH Custom Shell Prompt ################### | |
yes | apt-get install --assume-yes zsh | |
usermod --shell /usr/bin/zsh root | |
yes | pip3 install powerline-shell | |
################# New user ##################### | |
useradd -U "${DEX_SHELL_USER}" -m -s /usr/bin/zsh -p "${DEX_SHELL_USER}" && passwd -d "${DEX_SHELL_USER}" && passwd -d root && | |
sed -i /etc/sudoers -re 's/^%sudo.*/%sudo ALL=(ALL:ALL) NOPASSWD: ALL/g' && | |
sed -i /etc/sudoers -re 's/^root.*/root ALL=(ALL:ALL) NOPASSWD: ALL/g' && | |
sed -i /etc/sudoers -re 's/^#includedir.*/## Removed the #include directive! ##"/g' && | |
echo "Customized the sudoers file for passwordless access!" && | |
echo "${DEX_SHELL_USER} ALL=(ALL) NOPASSWD: ALL" >>/etc/sudoers && | |
echo "root ALL=(ALL) NOPASSWD: ALL" >>/etc/sudoers && | |
echo "${DEX_SHELL_USER} user:" | |
su "${DEX_SHELL_USER}" -c 'whoami && id' && echo "root user:" | |
su root -c 'whoami && id' | |
sudo groupadd "${DEX_SHELL_USER}" | |
sudo usermod -aG "${DEX_SHELL_USER}",sudo,docker "${DEX_SHELL_USER}" | |
#groupadd developers | |
#useradd -m "${DEX_SHELL_USER}" -g developers -G sudo,docker -s /usr/bin/zsh | |
#cat >> /etc/sudoers <<<'"${DEX_SHELL_USER}" ALL=(ALL:ALL) NOPASSWD:ALL' | |
############# oh-my-zsh ###################### | |
yes '' | sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | |
yes '' | sudo -u "${DEX_SHELL_USER}" sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | |
git clone https://github.com/akarzim/zsh-docker-aliases.git ~/.oh-my-zsh/custom/plugins/zsh-docker-aliases | |
# then add `zsh-docker-aliases` to `plugins` in your .zshrc | |
####### install go ######### | |
sudo rm -rf /usr/local/go | |
sudo curl -O https://dl.google.com/go/go1.20.4.linux-amd64.tar.gz | |
sudo tar xvf go1.20.4.linux-amd64.tar.gz | |
sudo sudo chown -R root:root ./go | |
sudo sudo mv go /usr/local | |
export PATH=$PATH:/usr/local/go/bin | |
#go get github.com/uber-common/cpustat | |
#$GOBIN/cpustat | |
################## nodejs ################### | |
yes | sudo apt install --assume-yes nodejs npm -y | |
npm install wikit -g | |
################# yarn ###################### | |
curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash - | |
################# nvm ####################### | |
curl https://gist.githubusercontent.com/digitalnomad91/3d69fe95dd495df3929fbc0c8f288841/raw/6bf47fcf22260221aab4d18caff6f59697208045/nvm%2520install.sh | bash | |
######### dockly ############ | |
npm install -g dockly | |
############# lazydocker ############ | |
sudo -u "${DEX_SHELL_USER}" /home/linuxbrew/.linuxbrew/bin/brew install jesseduffield/lazydocker/lazydocker | |
###### helm ########## | |
sudo -u "${DEX_SHELL_USER}" /home/linuxbrew/.linuxbrew/bin/brew install helm | |
######## poco ####### | |
pipx install poco | |
pipx install --user 'glances[all]' | |
#### skopeo ##### | |
sudo apt-get update | |
yes | sudo apt-get -y install skopeo | |
#### sen ######## | |
pipx install sen | |
#git clone https://github.com/TomasTomecek/sen | |
#cd sen | |
#pip3 install --user -r ./requirements.txt | |
#./setup.py install | |
#sen | |
####### kubernetes ######### | |
#curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" | |
#yes | sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl | |
#kubectl version --client | |
############# $SHELL_USER user ssh keys & authorized_keys ######### | |
yes '' | sudo -u "${DEX_SHELL_USER}" ssh-keygen -t ed25519 -C "${DEX_SHELL_USER}@dexcelerate.com" -N '' >/dev/null | |
##### reload zsh shell #### | |
/usr/bin/zsh | |
source ~/.zshrc | |
source ~/.zshenv | |
######################### CLONE DEX CONTINUOUS INTEGRATION TOOL ####################### | |
chmod 0777 /var/www | |
sudo -u "${DEX_SHELL_USER}" mkdir /var/www/dexcelerate | |
cd /var/www/dexcelerate | |
sudo -u "${DEX_SHELL_USER}" git clone https://github.com/dexcelerate/continuous-integration | |
cd continuous-integration | |
cp ./ssl/authorized_keys ~/.ssh/authorized_keys | |
cp ./ssl/authorized_keys /home/digitalnomad91/.ssh/authorized_keys | |
chown -R digitalnomad91 /home/digitalnomad91/ | |
#cp authorized_keys "/home/${DEX_SHELL_USER}/.ssh" && chown "${DEX_SHELL_USER}" "/home/${DEX_SHELL_USER}/.ssh/authorized_keys" | |
############### cargo / rust ############# | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
cp -R ~/.cargo "/home/${DEX_SHELL_USER}" && chown -R "${DEX_SHELL_USER}" "/home/${DEX_SHELL_USER}/.cargo" | |
sudo -u "${DEX_SHELL_USER}" "/home/${DEX_SHELL_USER}/.cargo/bin/rustup" default stable | |
sudo -u "${DEX_SHELL_USER}" "/home/${DEX_SHELL_USER}/.cargo/bin/cargo" install onefetch | |
sudo -u "${DEX_SHELL_USER}" "/home/${DEX_SHELL_USER}/.cargo/bin/cargo" install --git https://github.com/nachoparker/dutree.git | |
########## pipx ################# | |
#python3 -m pip install --user pipx | |
#python3 -m pipx ensurepath | |
#export PATH="$PATH:/root/.local/bin" | |
#pipx install browsr | |
#pip3 install virtualenv | |
####### pydash ########### | |
#git clone https://github.com/k3oni/pydash.git | |
#cd pydash | |
#virtualenv pydashtest | |
#source /home/aaronkilik/pydash/pydashtest/bin/activate | |
#pip3 install -r requirements.txt | |
#nano pydash/settings.py | |
#python3 manage.py syncdb | |
#python3 manage.py runserver | |
######### micro text editor ############ | |
curl -sL https://gist.githubusercontent.com/zyedidia/d4acfcc6acf2d0d75e79004fa5feaf24/raw/a43e603e62205e1074775d756ef98c3fc77f6f8d/install_micro.sh | bash -s linux64 /usr/bin/ | |
##################### Custom Shell stuff (DEX_SHELL_USER) ################## | |
cd "/home/${DEX_SHELL_USER}" | |
git clone https://github.com/digitalnomad91/useful-scripts | |
sudo rm -rf /etc/update-motd.d/10-uname | |
yes | cp -Rf useful-scripts/prompt/update-motd.d/* /etc/update-motd.d/ && chmod -R 0755 /etc/update-motd.d | |
yes | cp -Rf useful-scripts/prompt/.oh-my-zsh . && chown "${DEX_SHELL_USER}" .oh-my-zsh | |
chown -R "${DEX_SHELL_USER}" "/home/${DEX_SHELL_USER}" | |
yes | sudo -u "${DEX_SHELL_USER}" cp useful-scripts/prompt/.zshrc "/home/${DEX_SHELL_USER}" | |
yes | sudo -u "${DEX_SHELL_USER}" cp useful-scripts/prompt/.zprofile "/home/${DEX_SHELL_USER}" | |
curl https://gist.githubusercontent.com/digitalnomad91/77e6f0454bac4b7d1946c3ab078bbf70/raw/383fe0b8bc8c86b0817320f6248e623402254d33/.zsh_aliases -O | |
chown "${DEX_SHELL_USER}" -R "/home/${DEX_SHELL_USER}" | |
cat >>"/home/${DEX_SHELL_USER}/.zshenv" <<<'. "$HOME/.cargo/env"' | |
#curl https://gist.githubusercontent.com/digitalnomad91/fa696195a76f671e5a9ae0124cedd526/raw/0b25e0c6a9793774859e35d318d48362b795012b/.zprofile -O | |
#curl https://gist.githubusercontent.com/digitalnomad91/ffbe682c296d8a64afe907bc4127d984/raw/28f331252f33aec62ce3ee9eb2557ed84fe8b50d/.zshrc -O | |
#curl https://gist.githubusercontent.com/digitalnomad91/fa696195a76f671e5a9ae0124cedd526/raw/0b25e0c6a9793774859e35d318d48362b795012b/.zprofile -O | |
yes | cp useful-scripts/prompt/.zshrc_root ~/.zshrc | |
yes | cp useful-scripts/prompt/.zprofile_root ~/.zprofile | |
##################### Custom Shell stuff (root user) ################## | |
cd /root | |
yes | cp -Rf "/home/${DEX_SHELL_USER}/useful-scripts/prompt/.oh-my-zsh" ~/ | |
curl https://gist.githubusercontent.com/digitalnomad91/77e6f0454bac4b7d1946c3ab078bbf70/raw/383fe0b8bc8c86b0817320f6248e623402254d33/.zsh_aliases -O | |
cat >>/root/.zshenv <<<'. "$HOME/.cargo/env"' | |
cat >>~/.zshrc <<<'export PATH="$PATH:/root/.local/bin"' | |
touch ~/.hushlogin | |
yes | cp "/home/${DEX_SHELL_USER}/useful-scripts/prompt/shopt" /usr/bin/shopt && chmod 0755 /usr/bin/shopt | |
#curl https://gist.githubusercontent.com/digitalnomad91/fa696195a76f671e5a9ae0124cedd526/raw/0b25e0c6a9793774859e35d318d48362b795012b/.zprofile -O | |
############################# | |
############## motd ########################### | |
truncate -s 0 /etc/motd | |
cat >>/etc/motd <<<' | |
_ _ _ _ _ _ ___ _ | |
__| (_) __ _(_) |_ __ _| |_ __ ___ _ __ ___ __ _ __| |/ _ \/ | | |
/ _` | |/ _` | | __/ _` | | '_ \ / _ \| '_ ` _ \ / _` |/ _` | (_) | | | |
| (_| | | (_| | | || (_| | | | | | (_) | | | | | | (_| | (_| |\__, | | | |
\__,_|_|\__, |_|\__\__,_|_|_| |_|\___/|_| |_| |_|\__,_|\__,_| /_/|_| | |
|___/ | |
' | |
######################### mount storage box #################### | |
#### RANDOM WAY TO MOUNT SSHFS SHIT SUCKS ### | |
#sshfs u350571@u350571-sub1.your-storagebox.de:/ /mnt/storage-box | |
#sudo cat >> /etc/fuse.conf <<<'user_allow_other' | |
#mkdir -p /mnt/shared-drive | |
#echo 'Y50BWuTel1zTy4at' | sshfs -o allow_other,default_permissions u350571@u350571.your-storagebox.de:/ /mnt/shared-drive -o password_stdin,allow_other | |
#echo "backup -fstype=fuse,rw,nodev,nonempty,allow_other,reconnect,max_read=65536 :sshfs\#$backup_user@$backup_user.your-storagebox.de\:/" > /etc/auto.sshfs | |
# reload autofs | |
#service autofs reload | |
## ANOTHER WAY, SOMETIMES WORKS BUT JUST HANGS OTHERS | |
#sudo sh -c 'echo "user_allow_other" >> /etc/fuse.conf' | |
#mkdir -p /mnt/shared-drive | |
#echo 'Y50BWuTel1zTy4at' | sudo sshfs -o allow_other,default_permissions u350571@u350571.your-storagebox.de:~/ /mnt/shared-drive -o password_stdin,allow_other | |
### IT WORKED MOUNTING, SOMETIMES, BUT RESTARTING FAILED W/ THE FSTAB ENTRY | |
#sudo sshfs -o noauto,x-systemd.automount,_netdev,reconnect,identityfile=/home/digitalnomad91/.ssh/id_ed25519.pub,allow_other,default_permissions u350571@u350571.your-storagebox.de:~/ /mnt/shared-drive | |
#sudo sh -c 'echo "u350571@u350571.your-storagebox.de:~/ /mnt/shared-drive fuse.sshfs noauto,x-systemd.automount,_netdev,reconnect,identityfile=/home/digitalnomad91/.ssh/id_ed25519.pub,allow_other,default_permissions 0 0" >> /etc/fstab' | |
### SAMBA MOUNT (SHIT SUCKS) #### | |
mkdir -p /mnt/storage-box | |
#( | |
# umount /mnt/storage-box | |
# mount.cifs -o user="u350571,pass=Y50BWuTel1zTy4at,vers=3.0,uid=1000,forceuid,file_mode=0777,dir_mode=0777" //u350571.your-storagebox.de/backup /mnt/storage-box | |
#) || true | |
ln -s /mnt/storage-box/.env /var/www/dexcelerate/.env | |
(mount.cifs -o cache=none,user=u350571,pass=Y50BWuTel1zTy4at,vers=3.0,uid=1000,forceuid,file_mode=0777,dir_mode=0777 //u350571.your-storagebox.de/backup /mnt/storage-box) || true | |
echo -n '//u350571.your-storagebox.de/backup /mnt/storage-box cifs iocharset=utf8,rw,credentials=/etc/backup-credentials.txt,uid=digitalnomad91,gid=digitalnomad91,file_mode=0777,dir_mode=0777 0 0' | tee -a /etc/fstab | |
echo 'user=u350571' >/etc/backup-credentials.txt | |
echo 'pass=Y50BWuTel1zTy4at' >>/etc/backup-credentials.txt | |
chmod 600 /etc/backup-credentials.txt | |
echo 'modprobe cifs' >/etc/rc.local | |
echo 'echo 0 > /proc/fs/cifs/OplockEnabled' >>/etc/rc.local | |
#echo 1 > /proc/fs/cifs/MultiuserMount | |
#echo 7 > /proc/fs/cifs/cifsFYI | |
########### firewall ############ | |
yes | apt-get install ufw | |
ufw allow 22 | |
ufw allow 443 | |
ufw allow 80 | |
ufw allow 7000 | |
ufw allow 7001 | |
ufw allow 7007 | |
ufw allow 6383 | |
ufw allow 3611 | |
ufw allow 8577 | |
yes 'Y' | ufw enable | |
######################## INSTALL BAT (ALTERNATIVE TO CAT) TOOL ######## | |
wget https://github.com/sharkdp/bat/releases/download/v0.15.4/bat_0.15.4_amd64.deb | |
sudo dpkg -i bat_0.15.4_amd64.deb | |
########### browsh ########### | |
wget https://github.com/browsh-org/browsh/releases/download/v1.6.4/browsh_1.6.4_linux_amd64.deb | |
sudo dpkg -i browsh_1.6.4_linux_amd64.deb | |
########## cloud commander ############# | |
#curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash - | |
npm i cloudcmd -g | |
############ web vmstat ########### | |
git clone https://github.com/joewalnes/web-vmstats | |
cd web-vmstats | |
./run | |
################ install cacti ############ | |
#yes | apt-get install cacti | |
########### install PHP ################# | |
sudo apt -y install lsb-release apt-transport-https ca-certificates | |
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg | |
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list | |
sudo apt update | |
yes | sudo apt install php8.0 -y | |
yes | sudo apt-get install php8.0-{cli,zip,mysql,bz2,curl,mbstring,intl,common,pgsql,bcmath,curl,decimal,dev,dom,exif,gd,fpm,gettext,gmp,imagick,memcache,mongodb,mysql,oauth,odbc,opcache,xml,yaml,zip,} -y | |
yes | sudo apt install php8.1 -y | |
yes | sudo apt-get install php8.1-{cli,zip,mysql,bz2,curl,mbstring,intl,common,pgsql,bcmath,curl,decimal,dev,dom,exif,gd,fpm,gettext,gmp,imagick,memcache,mongodb,mysql,oauth,odbc,opcache,xml,yaml,zip,} -y | |
yes | sudo apt install php8.2 -y | |
yes | sudo apt-get install php8.2-{cli,zip,mysql,bz2,curl,mbstring,intl,common,pgsql,bcmath,curl,decimal,dev,dom,exif,gd,fpm,gettext,gmp,imagick,memcache,mongodb,mysql,oauth,odbc,opcache,xml,yaml,zip,} -y | |
############ php servermon ############## | |
git clone https://github.com/phpservermon/phpservermon | |
cd phpservermon | |
yes | php composer.phar install | |
#crontab -e */15 * * * * /usr/bin/php /var/www/html/phpservermon/cron/status.cron.php | |
############# installing linux dash ########### | |
git clone --depth 1 https://github.com/afaqurk/linux-dash.git | |
cd linux-dash/app/server | |
npm install --production | |
node index.js --port 8007 | |
######### copy the ssl certs from storage-box to /etc/letsencrypt for nginx | |
ln -s -T /etc/letsencrypt/archive /etc/letsencrypt/live | |
ln -s ./archive/* ./live | |
################### A bunch of extra shit we probably don't need ############################# | |
######### asciiquarium ####### | |
#apt-get install libcurses-perl | |
#cd /tmp | |
#wget http://search.cpan.org/CPAN/authors/id/K/KB/KBAUCOM/Term-Animation-2.4.tar.gz | |
#tar -zxvf Term-Animation-2.4.tar.gz | |
#cd Term-Animation-2.4/ | |
#perl Makefile.PL && make && make test | |
#make install | |
cd /tmp | |
wget http://www.robobunny.com/projects/asciiquarium/asciiquarium.tar.gz | |
tar -zxvf asciiquarium.tar.gz | |
cd asciiquarium_1.1/ | |
cp asciiquarium /usr/local/bin | |
chmod 0755 /usr/local/bin/asciiquarium | |
#asciiquarium | |
##### no more secrets ####### | |
#git clone https://github.com/bartobri/no-more-secrets.git | |
#cd ./no-more-secrets | |
#make nms | |
#make sneakers ## Optional | |
#sudo make install | |
############## install psensor ################## | |
#wget https://wpitchoune.net/psensor/files/psensor-1.2.1.tar.gz | |
#tar zxvf psensor-1.2.1.tar.gz | |
#cd psensor-1.2.1/ | |
#./configure | |
#make | |
#make install | |
#apt install psensor-server | |
# ~/.zshrc eval "$(fasd --init auto)" | |
#alias a='fasd -a' # any | |
#alias s='fasd -si' # show / search / select | |
#alias d='fasd -d' # directory | |
#alias f='fasd -f' # file | |
#alias sd='fasd -sid' # interactive directory selection | |
#alias sf='fasd -sif' # interactive file selection | |
#alias z='fasd_cd -d' # cd, same functionality as j in autojump | |
#alias zz='fasd_cd -d -i' # cd with interactive selection | |
########## fasd ############ | |
#sudo add-apt-repository ppa:aacebedo/fasd | |
#sudo apt-get update | |
#sudo apt-get install fasd | |
########## install backupninja ######### | |
#git clone https://0xacab.org/liberate/backupninja/ | |
# ./autogen.sh | |
# ./configure | |
# make | |
# make install | |
############# INSTALL MIMIPENGUIN ############ | |
#git clone https://github.com/huntergregal/mimipenguin.git | |
#cd mimipenguin/ | |
#./mimipenguin.sh | |
################## MYSQL & ICINGA ####################### | |
# CREATE DATABASE icinga_ido_db; | |
# GRANT ALL ON icinga_ido_db.* TO 'icinga_ido_user'@'localhost' IDENTIFIED BY 'Password321'; | |
# FLUSH PRIVILEGES; | |
# EXIT; | |
#sudo apt install icinga2 monitoring-plugins icinga2-ido-mysql mariadb-server mariadb-client mariadb-common php8.2 php8.2-gd php8.2-mbstring php8.2-mysqlnd php8.2-curl php8.2-xml php8.2-cli php8.2-soap php8.2-intl php8.2-xmlrpc php8.2-zip php8.2-common php8.2-opcache php8.2-gmp php8.2-imagick php8.2-pgsql icinga2-ido-mysql | |
#sudo mysql -u root -p icinga_ido_db < /usr/share/icinga2-ido-mysql/schema/mysql.sql | |
#sudo nano /etc/icinga2/features-available/ido-mysql.conf | |
# sudo icinga2 feature enable ido-mysql | |
#sudo systemctl restart icinga2 | |
#sudo apt install icingaweb2 icingacli -y | |
#CREATE DATABASE icingaweb2; | |
#GRANT ALL ON icingaweb2.* TO 'icingaweb2user'@'localhost' IDENTIFIED BY 'P@ssword'; | |
#FLUSH PRIVILEGES; | |
#EXIT; | |
#sudo icingacli setup token create | |
# sudo icingacli setup token show | |
#http://server-ip/icingaweb2/setup |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment