Starting from:

$25

comp598 -  Homework 2 - Unix server and command-line exercises -Solved

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 (15 pts)
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 comp598_hw2.txt at the www root.  In other words, my web browser can access it at http://X.Y.Z.W:8008/comp598_hw2.txt, where X.Y.Z.W is the public IP address of your EC2.  The file itself should be empty.

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 (15 pts)
The objective of this task is to setup your EC2 instance to run an instance of the MariaDB database on port
 log into the database server and access an empty database named “comp598_test” as the “comp598_grader” 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 “comp598_test”

4.    Add a new user “comp598_grader” to your database server with permission to access the comp598_test database.  Use the password “$ungl@ss3s” for the password for this user.

use the mariadb (or mysql) command line client to log into the database (e.g., “mariadb -u comp598_grader -p -h INSTANCE_IP”) and then enter “use comp598_test;” at the prompt.  You should be able to do this as well.

Some Tips
-       This assignment will involve a substantial amount of googling 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

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

More products