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

image

  • Answer yes to all 4 of the next configuration questions

image

  • Ensure the MariaDB starts at every boot

sudo systemctl enable mariadb

  • Test to make sure that mariadb is properly running

image

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

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

image

  • Test to see if you can login with the root account we made earlier

image

Deliverables

Submit: Screenshot showing the mariadb status as active

image

Submit: Screenshot showing successful PHP MyAdmin Login

image