LAMP (Linux, Apache, MariaDB/MySQL and PHP) Stack is a bundled of software together i.e Linux, Apache, MariaDB/MySQL and PHP. This is the most common software stack in today’s internet to host dynamic websites and web applications.
1. Linux – Operating System (CentOS, RedHat, Ubuntu, SUSE, Debian etc.). 2. Apache – Web Server (Web pages or content will be served). 3. MariaDB/MySQL – is a Relational Database Server. 4. PHP – Server-side scripting language to generate dynamic web pages.
Prerequisites:
Running instance of Operating System (CentOS & RedHat)
root or sudo access
Internet access to download applications
1. RedHat / CentOS Linux Installation:
Please follow below link to install RHEL or CentOS Linux Installation.
Our System informations (click on picture to enlarge it).
2. Install Apache Web Server with basic configurations
After installing of RHEL/CentOS Linux and assigning static IP address on your system, follow below steps to install Apache Web Server. # dnf update or
# yum update Install Apache with below command (click on picture to enlarge it). # dnf install httpd After successful installation of Apache Web Server, use following command to manage Apache service (click on picture to enlarge it).
Open Apache default port 80 on system firewall with following command: # firewall-cmd –state # firewall-cmd –list-all # firewall-cmd –zone=public –permanent –add-service=http # firewall-cmd –reload
In our case system firewall service is running so we have added the rule to open HTTP service permanently on our system as shown below screenshot (click on picture to enlarge it).
Testing Apache Web Server
Open Web Browser and enter IP address which we have noted during CentOS / RHEL installation steps, we should see the Apache HTTP Server Test Page as shown below (click on picture to enlarge it).
3. Install MariaDB / MySQL Database Server.
Please follow below link to install MariaDB and MySQL CE Installation.
Install PHP with some common modules with below command. Apache Web Server uses default PHP-FPM or mod_php to run PHP code, after installation we need to restart php-fpm along with httpd service (click on picture to enlarge it).
Above screenshot indicates that PHP is working and should be able to see the PHP info page in the web browser.
Conclusion: In this tutorial, we have installed Basic LAMP (Linux, Apache, MariaDB and PHP) Stack installation. Big thanks for reading all the way to the end. Please share it with Your Friends & Help Someone… and alsoLike Our Facebook Page. Let me hear your thoughts in the comments below!