How to install PHP 7 on Ubuntu Linux 14.04 LTS
To install PHP 7 on Ubuntu 14.04 LTS, follow these steps:
- Add the repository for PHP 7:
sudo apt-get install software-properties-commonrnsudo add-apt-repository ppa:ondrej/php- Update the package list:
sudo apt-get update- Install PHP 7:
sudo apt-get install php7.0This will install the latest version of PHP 7 available in the repository. You can also install specific packages, such as php7.0-cli or php7.0-fpm, by specifying the package name after apt-get install.
- Verify the installation:
php -vThis will display the version of PHP that is currently in use.
Note that you may need to restart any services that use PHP, such as Apache or Nginx, for the changes to take effect.
