GOAL: Create your personal Portfolio page.
1. Follow the instructions for accessing meteorology computers to log into your Meteorolgy account. If you are sharing a computer, each student should take turns doing these steps in her/his home space.
2. You need to copy the Portfolio template to your WWW space.
It is stored in my Meteorology 301 directory. To ensure that you are
in your home directory, enter
cd
3.Then copy the template from my directory into your WWW
directory. Enter:
cp /mthome/gutowski/MT301/portfolio-template.html WWW/
4. Switch to your WWW directory:
cd WWW
There should be two files there (if you created a personal Meteorology
web page). To see the files, enter
ls
One of the files in your WWW directory is "index.html". This contains your personal homepage. Another is the template file. The next step is to link the two. Lab 1 finished with an introduction to some basic unix/linux procedures. In particular, it introduced you to file editing and the "emacs" editor. We will use this editor to make changes in your homepage file telling it how to link to your portfolio file.
5. If your personal web page is located somewhere else, follow
these instructions, but apply them to that page rather than the one
used here. Edit the file index.html:
emacs index.html
You will see something that looks approximately like this:
[html] [head] [title] ISU Meteorology home page for [username] [/title] [/head] [body bgcolor="#42426f" text="#ffffff" link="#ffff00" vlink="#93db70" alink="#cc3232"] [h1 align=center] YourName's Meteorology Home Page [/h1] [p] [hr size=3 width=80% noshade] [p] Here is some content that you could customize. Note that even though this is just a boring paragraph, you could use all the powerful features of HTML including using images, fonts, lists etc. [p] This file was copied from a template at:[br] [center][code]/mthome/gutowski/MT301/index.html[/code][/center] [hr size=3 width=80% noshade] [/body] [/html]There is a major difference between what you see here and what you see in the editor: all square braces ([]) here are angle braces (<>) in the editor window. The reason for this difference will be explained later, but for now, remember that anywhere you see [ or ] in these lab instructions, substitute < and >, respectively.
The entities like [head] are called tags and are part of a special document language used to create Web pages called HyperText Markup Language or HTML. These tags give instructions to an interpreter that produces the documents you see in the Web browser.
6. Simple emacs
Now we want to use emacs for making changes in your homepage file.
The small square in the upper left corner that is shaded or tinted
differently from the rest of the file is called the "cursor" and marks
the point where the editor is currently located in the file.
[hr size=3 width=80% noshade]We want to add a line that says "Go to my meteorology student portfolio." with the last words forming a link that will connect the browser to the portfolio page.
Go to my [a href="http://www.meteor.iastate.edu/~LOGNAME/portfolio-template.html"] meteorology student portfolio.[/a]
Save file /home/LOGNAME/WWW/index.html? (y, n, !, ., q, C-r or C-h)
7. Portfolio page
Now that the link to the portfolio page has been established, you
should next start to personalize it.
Completing these steps successfully completes what you need to do for the lab. I will check on your progress using the URL you sent me from Lab 1 and using the link you established between your home page and portfolio page.
{NOTE for 1998 and beyond: Step 8 below is not effective, so you do
not do it. However, subsequent steps do give useful information for
protecting standard, non-Web files on Vincent and other unix
environments, so it's a good idea to read Steps 9 & 10.
You should read Step 11 in any case.}
8. Finally, we will take a series of steps so that only a select number of people can read your portfolio page, thus keeping it somewhat private. I'll give you the commands to enter, then an explanation you can read afterward.
While still in the WWW subdirectory, and remembering that here
LOGNAME = your Vincent login name in lower case, enter
chlist -a gutowski LOGNAME
chmod o-rw portfolios-template.html
chmod g+r-w portfolios-template.html
9.Short explanation:
These three commands ensure that I can
look at your portfolio file, but that the general public can not.
They also ensure that only you can make changes to it.
10.Long explanation:
Every file on a UNIX system has three access categories:
There are three types of access:
You control who is in your group through the "chlist" command. Perhaps the three most common uses of the command are
command effect --------------------------- --------------------------------------- chlist -m LOGNAME Lists LOGNAME's group members chlist -a othername LOGNAME Add "othername" to LOGNAME's group chlist -d othername LOGNAME Delete "othername" from LOGNAME's groupHere, "othername" is someone else's Vincent login name.
Each type of access can be turned on or off using the "chmod" command. Whenever a new file is created, default access types are given to each of the user, group, and other categories. Usually, the defaults are
category access -------- ------------ user read + write group read only other read onlythough defaults can vary with machine and the user can set the defaults.
These examples show how access for each category can be changed:
command effect --------------------------- --------------------------------------- chmod g+w filename give the group write access to filename chmod o-rw filename remove both read and write access for the general public to filename chmod u-x filename remove user's (owner's) execute access to filename chmod g+r-w filename give the group read access, but remove write access
You can check a file's access types for each category using the
"ls -l" command. Entering
ls -l filename
returns this information. For example, I have a file called "test.html".
Entering
ls -l test.html
returns
-rw-r--r-- 1 gutowski 392 Jan 20 15:16 test.htmlThe set of 10 characters "-rw-r--r--" gives the information. The first "-" does not concern us here. The remaining 9 characters are in three sets of 3. Within each set, the three characters tell whether read, write, and execute access are on or off. A "-" means the access is off. The first set refers to user (owner) access, the second set to group access, and the third set to access by others. In this example,
Thus, the commands I gave you in step 8. (1) made me a member of your group, (2) removed read and write access by the general public to your portfolio file, and (3) ensured that your group has read access (but not write access) to your portfolio file.
11. Why the "[" and "]" instead of "<" and ">":
These instructions have been written to appear as a Web page. The
browser interprets any HTML tags it finds and uses them to create the
Web page on your screen. Even the example tags will get interpreted,
so in order to have them appear on the page, they need to be altered
so that they are not formally tags anymore.
Return to Meteorology 301 Lab List
Return to Meteorology 301 Homepage