How to install PHP 7 on Ubuntu Linux 14.04 LTS

https‮/:‬/www.lautturi.com
How to install PHP 7 on Ubuntu Linux 14.04 LTS

To install PHP 7 on Ubuntu Linux 14.04 LTS, you can use the following steps:

  1. Update the package list by running the following command:
sudo apt-get update
  1. Add the ondrej/php repository to your system by running the following command:
sudo add-apt-repository ppa:ondrej/php
  1. Update the package list again to include the packages from the new repository:
sudo apt-get update
  1. Install PHP 7 and some common PHP extensions by running the following command:
sudo apt-get install php7.4-fpm php7.4-common php7.4-mysql php7.4-xml php7.4-xmlrpc php7.4-curl php7.4-gd php7.4-imagick php7.4-cli php7.4-dev php7.4-imap php7.4-mbstring php7.4-opcache php7.4-soap php7.4-zip

Replace php7.4 with the desired version of PHP (e.g. php7.3, php7.2, etc.).

This will install PHP 7 and the specified extensions.

  1. Once the installation is complete, you can use the php -v command to verify that PHP is installed and to display the version number.

That's it! PHP 7 should now be installed on your Ubuntu Linux 14.04 LTS system.

Keep in mind that the above steps will install PHP 7 as a FastCGI process manager (FPM) for use with web servers such as Nginx or Apache. If you are using a different web server or want to use PHP in a different configuration, the steps may be different.

Created Time:2017-10-28 21:39:04  Author:lautturi