Setting Up a Web Page
Copyright © 2004 Herbert J. Bernstein, All Rights Reserved
For many courses you will have been assigned a Linux account in which
you are expected to set up a web page. This may seem difficult, even daunting,
at first. Be patient, and work at applying the following instructions,
and by the end of the semester, you should be as comfortable at placing
things on your web page as you are at sending e-mail. In fact, being
able to place things on your web page will help you to avoid all the problems
the arise when putting attachments on e-mail. This page will get you started.
To learn more about what you can do, see the Internet
Module. You can place anything, documents, pictures, programs, on your
web page, but please be careful not to put anything offensive or improper
there. Anything you put on your web page can be seen throughout the world.
- You need a Linux account. Contact your instructor about three items:
- The name of the computer you will be using (e.g. mcs.dowling.edu or
arcib.dowling.edu). For the examples in this web page we will use
arcib.dowling.edu, but you might have been assigned to a different machine.
- Your user name. For most students this will be up to 7 characters from
your last name followed by your first initial, all converted to lower case.
For example, if your name is "Harry W. O'Blarney", your user name should be
"oblarneh", while if your name is "Nathan Og III", you user name should be
"ogn". There are some exceptions. Some accounts established prior to 2004
have upper case letters, and, if two students have names that result in the
same user name, one of the students will be assigned a modified user name
to avoid a conflict. Your instructor will tell you if your user name is
an exception.
- Your initial password. Your instructor will tell you your initial
password. See the instructions below about changing your password.
- You need a computer connected to the network and a program to use to
connect with an appropriate terminal protocol. The lab computers at Dowling
are connected to the network and provide two alternate programs that can
be used to connect: Putty and SSH32. If you are using another computer,
say at home or in a dorm room, you may need to download Putty or SSH32 for
a windows machine (see
http://www.bernstein-plus-sons.com/.dowling/CSC077/vnc.html). For
a Mac with OS X, the system comes with a copy of ssh.
- You need to connect your computer to the machine that runs Linux (e.g.
arcib.dowling.edu). You do that by starting the program you have chosen,
such as Putty, and answering a few questions. For Putty, you need to tell
it:
- The port number: 22
You select the port number by clicking on the "SSH" radio button.
- The host name: arcib.dowling.edu
or whatever machine you have been assigned
- Click the "Open" button
- You may get a splash screen asking you about entering the "key"
into the "registry". It is usually OK to answer yes the first time
you use Putty, or after a fresh reboot on machine in the Dowling Labs,
but if you get asked this question in later sessions, check with your
instructor.
- A black background screen should appear, asking you to log in. Type
your user name followed by the enter key. You should then be asked for
your password. Type your password followed by the enter key. Do not
use the keypad on the right of the keyboard to enter any part of your
user name or password.
For SSH32, you answer similar questions but you also have to tell it the
encryption protocol (3des) enter the port number as a number (22) and
put your user name on the splash screen. Be warned that you may be asked
about an encryption library to use. Be careful to select crypt32.dll
- The first time you log in, you need to create a directory (a folder)
to hold your web pages. The name for this directory is "public_html" (all
lower case). To create this directory, wait for a command prompt and then
type:
mkdir public_html
followed by the enter key.
- To work with your web pages, you need to "be in" the public_html directory.
If you have just logged in, and you have created the public_html directory
some time in the past, you can go to it by
cd public_html
followed by the enter key.
If you are not sure what maneuvering you have done in terms of directories, you
may need to reposition yourself to your home directory before going to
public_html. You do that with the command "cd" without any arguments, so
cd
cd public_html
followed by the enter key for each line.
-
Once you are in the public_html directory, you can check what files you already
have with the command "ls":
ls
followed by the enter key. If you have any file, their names will be listed.
-
To make a web page, you will need to create the web page and leave it in
public_html. You can create your web pages on other machines and transfer
them to arcib.dowling.edu using a program called scp or pscp. Let us just
create the file directly in public_html. To do that, we need a text editor.
The easiest one to use is called "pico". We need a name for our web page.
We can use any name we wish, but it must end with the "extension" .html (or
.htm). Let us use the name "test.html"
pico test.html
followed by the enter key. Most of your screen will blank, leaving you a
nice clean space in which to type. You may use the arrow keys to reposition
your self, and the "backspace" or "delete" two rows above the enter key
to erase characters. Type in the following lines:
<html>
<head>
<title>This is a Test Page
</title>
</head>
<body>
Hi There !!!
</body>
</html>
When you are done typing, hold down the "ctrl" (control) key and press the "o"
(oh) key. Pico will offer to write out test.html (or whatever file name you
chose). Don't type any characters other then to press the enter key, or
you'll change the name of your file. The hold down the "ctrl" (control) key
and press the "x" (echs) key to leave pico.
- Open a brower, and give it the URL (location):
http://arcib.dowling.edu/~username/test.html
where the username is your user name (not the literal word "username"), and
you should see the page you created.