System Administration for the Web

Instructor: Randy Chung and Matthew Fong
Time: Mondays 3-4, 5-6, Thursdays 11-12
Location: 275 Soda (61b lab)
Units: 2

Enrolling

There are three sections for this course. If one section is full when you show up, you might want to try coming to the other ones.
Section 1: M 3-4
Section 2: M 5-6
Section 3: Th 11-12

CCN's:
Mon 3-4 98: 26442 / 198: 27367
Mon 5-6 98: 27373 / 198: 27370
Th 11-12 98: 27379 / 198L 27376

Commands Quiz

Announcements

5/8/2005 - No class this week. If your group is having problems, please contact us via email for help.

4/25/05 - If you aren't in a group, e-mail us NOW. If you're having trouble with the packages you've been assigned, give up and install one or both of the following (depending on how many you still need): a statistics/log analyzer/counter package for your apache installation or install a news/rss aggregator. If you need help, e-mail us or find us in class. You MUST finish by next week (week of the 9th).

4/18/05 - All group projects are due on the week of the 25th! The week of the 2nd will be for testing and the 9th will be the last class.

3/31/05 - Due to a brilliant mistake on my part, the old class webpage was killed. This is a backed up copy. Incidentally, homework 6 is up.

3/5/05 - Homework 4 is up! This i a group homework, so get together with your group now! Contact us if you need your group info. Incidentally, the homework is extneded until Friday, 3/11.

2/17/05 - Sorry for the late notice, but there will be no class for today's section (Th 11-12) because I'm feeling a bit under the weather. Hopefully if you've shown up to class without me you've left on your own already after realizing it's a bit late and I haven't shown up. Again, I apologize to everyone in the section for the late notice (but we never plan these things do we).

If you are having problems with enrollment, download the add/drop form at "http://registrar.berkeley.edu/GeneralInfo/elecforms.html" and bring it to class for a signature. This week is the last week to add!

Homeworks

Homework 6 - Due 4/8, Friday Homework 4 - Due 3/11, Friday (Group)

Submission Guidelines

Please read this page for instructions on how to register for the class and submit homework. If you've been having problems with submitting homeworks, this is the page to read!

SSH Instructions here.

Course Requirements

Grading:

Homework 20%
Project 40%
Other 40%
(attendance, participation, other assignments, etc)

There are no technical requirements for this course. However, you should be ready to learn a fair amount of computer concepts. The content of the course is geared towards non-CS majors, and enrollment tends to be about 50% humanities majors, 50% CS majors. Technically detailed concepts are occasionally touched on, even if for nothing more than the sake of breaking the usual pace of things, but in those cases students will not be held responsible for having a firm grasp of the concepts (e.g. stack exploitation, threads versus processes, etc.)

If you're not technically proficient, please be prepared to learn a lot. The intention is not to overwhelm all of you with a huge amount of work (homeworks are actually made to be done within the span of an hour's time), but instead to push you hard and let you grow into it. Think of it as being akin to weight-training; it's going to hurt, but it's not going to be more than you can do. If you run into some problems, your course coordinators are here to spot you.

Course Outline


topics:
shells & scripting
filesystems & layout
editors
system tools
networking
apache

suggestions:
DNS servers
tomcat




Week 1:

What this class is.
What this class is not.

Linux Distributions:
- red hat/fedora/mandrake
- debian/gentoo/ubuntu
- knoppix (live distributions)
- lfs (linux from scratch)

Assignment 1:

- get an OCF account
+ www.ocf.berkeley.edu
+ in MLK Student Union, Heller Lounge

- self introduction (do it here!)
+ name
+ photo
+ description
+ class
+ major
+ intrests

- learn an editor
+ vi/vim
+ emacs
+ pico
+ nano
+ sed




Week 2:
Unix commands to know:
man <command> = help page
ls = list directory
ls -l = list in long format
ls -la = list all in long format
cd <directory> = change directory
cd = change to home directory
. = current directory
.. = directory one level down
mkdir = make directory
rmdir = remove directory
pwd = print working directory
chmod <type> <file> = change file permissions
chown <owner> <file> = change file owner
chgrp <group> <file> = change file group
touch <filename> = create a file
cp <original> <destination> = copy
rm <file> = remove file
alias <name> <command> = give short name to long command
unalias <name> = take away alias
ln -s <original> <shortcut> = create shortcut to a file

text editors (learn them! you'll need it!)

Assignment 2:
click here
HW Submission Instructions



Week 3:
Networking:

**********************************************************************

ssh = remote connection to server
ssh: solar.cs.berkeley.edu
ssh into po to change password

**********************************************************************

OSI 7-layer model
---
|7| applications
|6| applications
|5| applications
|4| applications
|3| IP address (router)
|2| MAC (switch)
|1| Physical (hub)
---

1 = wiring
2 = Media Access Control address
      - hardwired into hardware
3 = software
      - DHCP - dynamic host configuration protocol
            - step 1. DHCP discover (computer requests address)
            - step 2. DHCP offer (server offers address)
            - step 3. DHCP request (computer accepts address)
            - step 4. DHCP acknowledgment (server confirms address)


Process:
boot the pc --> get an IP address --> start the server --> start serving

**********************************************************************

DNS/IP:

DNS = Domain Name Service
      - tree structure
            - 7 root servers
            - 2nd tier DNS servers
            - 3rd tier 
            - ...
            - your ISP
      - DNS entries cached at every level
      - how it works
            - give it a web address
            - look up ip address in DNS database
            - it gives you an address to connect to


IP(v4) = Internet Protocol
      - 255.255.255.255
      - different blocks of IP addresses in different areas of the world
      - every device on the internet has a different IP
      - used as phone book for every computer

**********************************************************************

webserver   <--->  internet  <--->  router <---> pc

"nslookup www.google.com"
nslookup = looks up ip address
www.google.com = website

"telnet www.google.com 80"
telnet = text based networking app
www.berkeley.edu = website
80 = standard web port

"GET / HTTP/1.1"
get = transfer command
/ = directory
http/1.1 = protocol

==> downloads index.html from www.google.com

**********************************************************************

dorm networks:
      big switch --> dhcp server
       |      |
       v      v
  computer   computer

throw in another dhcp server & all hell breaks loose

**********************************************************************

home webservers
      - running from behind a router
            - go to 192.168.0.1
            - port forwarding
            - TCP port 80, forward --> My PC (ip address)
            - ipconfig (windows) or ifconfig (linux) to get ip address
            - bind mac address of computer to static ip address
      - using a dynamic ip address
Assignment 3: click here



Lecture 4:

Clarifications:

OCF                 vs     class accounts

login = name        vs     login = cs198-xx

ocf.berkeley.edu    vs     solar.cs.berkeley.edu

run web server      vs     submit hw ("submit")

- bring add/drop form if you're not enrolled
- get an OCF account by next week
- fill out the course survey or you'll be dropped

****************************************************************

Dynamic DNS
www.dyndns.com

- lets you use a dynamic ip address to run a web server
- ip's go to the dyndns sever which forwards to your home ip

1.  Install a server
2.  Start a sever
3.  Set up up port forwarding
4.  Set up DDNS
      a. go to www.dyndns.com
      b. make an account
      c. register a dynamic DNS
      d. set up a DDNS client on your web server


****************************************************************

Apache:

- web server software
      - most popular web server package on the internet
- open source & modular
- next week: download it & install on OCF