- Ubuntu 16.04+
$ sudo add-apt-repository ppa:ondrej/php
$ sudo apt update
$ sudo apt install nginx php7.1-fpm php7.1-cli php7.1-common php7.1-json php7.1-opcache php7.1-mysql php7.1-phpdbg php7.1-mbstring php7.1-gd php7.1-imap php7.1-ldap php7.1-pgsql php7.1-pspell php7.1-recode php7.1-soap php7.1-tidy php7.1-dev php7.1-intl php7.1-gd php7.1-curl php7.1-zip php7.1-xml php7.1-xdebug
- Centos 7.x / Fedora 25.x
$ sudo su
$ rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
$ rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
$ yum/dnf install nginx php71w-fpm php71w-cli php71w-common php71w-json php71w-opcache php71w-mysql php71w-phpdbg php71w-mbstring php71w-gd php71w-imap php71w-ldap php71w-pgsql php71w-pspell php71w-recode php71w-soap php71w-tidy php71w-devel php71w-intl php71w-gd php71w-curl php71w-zip php71w-xml php71w-pecl-xdebug
/var/run/php/php7.1-fpm.sock
Paste the following to /etc/php/7.1/mods-available/xdebug.ini
:
zend_extension=xdebug.so # If not already
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.var_display_max_depth = -1
xdebug.var_display_max_children = -1
xdebug.var_display_max_data = -1
xdebug.idekey = "PHPSTORM"
All done.