First get your system updated

yum update -y; yum upgrade -y

Install LAMP package as below

yum install httpd mariadb-server mariadb php php-mysql -y 
systemctl enable httpd 
systemctl enable mariadb
systemctl start httpd 
systemctl start mariadb

Configure MySQL/MariaDB initial setup.


To install additional PHP package/extension simply search as below

yum search php-

Add http service to firewalld

firewall-cmd --permanent --zone=public --add-service=http 
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload