How do I install PHP 7.0 FPM and CLI for Magento 2 to Debian 8 (Jessie)?

Step 1

Add GPG keys for dotdeb.org:

wget http://www.dotdeb.org/dotdeb.gpg
cat dotdeb.gpg | apt-key add -

Step 2

Register dotdeb.org packages through /etc/apt/sources.list:

deb http://packages.dotdeb.org jessie all
deb-src http://packages.dotdeb.org jessie all

Step 3

Update the packages and upgrade the environment.

aptitude update
aptitude full-upgrade

Step 4

Install PHP 7 CLI and FPM:

aptitude install php7.0-cli php7.0-fpm

Step 5

Install the PHP extensions required for Magento 2:

aptitude install php7.0-bcmath php7.0-mysql php7.0-curl php7.0-gd php7.0-imagick php7.0-intl php7.0-mbstring php-soap php7.0-xmlrpc php7.0-xsl mcrypt php7.0-mcrypt php7.0-dev zip php7.0-soap php7.0-zip
pecl install timezonedb

See also:

How do I install PHP 7.2 FPM and CLI for Magento 2 to Debian 9 (Stretch)?

How do I install PHP 7.1 FPM and CLI for Magento 2 to Ubuntu 18?

How do I install PHP 7.4 FPM and CLI for Magento 2.4 to Debian 10?

How do I install PHP 7.3 FPM and CLI for Magento 2.3 to Debian 10?