How to install PHP 7.1.6 on Ubuntu 17.04 .
To install PHP 7.1.6 on Ubuntu 17.04.
PHP 7.1.6 is the most recent stable release, and is a popular general-purpose scripting language mostly used for the web development. Since it is fast, flexible and pragmatic, PHP is capable of powering everything from your blog to the most popular websites in the world.
Before you begin with the installation of PHP, make sure you add the necessary repository in your machine. Execute the action by running the following command.
root@linuxhelp:~# add-apt-repository ppa:ondrej/php Co-installable PHP versions: PHP 5.6, PHP 7.0, PHP 7.1 and most requested extensions are included. PLEASE DON' T USE PHP 5.4 OR PHP 5.5. The PHP 5.5 and later are no longer supported with security updates, therefore they are not included in this repository. You can get more information about the packages at https://deb.sury.org BUGS& FEATURES: This PPA now has a issue tracker: https://deb.sury.org/#bug-reporting . . gpg: Total number processed: 1 gpg: imported: 1 OK
Once it is done, update the newly added repo as follows.
root@linuxhelp:~# apt-get update Hit:1 http://ppa.launchpad.net/gns3/ppa/ubuntu zesty InRelease Hit:2 http://in.archive.ubuntu.com/ubuntu zesty InRelease Get:3 http://security.ubuntu.com/ubuntu zesty-security InRelease [89.2 kB] . . Fetched 379 kB in 2s (128 kB/s) Reading package lists... Done
Now is the time to install PHP 7.1.6. in your machine. Run the following command for kick-starting PHP installation.
root@linuxhelp:~# apt-get install php7.1 Reading package lists... Done Building dependency tree Reading state information... Done . . Processing triggers for libc-bin (2.24-9ubuntu2) ... Processing triggers for ureadahead (0.100.0-19) ... Processing triggers for systemd (232-21ubuntu2) ... Processing triggers for ufw (0.35-4) ...
PHP 7.1.6. is installed in your system. To check , run the the following command.
root@linuxhelp:~# php -v PHP 7.1.8-2+ubuntu17.04.1+deb.sury.org+4 (cli) (built: Aug 4 2017 13:07:41) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.1.8-2+ubuntu17.04.1+deb.sury.org+4, Copyright (c) 1999-2017, by Zend Technologies
With the above step, the complete installation and verification of PHP 7.1.6. is complete.