Last active
March 2, 2024 06:09
-
-
Save c18s/90cc63ad7d84378e3ffaf182a646940d to your computer and use it in GitHub Desktop.
Debian environment packages
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
#!/bin/sh | |
export DEBIAN_FRONTEND=noninteractive | |
apt-get update && apt-get -y dist-upgrade | |
apt-get -y purge rpcbind ntp | |
apt-get -y install curl mosh htop sudo git make tmux net-tools wget nload ntpdate iptraf-ng mtr \ | |
iftop w3m vim locales tcpdump unzip bc hping3 vnstat bwm-ng bmon xz-utils python3-pip \ | |
dnsutils nethogs iperf3 acl tree ca-certificates gnupg | |
apt-get -y autoremove && apt-get -y autoclean | |
update-alternatives --set editor /usr/bin/vim.basic | |
timedatectl set-timezone Asia/Bangkok 2>/dev/null | |
ntpdate-debian && date | |
echo "LC_ALL=en_US.UTF-8" | sudo tee -a /etc/environment > /dev/null | |
echo "en_US.UTF-8 UTF-8" | sudo tee -a /etc/locale.gen > /dev/null | |
echo "LANG=en_US.UTF-8" | sudo tee /etc/locale.conf > /dev/null | |
sudo locale-gen en_US.UTF-8 | |
curl -fsSL https://raw.githubusercontent.com/c18s/LinuxScripts/master/swapfile/create_swap.sh | sh | |
curl -fsSL https://raw.githubusercontent.com/c18s/LinuxScripts/master/swapfile/sysctl_swap.sh | sh | |
curl -fsSL https://raw.githubusercontent.com/c18s/LinuxScripts/master/sudo-privileges/sudo-privileges.sh | USER=${USERNAME:-system} sh | |
curl -fsSL https://raw.githubusercontent.com/c18s/LinuxScripts/master/securing-ssh/securing-ssh.sh | ROOT_LOGIN=${ROOT_LOGIN:-yes} PASSWORD_LOGIN=${PASSWORD_LOGIN:-yes} X11_FORWARDING=no sh | |
curl -fsSL https://raw.githubusercontent.com/c18s/LinuxScripts/master/bash-it/bash-it.sh | USER=root sh | |
curl -fsSL https://raw.githubusercontent.com/c18s/LinuxScripts/master/bash-it/bash-it.sh | USER=${USERNAME:-system} sh | |
cat /root/.ssh/authorized_keys 2>/dev/null > /etc/ssh/authorized_keys | |
cat /etc/resolv.conf > /etc/resolv.conf.backup && rm -rf /etc/resolv.conf && cat /etc/resolv.conf.backup > /etc/resolv.conf | |
mkdir -p /root/.config/htop && echo "color_scheme=6" > /root/.config/htop/htoprc | |
su -c "mkdir -p /home/${USERNAME:-system}/.config/htop && echo 'color_scheme=6' > /home/${USERNAME:-system}/.config/htop/htoprc" ${USERNAME:-system} | |
echo "set-window-option -g mode-keys vi" > /root/.tmux.conf | |
su -c "echo 'set-window-option -g mode-keys vi' > /home/${USERNAME:-system}/.tmux.conf" ${USERNAME:-system} | |
curl -fsSL get.docker.com | sh | |
usermod -aG docker ${USERNAME:-system} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Install options
Env variable
USERNAME=system
system
system
can access root permission withsudo
system
can access docker and docker composeDefault
Advanced
/etc/ssh/authorized_keys