Updated: 2014-04-02 05:30 EDT

1 Due Date and Deliverables

Do not print this assignment on paper!

2 Purpose of this Assignment

Do not print this assignment on paper! On paper, you cannot follow any of the hyperlink URLs that lead you to hints and course notes relevant to answering a question.

This assignment is based on your weekly Class Notes. It is a pre-requisite for future assignments.

  1. Install a server-style (no GUI) CentOS Virtual Machine and VMware Tools

3 Introduction and Overview

This is an overview of how you are expected to complete this assignment. Read all the words before you start working.

  1. Complete the Tasks listed below.
  2. Verify your own work before running the Checking Program.
  3. Run the Checking Program to help you find errors.
  4. Submit the output of the Checking Program to Blackboard before the due date.
  5. READ ALL THE WORDS to work effectively and not waste time.

You will create file system structure in your CLS home directory containing various directories and files. You will also make changes in your own Linux Virtual Machine running Centos 6.5. You can use the Checking Program to check your work as you do the tasks. You can check your work with the checking program as often as you like before you submit your final mark. Some task sections below require you to finish the whole section before running the checking program; you may not always be able to run the checking program successfully after every single task step.

When you are finished the tasks, leave the files and directories in place on both the CLS and your own Linux Virtual Machine as part of your deliverables. Do not delete any assignment work until after the term is over! Assignments may be re-marked at any time on the CLS; you must have your term work available on the CLS right until term end.

3.1 Searching the course notes

The previous term’s course notes are available on the Internet here: CST8207 GNU/Linux Operating Systems I. All the notes files are also on the CLS. You can learn about how to read and search these files using the command line on the CLS under the heading Copies of the CST8207 course notes near the bottom of the page Course Linux Server.

3.2 The CLS Source Directory

All references to the “Source Directory” below are to the CLS directory ~idallen/cst8177/14w/assignment08/ and that name starts with a tilde character followed by a userid with no intervening slash. The leading tilde indicates to the shell that the pathname starts with the HOME directory of the account idallen (seven letters).

You do not have permission to list the names of all the files in the Source Directory, but you can access any files whose names you already know.

4 Tasks

4.1 Set Up – The Base Directory on the CLS

  1. Do a Remote Login to the Course Linux Server (CLS) from any existing computer, using the host name appropriate for whether you are on-campus or off-campus.

  2. Make the directory ~/CST8177-14W/Assignments/assignment08, in which you will create the files and scripts resulting from the following tasks.

  3. Create the check symbolic link needed to run the Checking Program, as described in the section Part II - Check and Submit below.

This assignment08 directory is the base directory for most pathnames in this assignment. Store your files and answers below in this base assignment08 directory.

Run Part II - Check and Submit to verify your work so far.

4.2 Install CentOS 6.5 in a Virtual Machine

You can use the Fetch and Checking Program to check your work as you do each step of the following (long) installation and configuration:

  1. Do the CentOS Virtual Machine Installation and Verification.
    • Make sure it passes the checks for disk sizes and package counts.
    • Do not install any packages other than the ones specified. (You don’t get to install your favourite packages on company servers; you only install the approved set.)

Run the Fetch and Checking Program to check your work.

4.3 Install VMware Tools in CentOS

This section does not apply if you are not using VMware.

  1. If you are using VMware, do the VMware Tools Installation.
    • Only VMware users need to do this.
    • Make sure the vmtoolsd process is running after a reboot.

Run the Checking Program to verify your work so far.

4.4 When you are done

That is all the tasks you need to do.

Check your work a final time using the Fetch and Checking Program and save the output as described below. Submit your mark following the directions below.

5 Checking, Marking, and Submitting your Work

Summary: Do some tasks, then run the Fetch and checking program to verify your work as you go. You can run the Fetch and checking program as often as you want. When you have the best mark, upload the marks file to Blackboard.

Since I also do manual marking of student assignments, your final mark may not be the same as the mark submitted using the current version of the Checking Program. I do not guarantee that any version of the Checking Program will find all the errors in your work. Complete your assignments according to the specifications, not according to the incomplete set of the mistakes detected by the Checking Program.

The checking program resides on the Course Linux Server, but your work is on your CentOS Virtual Machine. There is a Fetch program that you must download and use on your CentOS Virtual Machine to copy information from your CentOS Virtual Machine to your account on the CLS so that the checking program can check it on the CLS.

