0. Aktualizacja

apt update
apt upgrade
apt dist-upgrade

1. Opcjonalnie prosty firewall (wyłączenie dostępu na porty, których nie udostępniamy publicznie)

apt install ufw
systemctl enable ufw
systemctl start ufw
ufw allow 'WWW Full'
ufw allow ssh

2. Serwer WWW (apache2)

apt install apache2 apache2-bin apache2-data apache2-utils
systemctl enable apache2
systemctl start apache2

3. Baza danych (mariadb)

apt install mariadb-server mysql-common mariadb-client
systemctl enable mariadb
systemctl start mariadb
/usr/bin/mariadb-secure-installation
# blank, Y, Y (nowe haslo), Y, Y, Y, Y

4. PHP

apt install php8.4-xml php8.4-mbstring libapache2-mod-php8.4 php8.4-common php-json php-gd php-getid3 php8.4-gd php8.4-fpm php8.4-mysql php-curl php-dom php-igbinary php-imagick php-intl php-mbstring php-xml php-zip imagemagick
systemctl start php8.4-fpm
systemctl enable php8.4-fpm