This article covers steps To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu Linux System. PHP stands for Hypertext Preprocessor, and it’s a script-based server-side programming language. PHP is often used to automate server tasks. It handles tasks like dynamic content, database requests, and processing and displaying data.
A "LAMP" stack is a group of open source software that is typically installed together to enable a server to host dynamic websites and web apps.
This term is actually an acronym which represents the Linux operating system, with the Apache web server.
The site data is stored in a MySQL database, and dynamic content is processed by PHP.
To Install PHP 7.2 with Apache on Ubuntu:
1. Ensure you are using the latest Ubuntu updates by entering the following command into a terminal window:
$ apt-get update && apt-get upgrade
2. To install PHP 7.2, enter the following command:
$ sudo apt-get install php libapache2-mod-php
Confirm the installation by hitting Enter. The system will download and install PHP from the software repositories. This command also installs dependencies and modules for use with Apache.
3. Verify PHP was installed, with the command:
$ php -v