% CST8207 Assignment 07 - Install and Configure CentOS and VMware Tools % Ian! D. Allen - - [www.idallen.com] % Fall 2013 - September to December 2013 - Updated Mon Mar 10 05:45:35 EDT 2014 Due Date and Deliverables ========================= - **Due Date**: `23h59 (11:59pm) Friday November 29, 2013 (end of Week 13)` - This assignment is a pre-requisite before doing [Assignment #12 HTML]. - Late assignments or wrong file names may not be marked. Be accurate. - **Available online**: - Version 1 – October 16, 2013 (Week 7) - Version 2 – November 15, 2013 (Week 11) - **Prerequisites**: - All [Class Notes] since the beginning of term. - All your previous [Assignments]. - an ability to **READ ALL THE WORDS** to work effectively - **Deliverables**: 1. One text file uploaded to Blackboard according to the steps in the [Checking Program] section below. 2. Directory structure and files created and left for marking on the [Course Linux Server] (**CLS**). - **Do not delete any assignment work from the CLS until after the term is over!** 3. CentOS installed in a virtual machine via [CentoS Virtual Machine] - **Do not delete any assignment work from your [CentOS Virtual Machine][CentoS Virtual Machine] until after the term is over!** 4. [CentoS VMware Tools] installed (and hopefully working). **WARNING:** Some inattentive students upload Assignment #07 into the Assignment #06 upload area. Don’t make that mistake! Be exact. 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. Create Assignment 07 directory structure on the CLS. 2. Install and configure your [CentOS Virtual Machine][CentoS Virtual Machine] 3. Install and configure your [CentOS VMware Tools][CentoS VMware Tools] 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. > 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]. When you are finished the tasks, leave the files and directories in place 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; you must have your term work available right until term end. The Source Directory -------------------- All references to the “Source Directory” below are to the CLS directory `~idallen/cst8207/13f/assignment07/` 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). Tasks ===== - Do the following tasks in order, from top to bottom. - Pay attention as to which tasks must be done in your own [CentOS Virtual Machine][CentoS Virtual Machine] and which must be done in your account on the [Course Linux Server]. - **READ ALL THE WORDS!** and do not skip steps. Set Up on the CLS ----------------- 1. Create the following directory structure in your CLS HOME directory and record (for study purposes) the series of Unix commands you used to create it. Spelling and capitalization must be exactly as shown: CST8207-13F `-- Assignments `-- assignment07 **This directory is the base directory for most CLS pathnames in this assignment. Store your CLS files and answers here.** Part A – CentOS Installation and Configuration ---------------------------------------------- 1. Complete your [CentOS Virtual Machine][CentoS Virtual Machine] Installation. - Run the **Fetch** and [Checking Program] to check your work. 2. Complete your [CentOS VMware Tools][CentoS VMware Tools] Installation. - Run the **Fetch** and [Checking Program] to check your work. 3. Check your work using the [Checking Program] and submit. When you are done ----------------- That is all the tasks you need to do. Check your work a final time using the [Checking Program] and save the output as described below. Submit your mark following the directions below. 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. The checking program resides on the [Course Linux Server], but your work is on your [CentOS Virtual Machine][CentoS Virtual Machine]. There is a new **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][CentoS Virtual Machine]. Part I - Fetch and Check ------------------------ Do all the following steps on your [CentOS Virtual Machine][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. 1. Log in to CentOS using your `root` account. 2. Create a directory in the `root` account HOME named `CST8207-13F/Assignments/assignment07` (exactly the same directory hierarchy as you already have on the CLS). 3. Change to the above `assignment07` directory. 4. 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 `assignment07` directory. You only need to download this once per assignment. 5. As shown below, use `sh` to run the `do.sh` script you just downloaded to CentOS with the `USER` environment variable set to your own Blackboard/CLS account userid (do not use *abcd0001*). 6. This **Fetch** program will connect from CentOS to the CLS using your account name. It will copy files from CentOS to your `assignment07` 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. It will look something like this (use your userid, not *abcd0001*): CentOS# whoami root CentOS# hostname abcd0001 CentOS$ pwd /root/CST8207-13F/Assignments/assignment07 CentOS# curl -A mozilla http://teaching.idallen.com/cst8207/13f/notes/data/assignment07do.sh >do.sh [... various download statistics print here ...] CentOS# USER=abcd0001 sh do.sh --------------------------------------------------------------------------- abcd0001: FETCH version 2. Connecting to CLS as USER='abcd0001' using ssh --------------------------------------------------------------------------- abcd0001: Use local Algonquin IP cst8207-alg.idallen.ca [y/N]? n abcd0001: Please wait; using ssh to connect to user 'abcd0001' on cst8207.idallen.ca ... *** COURSE LINUX SERVER *** abcd0001@cst8207.idallen.ca's password: # enter your CLS password --------------------------------------------------------------------------- idallen-ubuntu assignment07fetch_server.sh version 4 run by abcd0001. Please wait; collecting info from abcd0001 Virtual Machine --------------------------------------------------------------------------- VM files collected into CST8207-13F/Assignments/assignment07/abcd0001.tar.bz on CLS. Now running checking program for abcd0001 on CLS: [... checking program output appears here ...] ### Notes on the Fetch program - This **Fetch** program updates your saved files 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 `assignment07` 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. 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 `assignment07check` in the [Source Directory] on the CLS. Create a [Symbolic Link] to this program named `check` under your new `assignment07` 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 tasks 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 `assignment07.txt` under your `assignment07` directory on the CLS. Use the *exact* name `assignment07.txt` in your `assignment07` 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! 4. Transfer the above `assignment07.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. 5. Submit the `assignment07.txt` file under the correct Assignment area on Blackboard (with the exact name) before the due date. Upload the file via the **assignment07** “Upload Assignment” facility in Blackboard: click on the underlined **assignment07** 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 want to send me comments about your assignment, use email.) 6. Your instructor may also mark the `assignment07` 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!** Use the *exact* file name given above. Upload only one single file of plain text, not HTML, not MSWord. No fonts, no word-processing. Plain text only. Did I mention that the format is plain text (suitable for VIM/Nano/Pico/Gedit or Notepad)? **NO EMAIL, WORD PROCESSOR, PDF, RTF, or HTML DOCUMENTS ACCEPTED.** No marks are awarded for submitting under the wrong assignment number or for using the wrong file name. Use the exact name given above. WARNING: Some inattentive students don’t read all these words. Don’t make that mistake! Be exact. **READ ALL THE WORDS. OH PLEASE, PLEASE, PLEASE READ ALL THE WORDS!** -- | 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 [www.idallen.com]: http://www.idallen.com/ [Class Notes]: indexcgi.cgi#XImportant_Notes__alphabetical_order_ [Assignments]: indexcgi.cgi#XAssignments [Checking Program]: #checking-marking-and-submitting-your-work [Course Linux Server]: 070_course_linux_server.html [CentoS Virtual Machine]: 000_centos_install.html [CentoS VMware Tools]: 000_centos_vmware_tools.html [Source Directory]: #the-source-directory [Symbolic Link]: 460_symbolic_links.html [Search Path]: 400_search_path.html [File Transfer]: 015_file_transfer.html [Plain Text]: assignment07.txt [Pandoc Markdown]: http://johnmacfarlane.net/pandoc/