It is easy to install latest PHP 7.0. Run the following commands in your terminal. I am using Ubuntu and using ppa:ondrej/php from Ondřej Surý

Prerequisites

I am assuming that you are running PHP 5.x on an Ubuntu 14.04 machine, using either mod_php in conjunction with Apache, or PHP-FPM in conjunction with Nginx. I also assume that you have a non-root user configured with sudo privileges for administrative tasks.

Setup Script

# remove php5 modules
sudo apt-get autoremove --purge php5-* && \  
sudo apt-get install -y language-pack-en-base && \  
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php -y && sudo apt-get update && \  
sudo apt-get install -y php7.0 \  
php7.0-cgi \  
php7.0-cli \  
php7.0-curl \  
php7.0-imap \  
php7.0-ldap \  
php7.0-pgsql \  
php7.0-mcrypt \  
php7.0-sqlite3 \  
php7.0-mysql \  
php7.0-json \  
php7.0-fpm \  
php7.0-xmlrpc \  
php7.0-gd \  
php7.0-common \  
php7.0-odbc \  
php7.0-opcache \  
php7.0-readline \  
php7.0-intl \  
php7.0-phpdbg \  
php7.0-tidy \  
php7.0-mbstring \  
php7.0-xml \  
mcrypt \  
libmcrypt-dev  

Install PHP 7 Gist.

I use PHP-7 with Nginx. I will write a post on how to install and configure php 7 with Ningx soon.

© 2016. All Rights Reserved.

Proudly published with Ghost