Install Apache, MariaDB and PHP on Linux (LAMP)
Prerequistes:
You should have a clean install of CentOS 7, Redhat Enterprise Server 7 or an equivelent.
You must be a sudo user, ie. in the sudoers group, or the root user to install run this script.
Running as root is NOT recommended!
Installation:
Excecute the commands below from your server console
Install git on the server if not alrady on the server.
sudo yum -y install git
Second clone this project and run the install script
git clone https://github.com/Rapitharian/LAMP_Install.git mv $HOME/LAMP_Install/install_lamp.sh $HOME chmod +x install_lamp.sh ./install_lamp.sh 2>&1 | tee -a LAMP_Install.log
Cleanup:
Remove the installation script install_lamp.sh
If you don't need the installation log, remove that as well.
rm install_lamp.sh rm LAMP_Install.log
Sysytemctl (service control) usage:
Services installed "httpd" & "mariadb".
Change SERVICENAME for the either httpd or mariadb.
Check Status of the server service: systemctl status SERVICE_NAME
Start the server service: systemctl start SERVICE_NAME
Stop the server service: systemctl stop SERVICE_NAME
Restart the server service: systemctl restart SERVICE_NAME