installation de caddy dans le script install
This commit is contained in:
parent
5ad1c3b517
commit
cd2b3aafba
|
@ -12,7 +12,7 @@ On a fresh install as root user
|
|||
|
||||
2. Install git
|
||||
|
||||
`apt install git -y`
|
||||
`apt install -y git`
|
||||
|
||||
3. Download and make the instal script executable
|
||||
|
||||
|
|
34
install.sh
34
install.sh
|
@ -23,7 +23,8 @@ fi
|
|||
echo "Generate and store the password somewhere safe"
|
||||
read -s -p "Enter password: " password
|
||||
echo
|
||||
useradd -m "$username"
|
||||
useradd -m "$username"
|
||||
chsh -s /bin/bash $username
|
||||
echo "$username:$password" | chpasswd
|
||||
|
||||
usermod -aG sudo $username
|
||||
|
@ -39,4 +40,33 @@ echo "Setup SSH"
|
|||
touch /etc/ssh/sshd_config.d/custom.conf
|
||||
echo "PermitRootLogin no" >> /etc/ssh/sshd_config.d/custom.conf
|
||||
echo "PermitEmptyPasswords no" >> /etc/ssh/sshd_config.d/custom.conf
|
||||
systemctl reload ssh
|
||||
systemctl reload ssh
|
||||
|
||||
#
|
||||
# FIREWALL AND FAIL2BAN
|
||||
#
|
||||
|
||||
echo "Setup Firewall and Fail2Ban"
|
||||
apt install -y ufw fail2ban
|
||||
systemctl enable fail2ban
|
||||
ufw allow ssh
|
||||
ufw allow http
|
||||
ufw allow https
|
||||
|
||||
#
|
||||
# TODO : ZABBIX AND URBACKUP
|
||||
#
|
||||
|
||||
echo "TODO : Zabbix and Urbackup"
|
||||
|
||||
#
|
||||
# CADDY
|
||||
#
|
||||
|
||||
echo "Install Caddy Webserver"
|
||||
apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
|
||||
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
|
||||
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee /etc/apt/sources.list.d/caddy-stable.list
|
||||
apt update
|
||||
apt install -y caddy
|
||||
caddy run
|
Loading…
Reference in New Issue