Solved COMP 370 Homework 2 – Unix server and command-line exercises

$30.00

Original Work ?
Category: Tags: , , , , , , You will Instantly receive a download link for .ZIP solution file upon Payment

Description

5/5 - (1 vote)

The goal of this assignment is for you to get more familiar with your Unix EC2 – both as a data science
machine and as a server (as a data scientist, you’ll need it as both).

Task 1: Setting up a webserver

The objective of this task is to setup your EC2 instance to run an Apache webserver on port 8008. Your goal is
to have it serving up the file comp370_hw2.txt at the www root. In other words, your friend should be able to
open a web browser and access it at https://X.Y.Z.W:8008/comp370_hw2.txt, where X.Y.Z.W is the public IP
address of your EC2. You should put some interesting text in the file comp370_hw2.txt so something shows
up when you load it in a web browser.

One key detail to keep in mind is the security configuration of your EC2 – you’ll need to ensure that it allows
port 8008 traffic through.

Task 2: Setting up a database server

The objective of this task is to setup your EC2 instance to run an instance of the MariaDB database on port
6002. Your goal is for someone to be able to log into the database server and access an (empty) database
named “comp370_test” as the “comp370” user. To do this, you will need to do the following in roughly this
order:
1. Install the MariaDB database server (try Googling “install mariadb ubuntu”…)
2. Configure the database to run on an external port
3. Create an empty database named “comp370_test”
4. Add a new user “comp370” to your database server with permission to access the comp370_test
database. Use the password “$ungl@ss3s” for the password for this user.

Make sure your MariaDB instance is publicly accessible, otherwise you won’t be able to access the database
from your personal computer.

To test this, you can install a relational database client (like DBeaver) on your personal computer and log into
the database.

Some Tips
– This assignment will involve a substantial amount of googling (or possibly using ChatGPT) and working
on the UNIX command line.
– If you don’t understand a concept, google it and read up on it.

– If you don’t understand how to do something, try googling it and making sense of instructions you find
– If you use ChatGPT to get the answers, that’s okay. But once you get it to work, take notes, and then
do it from your notes – typing everything (i.e., don’t use ChatGPT).

– You will need to edit files on your EC2. My preferred editor is vim – but there’s a steep learning curve.
If this is your first time using Unix or text editors, I would recommend using pico or nano.

Submission Instructions
Your MyCourses submission should contain the following:
– webserver_setup.md
o A file that contains the sequence of steps/commands required to setup a functioning webserver
with a file named comp370_hw2.txt being served from the www root.
– database_setup.md

o A file that provides the sequence of steps/commands required to setup a functioning database
that is accessible from the public internet.

Note that there’s no proscribed structure for these files. You can make a bulleted list and have sentences in
each, or sections for each step. Whatever captures your process best.