Update debian.sh
This commit is contained in:
parent
26054cc960
commit
a78825fa1a
20
debian.sh
20
debian.sh
@ -2,8 +2,8 @@
|
|||||||
#########################################################
|
#########################################################
|
||||||
# Function :Initial Server Setup for Debian Server #
|
# Function :Initial Server Setup for Debian Server #
|
||||||
# Platform :Debian 11.x Bullseye #
|
# Platform :Debian 11.x Bullseye #
|
||||||
# Version :1.2 #
|
# Version :1.3 #
|
||||||
# Date :06-29-2022 #
|
# Date :12-17-2022 #
|
||||||
# Author :Xiufeng Guo #
|
# Author :Xiufeng Guo #
|
||||||
# Contact :i@m.ac #
|
# Contact :i@m.ac #
|
||||||
# Company :xTom #
|
# Company :xTom #
|
||||||
@ -111,7 +111,8 @@ function install_packages() {
|
|||||||
unzip rsync \
|
unzip rsync \
|
||||||
bash-completion git whois \
|
bash-completion git whois \
|
||||||
fail2ban iptables haveged gnupg vnstat lrzsz jq \
|
fail2ban iptables haveged gnupg vnstat lrzsz jq \
|
||||||
unattended-upgrades apt-listchanges
|
unattended-upgrades apt-listchanges \
|
||||||
|
htop iftop p7zip-full
|
||||||
printf "\E[0;35;40m"
|
printf "\E[0;35;40m"
|
||||||
echo '### Updating system... ###'
|
echo '### Updating system... ###'
|
||||||
printf "\E[0m"
|
printf "\E[0m"
|
||||||
@ -212,6 +213,15 @@ alias ll='ls --color=auto -alF'
|
|||||||
alias l='ls -A'
|
alias l='ls -A'
|
||||||
alias mtr='mtr --aslookup --show-ips'
|
alias mtr='mtr --aslookup --show-ips'
|
||||||
PS1='\[\033[01;31m\]\u\[\033[01;33m\]@\[\033[01;36m\]\h \[\033[01;33m\]\w \[\033[01;35m\]\\$ \[\033[00m\]'
|
PS1='\[\033[01;31m\]\u\[\033[01;33m\]@\[\033[01;36m\]\h \[\033[01;33m\]\w \[\033[01;35m\]\\$ \[\033[00m\]'
|
||||||
|
|
||||||
|
# If this is an xterm set the title to user@host:dir
|
||||||
|
case "\$TERM" in
|
||||||
|
xterm*|rxvt*)
|
||||||
|
PS1="\[\e]0;\${debian_chroot:+(\$debian_chroot)}\u@\h: \w\a\]\$PS1"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
EOF
|
EOF
|
||||||
printf "\E[0;33;40m"
|
printf "\E[0;33;40m"
|
||||||
echo "### Custom .bashrc added ###"
|
echo "### Custom .bashrc added ###"
|
||||||
@ -304,7 +314,7 @@ function add_nginx_repo() {
|
|||||||
printf "\E[0;35;40m"
|
printf "\E[0;35;40m"
|
||||||
echo '### Add n.wtf Nginx repo ###'
|
echo '### Add n.wtf Nginx repo ###'
|
||||||
printf "\E[0m"
|
printf "\E[0m"
|
||||||
curl -sS https://raw.githubusercontent.com/u-sb/nginx-docs/main/public/public.key | gpg --dearmor > /usr/share/keyrings/n.wtf.gpg
|
curl -sS https://n.wtf/public.key | gpg --dearmor > /usr/share/keyrings/n.wtf.gpg
|
||||||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/n.wtf.gpg] https://mirror-cdn.xtom.com/sb/nginx/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/n.wtf.list
|
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/n.wtf.gpg] https://mirror-cdn.xtom.com/sb/nginx/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/n.wtf.list
|
||||||
printf "\E[0;33;40m"
|
printf "\E[0;33;40m"
|
||||||
echo "### n.wtf Nginx repo added ###"
|
echo "### n.wtf Nginx repo added ###"
|
||||||
@ -387,7 +397,7 @@ function add_acme_sh() {
|
|||||||
printf "\E[0;35;40m"
|
printf "\E[0;35;40m"
|
||||||
echo '### Install acme.sh ###'
|
echo '### Install acme.sh ###'
|
||||||
printf "\E[0m"
|
printf "\E[0m"
|
||||||
curl -sS https://get.acme.sh | bash -s email=david@xtom.com
|
curl -sS https://get.acme.sh | bash -s email=i@m.ac
|
||||||
/root/.acme.sh/acme.sh --upgrade --auto-upgrade
|
/root/.acme.sh/acme.sh --upgrade --auto-upgrade
|
||||||
/root/.acme.sh/acme.sh --set-default-ca --server letsencrypt
|
/root/.acme.sh/acme.sh --set-default-ca --server letsencrypt
|
||||||
printf "\E[0;33;40m"
|
printf "\E[0;33;40m"
|
||||||
|
Loading…
Reference in New Issue
Block a user