Larger Text Normal Text Smaller Text

IT 280 Web Development II, Spring 2008

 

Lab/Homework Activity 1, Preliminaries

Read through each exercise competely before doing it.

Purpose

The purpose of these exercises is to show me you can use Blackboard, the CS Forums, and your wyrd.hood.edu account.

Background

If you do not have your network account yet, have forgotten your password, or need help setting up your email, you must contact End User Computing (EUC). Members of the Information Technology department (including EUC) should be available to help you at the Information Desk in the Whitaker Campus Center during the first week of class. You can also visit the EUC office in AD (Alumnae Hall) 401 Monday through Friday, 8:30 a.m. - 5 p.m., or call EUC at (301) 696 - 3622. You will need a valid student ID to obtain password information.

There is additional information about Hood email on the IT web pages.

You can access your Hood email account through the Web at https://hermes.hood.edu.

Activity: Blackboard and CS Forums

There are links to these at the bottom of most class pages.

Send me email

Register for forums

Computer Systems

Computer systems must carry out many tasks, such as receiving input from a keyboard or from one or more remote terminals or networked workstations, sending output back to them, running programs for multiple users or multiple programs for one user, printing documents, storing and retrieving information on a mass storage device. All of these activities need to be coordinated to make effective use of the conputer's resources, such as memory and CPU time. The software that handles this coordination is called an Operating System. Without an operating system, a computer is nearly useless. The early ENIAC, for example, required that programs be set up by rewiring the interconnections between its components.

Software

Software, computer programs, can be divided into two very broad categories: System Software, the software that makes it possible to use the system; and Application Software, the programs that carry out specific tasks for users. Application programs may be different from system to system and user to user. The distinction between applications and system program is not rigid. A computer without an operating system is essentially an expensive paperweight.

Operating Systems

The operating system consists of

Using a Command Line Interface

You have been given a user account on wyrd.hood.edu for this course. If you already had an account, it has been continued for this term. Wyrd is a PC running the Linux operating system and the Apache web server.

The Command Interpreter or Shell for an operating system lets the user command the system to perform various tasks such as log on and off the system, manage files and run utilities and application programs.

There is a summary of basic UNIX commands at http://wyrd.hood.edu/tutor/unix/unix.htm. We will talk about more of them later.

You can connect to wyrd by using

Secure clients are installed in the lab. If you are connecting from off-campus, you must use a secure connection.

Warning - UNIX COMMANDS ARE CASE SENSITIVE. This means that, for example, the command "ls" cannot be typed as
"Ls" or "lS" or "LS" , and the file name "UNIX.html" is different from unix.html and Unix.html.

Activity: Connect to wyrd.hood.edu and log in.

To start a remote session from the lab machines, launch the Secure Shell Terminal Client application from the StartMenu.

After a brief delay, you should be prompted for your password. Warning: remember that passwords are case sensitive.

Once your password is accepted, you will see a welcome message and a command prompt. The prompt shows your identification followed by a $.

    
      Logging on indicates acceptance of the acceptable use
      policies posted at http://wyrd.hood.edu/.  If you do not accept these
      policies, log off immediately.
      
      [echang@wyrd echang]$
     

Logging out

To log out when you are finished a session, enter the command exit or logout at the $.

Be sure to log out of both your Linux session on wyrd and your Pergola session on the lab PC before you leave the lab. Otherwise the next person who sits at your station has full access to your files.

Files and Directories

  1. Files are stored in directories organized into a directory tree
    • The symbol/ indicates the root, or highest level, directory - the starting point for the system.



