Using the Web Publishing Services at WSHS

Download Report

Transcript Using the Web Publishing Services at WSHS

Using the Web Publishing Services
at WSHS
February 24, 1997
Phil Wherry ([email protected])
Walt Sanford ([email protected])
About the Server
• WSHS has participated in the Tri-School Network
for several years; this network provides Internet
access to users at the three schools.
• As part of Camp T-Equity ‘95 development, a PC on
the WSHS network was set up to run Linux, a free
Unix-compatible operating system.
– Email service for camp participants
– Web site for camp activities
• Site’s role has expanded considerably
– Domain name service (DNS) for school
– Email forwarding agent
– School-wide Web service, proxy service
Why Unix?
• Unix has a well-deserved reputation for being hardto-use.
– Cryptic commands, error messages.
– Difficult to configure and administer.
• Despite these limitations, Unix is an excellent
choice for server construction.
– Multi-user design: many people can use the system
simultaneously.
– Reliability: server has been down for only a few hours in
the last several years (due to a hardware failure).
– Security: Web publishing privileges can be controlled;
sophisticated auditing tools help detect misuse.
– Flexibility: automation of routine/tedious tasks.
Getting Started:
Applying for an Account
• Use a telnet client application to connect to the
server, tequity.wshs.fcps.k12.va.us
• You can also connect by IP address: 151.188.16.1
• At the login prompt,
enter:
apply
Getting Started:
Applying for an Account
• Once connected to the application process,
answer each question as it is presented.
Getting Started:
Applying for an Account
• When choosing your account name, do not use the
same account name that you use on the Tri-School
network unless you want to receive your email on
the Unix server instead!
This is because
incoming email is
handled by the Unix
server first, then sent
to TSN if the user
is unknown on the
Unix server.
Getting Started:
Applying for an Account
• Passwords are issued to the account applicant
only. Identifiable users are the cornerstone of
accountability!
• There is never a reason to share passwords. We
can issue another account or force-change a
password if necessary.
• Please emphasize
(particularly to student
account holders) our
complete humorlessness
on this issue!
Getting Started:
Applying for an Account
• Set your password. Usual rules apply: no names,
dictionary words, or easily-guessed information.
• We can reset your password if you lose it, but we
have no way to retrieve it for you.
Getting Started:
Applying for an Account
• You must agree to a common-sense set of usage
rules as part of the account application process.
• Student applicants must visit Walt Sanford in
person before the
account will be activated.
(Student applications ask
a slightly different set of
questions than those
pictured here)
Logging In
• Once your account has been approved (a manual
process), you can log in with your user name and
password.
• System prompt:
tequity>
Getting Around
• Unix commands are a bit like MS-DOS commands.
File names and commands are case-sensitive; in
general, use lower-case letters.
• Tree-structured directory
(home)
~pwherry --also /home/pwherry
~pwherry/Mail
Mail
~pwherry/demo1
demo1
subdirectory
demo2
public_html
~pwherry/demo1/subdirectory
~pwherry/demo2
~pwherry/public_html
Getting Around
• Directory navigation
pwd
“print working directory” - where
am I right now?
cd
Change to home directory
cd ..
Change to parent directory
cd directory
Move down to directory.
More Directory Manipulation
• What’s in a directory?
ls
list files in a directory
ls -l
long-format listing
• Create a directory
mkdir directory
Creates directory
• Destroy an empty directory
rmdir directory
Removes directory
Working With Files
• Creating and editing files: use the pico editor. This
editor is the same one used by the pine email
system.
pico filename
You may also use
pico -w filename
to prevent word-wrapping.
Working With Files
• Other file manipulation commands:
rm filename
mv file1 file2
cp file1 file2
deletes a file
moves/renames file1 to file2
copies file1 to file2
Filename wildcards: use the * character.
rm *.gif
rm *
removes all .gif files
removes all files-be careful!
(Use -i for confirmation prompts on any of these
commands: rm -i *.html)
Your public_html Directory
and the Web
(home)
~pwherry --also /home/pwherry
~pwherry/Mail
Mail
~pwherry/demo1
demo1
subdirectory
demo2
public_html
~pwherry/demo1/subdirectory
~pwherry/demo2
~pwherry/public_html
• Your “public_html” directory is automatically
accessible via the Web. Its URL is:
http://www.wshs.fcps.k12.va.us/~your-user-name
Example: http://www.wshs.fcps.k12.va.us/~pwherry/
Your public_html Directory
and the Web
(home)
~pwherry --also /home/pwherry
~pwherry/Mail
Mail
~pwherry/demo1
demo1
subdirectory
~pwherry/demo1/subdirectory
~pwherry/demo2
demo2
public_html
public_html
~pwherry/public_html
~pwherry/public_html/stuff
• Subdirectories of your public_html directory are
accessible by name. In this example, the URL
would be:
http://www.wshs.fcps.k12.va.us/~pwherry/stuff/
Your public_html Directory
and the Web
(home)
~pwherry --also /home/pwherry
~pwherry/Mail
Mail
~pwherry/demo1
demo1
subdirectory
~pwherry/demo1/subdirectory
~pwherry/demo2
demo2
public_html
public_html
~pwherry/public_html
~pwherry/public_html/stuff
• Subdirectories outside of your public_html
directory tree are inaccessible for security
reasons.
URLs and File Names
• Default file name for a directory (if not specified in
URL) is “index.html”
• If no index.html file exists, a directory listing is
shown. (This is considered bad form!)
• Some Examples…
URL
http://www.wshs.fcps.k12.va.us/~pwherry/
http://www.wshs.fcps.k12.va.us/~pwherry/info.html
http://www.wshs.fcps.k12.va.us/~pwherry/stuff/
http://www.wshs.fcps.k12.va.us/~pwherry/stuff/abc.html
Refers to
~pwherry/public_html/index.html
~pwherry/public_html/info.html
~pwherry/public_html/stuff/index.html
~pwherry/public_html/stuff/abc.html
Getting Files to the Server
• Your favorite FTP client can be used
– Example (on the Mac): Fetch
– Example (on the PC): WS_FTP
• Netscape 3.0 can be used to upload and download
files!
– Use the URL:
ftp://[email protected]/home/username/public_html/
Example:
ftp://[email protected]/home/psw/public_html/
Netscape as an FTP Client
• To send a file…
select “Upload File” from the File menu.
You’ll be prompted
for the file name...
Netscape as an FTP Client
• To download a file…
Hold down the SHIFT key while you click the file
name. You will be prompted for a file name on your
own machine.
• Common problem: the
image file/HTML file you
select is displayed rather
than downloaded. This
means that you didn’t hold
down SHIFT while clicking
the file. Click “Back” and
try again.
Netscape as an FTP Client
• Click on directory names to navigate down in your
file tree.
• Click on the words “Up to higher level directory” to
move back.
• You cannot create or remove directories from the
Netscape FTP client; use another client or log in
interactively and use the mkdir and rmdir
commands to make and remove directories.
FTP By Hand
• From some machines (usually a Unix or DOS
system) it may be necessary to use command-line
FTP. Here’s how to upload “index.html” to your
public_html directory…
C:\>
(log
ftp>
ftp>
ftp>
ftp>
ftp www.wshs.fcps.k12.va.us
in with your username and password at the prompts)
cd public_html
binary
put index.html
quit
• Use the “get” command in place of “put” in order
to download from the Web server to your machine.
Some Useful On-Line Tools
• In order to use these tools, you must be logged in
to the server using telnet (or from the console).
Files can be uploaded using any method you
choose.
• Process image sizes automatically (saves time
during download):
– Command: wwwimagesize filename
Example: wwwimagesize index.html
– You can do this to a whole directory at once…
wwwimagesize *.html
Some Useful On-Line Tools
• Generate thumbnail images and an index page
from a directory full of .jpg (JPEG) files. Useful for
digital camera images.
– Within the directory, enter the command:
photoweb
– Conversion process is automatic.
– If index.html already exists, conversion will not run (so as
to avoid overwriting valuable data).
– If you’re running it more than once, use
rm *-small.jpg to remove the thumbnail images.
Some Useful On-Line Tools
• Resize a GIF file.
– Within the directory, enter the command:
gifresize input-file scale-factor output-file
Example: generate a new image at 40% of original size
gifresize test.gif 0.40 test-small.gif
– Wildcards (*) cannot be used by this command.
– A corresponding tool exists for JPEG files. For example,
jpgresize test.jpg 0.65 test-small.jpg
creates a new image at 65% of original size.
How Do I Get More Help On...
• HTML?
– Many good reference/tutorial books are available. Laura
Lemay’s “Teach Yourself Web Publishing with HTML”
book is generally well-regarded.
– Find a page which does what you want, then use “View
Source” to figure out how it does it.
• Server Policy Questions
– Email Walt Sanford:
[email protected]
• Server Operations and Software
– Email Walt Sanford or Phil Wherry:
[email protected]
[email protected]