Lab 5 2 LAMP Stack in AWS Part 2 - max-gallagher/SYS-360 GitHub Wiki
This is a continuation of Lab 5-1 so this will be starting at step 3
Step 3 Secure the database server
- Start the mariaDB server this can be done through systemctl
sudo systemctl start mariadb
- Run mysql_secure_installation
sudo mysql_secure_installation
- Here you need to set a root password DO NOT FORGET IT
- Answer yes to all 4 of the next configuration questions
- Ensure the MariaDB starts at every boot
sudo systemctl enable mariadb
- Test to make sure that mariadb is properly running
Step 4: Install phpMyAdmin
- Install dependencies
sudo yum install php-mbstring -y
- Restart apache and php
sudo systemctl restart httpd
sudo systemctl restart php-fpm
-
Return to the apache root directory (var/www/html)
-
Select a source package for the latest phpMyAdmin release from https://www.phpmyadmin.net/downloads
wget https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz
- Create a phpMyAdmin folder and extract the package into it
mkdir phpMyAdmin && tar -xvzf phpMyAdmin-latest-all-languages.tar.gz -C phpMyAdmin --strip-components 1
- Delete the phpMyAdmin-latest-all-languages.tar.gz tarball
rm phpMyAdmin-latest-all-languages.tar.gz
- Access webpage for phpMyAdmin file (http://ec2-44-223-24-162.compute-1.amazonaws.com/phpMyAdmin/)
- Test to see if you can login with the root account we made earlier
Deliverables
Submit: Screenshot showing the mariadb status as active
Submit: Screenshot showing successful PHP MyAdmin Login