Activity: Use some file commands

  1. List your files
    • Enter the command  ls  (ell ess). You will see the files in your home directory. You should see at least Desktop and public_html, which are directories that can contain other files.
    •       [student@wyrd student]$ ls 
            Desktop   public_html
       
      
    • Enter the command  ls -l  (ell ess space dash ell). The -l is called an option or switch. Most options are identified by a single alphabetic letter. This "long" option provides additonal information about the files.
    • Now enter the command  ls -al.  The option "all" lists all files. Notice that you can use multiple options after the dash by typing the letters next to each other.
    • That files beginning with a period are "hidden"; they are not shown unless you use the -a (all) option. They are normally created for system recordkeeping and account configuration. Be on the alert for new and "unusual" hidden files appearing in your directories.
    • The files . and .. are special references to the current directory and the parent directory respectively.
  2. Find out your working directory.
    • When working on wyrd, your commands refer to your current working directory. When you begin, it is your home directory. The name of your current directory is shown just before the command prompt. To see the full "path" to your current directory, use the command pwd (print working directory.) Right now it is probably /home/your_username.
  3. Navigating directories: Changing to a new working directory.
    1. The command for changing to a new working directory is cd
    2. Change to the public_html directory by entering cd public_html. This is where you will put your web page files.
    3. Check your current working directory with pwd. What is it now?
    4. List the files in the current directory files now. If you have a new account for this class, all you will see are the . and .. directories.
    5. Change back to your home directory by entering cd ..
  4. Listing a different directory
    To get a listing of a directory other than your current working directory, you must specify a path to it. This can be either an absolute path (one that begins at the root directory) or a relative path (one that begins at your current working directory.)
    • Your current working directory should be your home directory. (Check using pwd and change to it if necessary.
    • List the files in the Desktop directory without changing your working directory by entering the command ls Desktop.
    • Change to your public_html directory again.
    • List the files in the Desktop directory again. This time you must use the command ls ../Desktop, specifying the path from the public_html directory to the Desktop directory.
    • List the files in your home directory without changing your working directory. There are many ways you can do this, including
      • Using the absolute path. The command is ls /home/your_username
      • Using the relative path ls ..
      • Using a shortcut symbol for your home directory, the ~ character. The command is ls ~. You can use the ~ whenever you need to represent your home directory, for example as in cd ~
  5. Making a new directory
    You can create new subdirectories within existing ones using the mkdir command. The new directory will be created in your current working directory unless you specify a different path.
    • Your initial working directory should be your home directory. (Check using pwd and change to it if necessary.
    • Enter the command  mkdir IT280 . (Capital 'I' and 'T', no spaces.)
    • List files to see that the new directory has been created.

File Permissions

Unix is a multi-user operating system. You share wyrd with the other students in your class, and students from many other classes. The system uses file permissions to control who can and cannot access your files in different ways.

  1. Access is controlled at three levels: Owner (you), Group (users with whom you share a group) , Other (the rest of the world). Each level may be granted or denied permission to Read, Write, or Execute the file. File permissions are shown in long directory listings.
  2. file permissions
  3. List the files in your home directory. Who is allowed to read the public_html directory you created? Who is allowed to write to it?
  4. Try to list the directory /home/echang (ls /home/echang ). What happens? (The line in the home directory listing is
            drwx--x--x  11 echang   echang       2048  Feb  7 16:29 echang
    

Activity: Set up your Web directory

The public_html directory in your home directory is where you must store files to publish them on the Web. The Web server on wyrd can retrieve files that are in that directory, including those in subdirectories within it. If a file is not within that directory - for example one in that Desktop directory - it will be available to the Web server.

First, look at your web site. Open the browser and enter the URL

       wyrd.hood.edu/~your_username

If your account is a new one, you will see a directory listing headed "Index of..." similar to the picture below.

However, your listing should show the IT280 directory you made earlier. (If you have used an account for IT 180, you will see the pages you published for that class. You will not see the IT280 directory listed because it is hidden by your index.html page, but it is there.)

The web server's listing also shows the ~ symbol, but in this case it means your Web home - your public_html directory.

s

You will put your web work for this course in the IT280 directory.

Change your working directory (cd) to the IT280 directory.

Show the IT280 drectory in the browser by clicking its name. If you can't see the name, browse to

       wyrd.hood.edu/~your_username/IT280

Use a text editor

You can create files on wyrd by using a text editor. The simplest one is named Pico. To use it, enter the command pico name_you_want_for_the_file.

For this exercise,

  1. Be sure your working directory is your IT280 directory.
  2. Be sure the browser is showing the IT280 directory listing.
  3. enter pico sillypage. You will see a blank editing screen.
  4. Type the following infornation in the document
    • your full name,
    • what you wish to be called in class (for example, your name is "Samantha", but you prefer to be called "Sam" or "Bootsie"),
    • your class year (Freshman, Sophomore, etc.),
    • what major or majors you are currently considering,
    • what minor or minors you are currently considering,
    • who your faculty academic advisor is
    • your background in web development (courses, experience).
    • why you chose to enroll in IT 280.
    • anything else you would like to tell me.
  5. You do not need to make this an HTML document. Just type plain text and use line breaks as necessary.
  6. Press Ctrl-X (shown as ^X at the bottom of the editing screen.) and press Y when asked if you want to save the changes.
  7. List files to see that the file has been created.
  8. look at the browser. Does it show the new file.

The browser has no way of knowing that you made changes over on wyrd. It simply fetches a document and displays that document until you tell it to get another one.

  1. Refresh the browser
  2. Notice that the display has now been updated to show the new file.
  3. Click on the new file to see your message.

Deliverables

Your deliverables for this assignment are 1) the email message. 2) the CS Forums registration and message, and 3) the published text document "sillypage" in the correct directory.

Information: Changing your password:

You can change your wyrd password. You do not need to do it during class time. Read through the following instructions first.

  1. Choose an acceptable password BEFORE beginning the password changing process.
  2. At the command prompt $, enter the command passwd and follow the prompts.
  3. You will first be asked to enter your current password. This is a security precaution.
  4. Then you wil be asked to enter your new password and to re-enter it. If you choose an unsafe password, it will be rejected, and you must choose another.
  5. DO NOT tell anyone your password. Not your classmate, not your spouse/child/mother/significant other, not me or anyone else.
  6. If someone sends you an e-mail claiming to be the system administrator (root or Atsuko Crum or me or another faculty member) asking you to tell them your password or telling you to change it to some specific word, do not do it. We will never ask for your password. If this happens, send root@wyrd.hood.edu an email about it immediately.
Comments to: chang@hood.edu
Last Modified: 14 January 2008. 20:27
Valid CSS! Valid XHTML 1.0!

 

Hood College Department of Computer Science: Course materials © 1997-2006 by Elizabeth Chang.