# Install php7.1-fpm ```bash # remove php5 modules apt-get autoremove --purge php5-* # add php-7.1 source list by [Ondřej Surý](https://github.com/oerdnj) add-apt-repository ppa:ondrej/php # Update index apt-get update # Install php7.1-fpm with needed extensions apt-get install libapache2-mod-php7.1 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-snmp php7.1-tidy php7.1-dev php7.1-intl php7.1-gd php7.1-curl php7.1-zip php7.1-xml ``` # UPDATE 2016-03-10 As mentioned by @jackmcpickle php-redis can now be installed with `apt-get install php-redis` and should be equivalent to the manual installation below. After installation `phpinfo()` says: `Redis-Version 2.2.8-devphp7` Same with xdebug. `apt-get install php-xdebug` will install the newly released stable version 2.4.0 that has php7 support. So the manual installations below are not needed any longer. --- # Build phpredis extension ```bash git clone https://github.com/phpredis/phpredis.git cd phpredis git checkout php7 phpize ./configure make && make install cd .. rm -rf phpredis ``` # Activate phpredis extension in fpm and cli ```bash echo "extension=redis.so" > /etc/php/7.1/mods-available/redis.ini ln -sf /etc/php/7.1/mods-available/redis.ini /etc/php/7.1/fpm/conf.d/20-redis.ini ln -sf /etc/php/7.1/mods-available/redis.ini /etc/php/7.1/cli/conf.d/20-redis.ini service php7.1-fpm restart ``` # nginx vhost config Replace `unix:/var/run/php5-fpm.sock` with `unix:/var/run/php/php7.1-fpm.sock` ```bash service nginx restart ``` # Install xdebug extension ```bash # Download stable release of xdebug 2.4.0 wget -c "http://xdebug.org/files/xdebug-2.4.0.tgz" # Extract archive tar -xf xdebug-2.4.0.tgz cd xdebug-2.4.0/ # build extension phpize ./configure make && make install ``` Enable the extension: ```bash echo "zend_extension=xdebug.so" > /etc/php/7.1/mods-available/xdebug.ini ln -sf /etc/php/7.1/mods-available/xdebug.ini /etc/php/7.1/fpm/conf.d/20-xdebug.ini ln -sf /etc/php/7.1/mods-available/xdebug.ini /etc/php/7.1/cli/conf.d/20-xdebug.ini service php7.1-fpm restart # Check it php -m | grep -i xdebug # should print: xdebug Xdebug ``` SI UBIESE ERRORES INSTALAR ```bash sudo apt-get install snmp ```