Debian 8 - Install PHP 7.1

Using Ondrej Sury

The easiest way to install PHP 7.1 is to use prog-exec.

prog-exec "23/2" "2649c263665a6224262882b6abb46ad49cc6935654e56a62a1cdfb70c353b02e"

Alternatively, you can copy and paste the following script, which is what the previous command downloads and executes.

sudo apt update
sudo apt install apt-transport-https lsb-release ca-certificates -y

sudo wget -O /etc/apt/trusted.gpg.d/php.gpg \

echo "deb $(lsb_release -sc) main" |
sudo tee /etc/apt/sources.list.d/php.list

sudo apt update
sudo apt install php7.1 -y

This script is a derived from the the source in the references section, but I have a strong reason to believe was also grabbed from Ondrej.

Compile From source

If you don't feel like placing your trust in Ondrej, then you may want to compile from source. At the time of writing this post, the current version of the 7.1 line is 7.1.0 which can be found here. One day I will fill in this section with a script for compiling from source, but for now you can refer to - Compiling PHP 5.5 From Scratch.




Stuart is a software developer with a passion for Linux and open source projects.

comments powered by Disqus