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

aptitude install apt-transport-https lsb-release ca-certificates &&
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg &&
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" >> /etc/apt/sources.list &&
aptitude update
aptitude install php7.1-cli
aptitude install php7.1-fpm
aptitude install php7.1-mysql
aptitude install php7.1-curl
aptitude install php7.1-gd
aptitude install php7.1-imagick
aptitude install php7.1-intl
aptitude install php7.1-mbstring
aptitude install php-soap
aptitude install php7.1-soap
aptitude install php7.1-xmlrpc
aptitude install php7.1-xsl
aptitude install mcrypt
aptitude install php7.1-mcrypt
aptitude install php7.1-dev
aptitude install zip
aptitude install php7.1-zip
aptitude install php7.1-bcmath
aptitude install php-pear
pecl install timezonedb

See also:

The current Magento 2.2 development branch becomes to support PHP 7.1.

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?