Once the Fetch program has fetched these files from your Virtual Machine to the CLS, you can run the checking program on the CLS to check what is saved in the files. When you make changes on your CentOS Virtual Machine, you need to run the Fetch program again on CentOS to update the saved files on the CLS.

Simply running the checking program on the CLS will not update the saved files on the CLS. You must run the Fetch program on your CentOS VM when you make changes on your CentOS Virtual Machine.

5.1 Part I - Fetch and Check

Do all the following steps on your CentOS Virtual Machine. Read through the whole list before you start typing anything. An example of what to type is given below the descriptions that follow.

Failure to read all the words will lock your account out of the CLS.

  1. Create a directory in the HOME directory of the root account named CST8177-14W/Assignments/assignment08 (use the same directory hierarchy as you already have in your own account on the CLS).
  2. Change to the above assignment08 directory (on CentOS!).
  3. As shown below, use curl to get a copy of the Fetch program from the given URL into a file named do.sh. Make sure you have a file named do.sh in your assignment08 directory. You only need to download this once per assignment.
  4. As shown below, set the USER= variable and use sh to run the do.sh script you just downloaded to CentOS. Run the script as root with the USER environment variable set to your own CLS account userid. (Do not use abcd0001.) Failure to use the USER= variable will cause your account to be locked out of the CLS. Read all the words!
  5. This Fetch program will connect from CentOS to the CLS using your account name. It will copy files from CentOS to your assignment08 directory on the CLS. It will then run the checking program on the CLS to check your work. You will need to answer one question about your IP address, and then wait and type in your CLS password.
  6. If you printed this page on paper, you will not be able to read the whole web URL that you must pass to the curl program.

It will look something like this (use your userid, not abcd0001):

[root@abcd0001 assignment08]# pwd
/root/CST8177-14W/Assignments/assignment08

[root@abcd0001 assignment08]# url=http://teaching.idallen.com/cst8177/14w/notes/data/assignment08do.sh
[root@abcd0001 assignment08]# curl -A mozilla "$url" >do.sh
[... make sure you scroll to read the full web URL above ...]
[... various download statistics print here ...]

[root@abcd0001 assignment08]# fgrep -i 'error' do.sh    # make sure no errors (no output)
[root@abcd0001 assignment08]# head -n1 do.sh            # make sure it's a shell script
#!/bin/sh -u

[root@abcd0001 assignment08]# USER=abcd0001 sh do.sh    # use your *own* userid *not* abcd0001
---------------------------------------------------------------------------
abcd0001: FETCH version 3.  Connecting to CLS as USER='abcd0001' using ssh
---------------------------------------------------------------------------
abcd0001: Use local Algonquin IP cst8177-alg.idallen.ca [y/N/?]? n
abcd0001: Please wait; using ssh to connect to user 'abcd0001' on cst8177.idallen.ca ...
*** COURSE LINUX SERVER ***
abcd0001@cst8177.idallen.ca's password:         # enter your CLS password
---------------------------------------------------------------------------
idallen-ubuntu assignment08fetch_server.sh version 5 run by abcd0001.
Please wait; collecting info from abcd0001 Virtual Machine
---------------------------------------------------------------------------
VM files collected into CST8177-14W/Assignments/assignment08/abcd0001.tar.bz on CLS.
Now running checking program for abcd0001 on CLS:
[... checking program output appears here ...]

If you printed this page on paper, you will not be able to read the whole web URL that you must pass to the curl program, nor will you see the output redirection at the end of the line.

5.1.1 Notes on the Fetch program

  • This Fetch program copies files and information from your CentOS virtual machine into your account under assignment08 on the CLS and then runs the checking program on the CLS. If you only run the checking program on the CLS, it won’t update the files from your CentOS VM and it will just check the existing files saved under assignment08 on the CLS.
  • The checking program is running on the CLS, not on your CentOS VM. At the start, the checking program will issue messages relevant to your account on the CLS (e.g. errors in your CLS .bashrc file or world-writable files on the CLS). These errors are on the CLS, not on your CentOS machine.

5.2 Part II - Check and Submit

