# Installing Magento 2.x and PHP 7.0 on Debian Jessie x64

URL: https://sohaib.com/blog/installing-php-7-0-debian-jessie-x64
Author: Sohaib Khan
Published: Nov 24, 2016
Updated: Sep 8, 2026
Category: E-commerce Solutions

> Step by Step gpg --keyserver keys.gnupg.net --recv-key 89DF5277 && gpg -a --export 89DF5277 | apt-key add Add sources nano /etc/apt/sources.list deb http://packages.dotdeb.org jessie all deb-src…

Step by Step

```javascript
gpg --keyserver keys.gnupg.net --recv-key 89DF5277 && gpg -a --export 89DF5277 | apt-key add
```

Add sources nano /etc/apt/sources.list

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

```bash
apt-get update
```

```bash
apt-get install php7.0-cli php7.0-fpm php7.0-mysql php7.0-curl php7.0-gd php7.0-imagick php7.0-mcrypt php7.0-memcached php7.0-imap python-software-properties software-properties-common php7.0 php7.0 php7.0-common php7.0-gd php7.0-mysql php7.0-mcrypt php7.0-curl php7.0-intl php7.0-xsl php7.0-mbstring php7.0-zip php7.0-bcmath php7.0-iconv -y
```

Install Percona Database Server

```bash
wget https://repo.percona.com/apt/percona-release_0.1-4.$(lsb_release -sc)_all.deb
```

```plaintext
dpkg -i percona-release_0.1-4.$(lsb_release -sc)_all.deb
```

Update the repo

```bash
apt-get update
apt-get install percona-server-server-5.7 percona-server-client-5.7 -y
```

[**Once above is installed simply download Nginx for Jessie - which is already compiled with all the modules and Pagespeed**](http://52.201.111.196/2017/01/04/how-to-install-nginx-page-speed-on-debian-x64-jessie/)

```bash
wget https://s3.amazonaws.com/ns1-serverbackups/Nginx/nginx_1.10.2-1-jessie_amd64.deb
```
