Test LAMP server

Check LAMP server

  1. We perform a test of the LAMP server. Create a PHP file.
echo "<?php phpinfo(); ?>" > /var/www/html/phpinfo.php

create vpc for linux instance

  1. In the EC2 interface

    • Select Instances
    • Select Linux-instance
    • Copy Public IPv4 DNS
  2. Paste the following command into the browser:

http://my.public.dns.amazonaws.com/phpinfo.php

create vpc for linux instance

  1. Verify the installed packages again with the following command:
sudo yum list installed httpd mariadb-server php-mysqlnd

create vpc for linux instance

  1. Delete the file phpinfo.php
rm /var/www/html/phpinfo.php

create vpc for linux instance