What is the LAMP stack? This acronym was given because of a common group of services installed commonly for web applications: Linux, Apache, MySQL, and PHP. Before we install this group of open source services, if you need help installing CentOS 7, follow my walkthrough here.
1.Install Apache sudo yum install httpd
2.Install the database of your choice, we are using mariadb here. sudo yum install mariadb-server mariadb
3.Add a password to your DB, sudo systemctl start mariadb then sudo mysql_secure_installation
4.Default password is blank, hit enter.
5.Set new root password
6.Select Y for the next few questions
7.Last we will install PHP, sudo yum install php php-mysql
8.Start Apache service, sudo systemctl start httpd.service
9.Ensure Apache starts on boot with sudo systemctl enable httpd.service
10.Ensure the DB service starts on boot with sudo systemctl enable mariadb.service
11.Now open the port to access the web services. Here we are opening port 80, then restart the network services.(Restarting server works as well)
12.Now visit http://IP-OF-SERVER.com to ensure Apache is working
That’s it! Your server is now set up for web application installs and many more projects. Check back for more projects using LAMP.