| Start |
|---|
| Command Line Install Using APT for PHP 7 This will only install PHP. If you wish to serve a PHP file to the web you will also need to install a web-server such as [Apache](http://www.apache.org/), [Nginx](https://www.nginx.com/), or use [PHP's built in web-server](http://php.net/manual/en/features.commandline.webserver.php) (**php version 5.4+**). If you are in a Ubuntu version below 16.04 and want to use PHP 7 anyway, you can add [Ondrej's PPA repository](https://launchpad.net/%7Eondrej/+archive/ubuntu/php/) by doing: `sudo add-apt-repository ppa:ondrej/php` Make sure that all of your repositories (opens new window) are up to date: After updating your system's repositories, install PHP: Let's test the installation by checking the PHP version: This should output something like this. Note: Your output will be slightly different. You now have the capability to run PHP from the command line. |
| Installing in Enterprise Linux distributions (CentOS, Scientific Linux, etc) Use the This installs a minimal install of PHP including some common features. If you need additional modules, you will need to install them separately. Once again, you can use Example output: To install the gd library: Enterprise Linux distributions have always been conservative with updates, and typically do not update beyond the point release they shipped with. A number of third party repositories provide current versions of PHP: IUS and Webtatic provide replacement packages with different names (e.g. Following are instructions on installing PHP 7.0 from Remi's repository. This is the simplest example, as uninstalling the system packages is not required. |
Read Article
https://develop.horje.com/learn/1434/reference