How to install LAMP stack on Amazon linux version 2, mariadb, apache and php List of Commands: sudo su yum update -y amazon-linux-extras install -y lamp-mariadb10.2-php7.2 php7.2 yum install -y httpd mariadb-server yum info httpd yum info mariadb-server yum info php systemctl status httpd systemctl start httpd systemctl status httpd systemctl enable httpd systemctl is-enabled httpd curl ifconfig.me Copy the public ip and paste it in google chrome browser and see whether you are getting the apache test page exit cat /etc/group Look for apache group whether ec2-user is added or not sudo usermod -aG apache ec2-user cat /etc/group Look now groups Look now sudo chown -R ec2-user:apache /var/www sudo yum list installed httpd mariadb-server php-mysqlnd

lampmariadbphphttpdapache web serverlamp stack