Setup Apache, MariaDB , PHP ( LAMP ) on CentOs/RHEL
When Linux operating system or server work with Apache , MariaDB ( MySql) , PHP then this combination is called as “LAMP” and this combination used for host a websites and apps . In the LAMP Stack Linux is a Operating system , Apache is a web server and MariaDB is database and PHP is for dynamic content processing.
In this article we will install and set up Apache, MySQL and PHP for host dynamic website.
Here we will do all setup for CentOs and RHEL 7.x Version .
First install or enable EPEL and RPMForge ( RepoForge ) from below link url.
Installation and configuring Apache HTTPD :
Apache HTTPD is one of the most used web server on the web.apache is text based protocol for sending and receiving objects over a network connection.sometimes people called Apache or httpd .
Begin by installing httpd and httpd-manual .
# yum install httpd httpd-manual
Now you can start httpd service and enable for after reboot server , the service should be started through below command.
# systemctl enable httpd.service # systemctl start httpd.service
Once httpd or apache is started , we can check status information through below command.if there any reason for failed to start service , the output will be typically show clear view of why httpd failed to start.
# systemctl status –l httpd.service
HTTPD having two predefined services httpd and https , http service works on port 80/TCP and https service works on 443/TCP ports, so we should open port for http and https port.
For 80/TCP port :
# firewall-cmd --permanent --add-services=http
For 443/TCP port :
# firewall-cmd --permanent --add-services=https
After that reload firewalld configuration .