php 7.x auf debian installieren

Schritt 1: System aktualisieren

$ apt update
$ apt upgrade
$ apt dist-upgrade
$ apt clean

Schritt 2: Repository einbinden

$ sudo apt install ca-certificates apt-transport-https 
$ wget -q https://packages.sury.org/php/apt.gpg -O- | sudo apt-key add -
$ echo “deb https://packages.sury.org/php/ $(lsb_release -sc) main” | sudo tee /etc/apt/sources.list.d/php.list
$ apt update

Schritt 3: php installieren

$ apt install php7.3
$ php -v

Schritt 4: php-Module installieren

$ apt search php7.3
$ apt install <PAKETNAME>