When you are done with your assignment, you need to run the checking program one last time on the CLS and submit the output file, as follows:

Do all this on the Course Linux Server:

  1. There is a Checking Program named assignment08check in the Source Directory on the CLS. Create a Symbolic Link to this program named check under your new assignment08 directory on the CLS so that you can easily run the program to check your work and assign your work a mark on the CLS. Note: You can create a symbolic link to this executable program but you do not have permission to read or copy the program file.

  2. Execute the above “check” program on the CLS using its symbolic link. (Review the Search Path notes if you forget how to run a program by pathname from the command line.) This program will check your fetched CentOS work, assign you a mark, and display the output on your screen. (You may want to paginate the long output so you can read all of it.)

    Remember: The checking program does not fetch new files to the CLS from your CentOS VM. You must run the Fetch program on your CentOS VM to update the fetched files on the CLS so that the checking program can mark them on the CLS.

    You may run the “check” program as many times as you wish, to correct mistakes and get the best mark. Some task sections require you to finish the whole section before running the checking program at the end; you may not always be able to run the checking program successfully after every single task step.

  3. When you are done with checking this assignment, and you like what you see on your screen, redirect the output of the Checking Program into the text file assignment08.txt under your assignment08 directory on the CLS. Use the exact name assignment08.txt in your assignment08 directory. Case (upper/lower case letters) matters. Be absolutely accurate, as if your marks depended on it. Do not edit the file.
    • Make sure the file actually contains the output of the checking program!
    • The last text line of the file should begin with: YOUR MARK for
    • Really! MAKE SURE THE FILE HAS YOUR MARKS IN IT!
  4. Transfer the above assignment08.txt file from the CLS to your local computer and verify that the file still contains all the output from the checking program. Do not edit this file! No empty files, please! Edited or damaged files will not be marked. You may want to refer to your File Transfer notes.
    • Make sure the file actually contains the output of the checking program!
    • The last text line of the file should begin with: YOUR MARK for
    • Really! MAKE SURE THE FILE HAS YOUR MARKS IN IT!
  5. Upload the assignment08.txt file under the correct Assignment area on Blackboard (with the exact correct name) before the due date. Upload the file via the assignment08 “Upload Assignment” facility in Blackboard: click on the underlined assignment08 link in Blackboard. Use “Attach File” and “Submit” to upload your plain text file.

    No word-processor documents. Do not send email. Use only “Attach File”. Do not enter any text into the Submission or Comments boxes on Blackboard; I do not read them. Use only the “Attach File” section followed by the Submit button. If you need to comment on any assignment submission, send me email.

    You can upload the file more than once; I only look at the most recent. You must upload the file with the correct name; you cannot correct the name as you upload it to Blackboard.

  6. Verify that Blackboard has received your submission: After using the Submit button, you will see a page titled Review Submission History that will show all your submissions.
    1. Verify that your latest submission has the correct 16-character, lower-case file name beside the Attached Files heading.
    2. The Submission Field and Student Comments headings must be empty. (I do not read them.)
    3. Save a screen capture showing the uploaded file name. If there is an upload missing, you will need this to prove that you uploaded the file. (Blackboard has never lost a file.)

    You will also see the Review Submission History page any time you already have an assignment attempt uploaded and you click on the underlined assignment08 link.

    You cannot delete an assignment attempt, but you can always upload a new version. I only mark the latest version.

  7. Your instructor may also mark files in your directory in your CLS account after the due date. Leave everything there on the CLS. Do not delete any assignment work from the CLS until after the term is over!

READ ALL THE WORDS. OH PLEASE, PLEASE, PLEASE READ ALL THE WORDS!

Author: 
| Todd Kelly and
| Ian! D. Allen  -  idallen@idallen.ca  -  Ottawa, Ontario, Canada
| Home Page: http://idallen.com/   Contact Improv: http://contactimprov.ca/
| College professor (Free/Libre GNU+Linux) at: http://teaching.idallen.com/
| Defend digital freedom:  http://eff.org/  and have fun:  http://fools.ca/

Plain Text - plain text version of this page in Pandoc Markdown format


Campaign for non-browser-specific HTML   Valid XHTML 1.0 Transitional   Valid CSS!   Creative Commons by nc sa 3.0   Hacker Ideals Emblem   Author Ian! D. Allen