How to install PHP 7 on Debian Linux 8.x/7.x [jessie/wheezy]

http‮:s‬//www.lautturi.com
How to install PHP 7 on Debian Linux 8.x/7.x [jessie/wheezy]

To install PHP 7 on a Debian 8 (jessie) or Debian 7 (wheezy) system, you can use the following steps:

  1. Add the apt.dotdeb.org repository:
sudo echo "deb http://apt.dotdeb.org jessie all" >> /etc/apt/sources.list
sudo echo "deb-src http://apt.dotdeb.org jessie all" >> /etc/apt/sources.list

This repository contains the latest versions of PHP for Debian 8 and 7.

  1. Add the repository signing key:
wget https://www.dotdeb.org/dotdeb.gpg
sudo apt-key add dotdeb.gpg

This will add the repository signing key, which is used to verify the authenticity of the packages from the apt.dotdeb.org repository.

  1. Update the package index:
sudo apt-get update

This will update the package index to include the packages from the apt.dotdeb.org repository.

  1. Install PHP 7:
sudo apt-get install php7.0

This will install PHP 7 and its dependencies.

  1. Test the installation:
php -v

This will print the version of PHP that is installed on your system.

Created Time:2017-10-28 21:39:04  Author:lautturi