Server
Apt
/etc/apt/sources.list
add contrib non-free
after main
to the sources....
deb http://deb.debian.org/debian bullseye main contrib non-free
...
Mandatory Packages
curl
fontconfig
ftp
git
libxext6
libxrender1
sshpass
tmux
ttf-mscorefonts-installer
unzip
zip
Update server via package manager and install mandatory packages:
$ apt update && apt upgrade
$ apt install curl fontconfig ftp git \
libxext6 libxrender1 sshpass tmux ttf-mscorefonts-installer \
unzip zip
Optional Packages
etckeeper
lynis
unattended-upgrades
Time Synchronization via systemd
Ensure that ntp
is not installed and restart the timesyncd service
by typing systemctl restart systemd-timesyncd.service
.
The timesyncd service is configured in /etc/systemd/timesyncd.conf
. View
https://dyn.manpages.debian.org/buster/systemd/timesyncd.conf.5.en.html
for full configuration.
timedatectl status
.timedatectl set-ntp true
.After configuring and restarting the service, check if it is “active (running)” by typing
systemctl status systemd-timesyncd.service
.
Apache
Install apache webserver:
$ apt install apache2
PHP
Warning
Please use the Sury repository to installing the PHP packages.
View their README.txt to add the required repository to debian sources.
After adding the sury repository pin the php version with apt-pinning:
Create the file /etc/apt/preferences.d/sury
with following content:
Package: php5.6*, php7.0*, php7.1*, php7.2*, php7.3*, php7.4*, php8.0*, php8.2*
Pin: release *
Pin-Priority: -1
After adding the apt configuration install the php packages:
$ apt install libapache2-mod-php8.1 php-common php8.1 php8.1-bcmath \
php8.1-bz2 php8.1-cli php8.1-common php8.1-curl php8.1-gd php8.1-igbinary \
php8.1-imap php8.1-intl php8.1-ldap php8.1-mailparse \
php8.1-mbstring php8.1-mysql php8.1-opcache php8.1-readline php8.1-soap \
php8.1-ssh2 php8.1-tidy php8.1-xml php8.1-xmlrpc php8.1-zip
MariaDB
Install mariadb-server and client:
$ apt install mariadb-client mariadb-server