System Administration for the Web - Day 2 notes

Notes:

Administrivia:

  • Class location changed to Pepperwood, MLK
  • I set up a class discussion forum.
  • I asked everyone to write their email address for the course mailing list.

    Course Notes:

  • Linux Distributions and FreeBSD and Solaris and...
      Main difference between linux distros - ease of installation, ease of maintenance.
      Here is a good article on the 'benefits' of the FreeBSD ports system, and the differences from linux (the article fails to mention that the ports system has the same problems with hand-installed software that the red-hat rpm or debian apt package management systems have.
  • Homework check in (install, commands), questions..
      Installation brought up three questions:
      1. What's the deal with partitioning?
        For small installations of linux, where not many users are expected, partitioning is not a big deal. You do need a swap partition, that's where the OS stores virtual memory, and it should be about twice the size of physical memory (although others claim you only need between 50 and 100 megs). Linux requires between 600 megs and 1.6 gigs, and if you're expecting unruly users, you may want to create a separate partition for homedirectories. If you're working with a truely old BIOS, and you have a modern harddrive, you may need to create a separate boot partition because the BIOS only looks for boot information (how to start the OS) in the first 1024 cylinders of the disk. This is probably more trouble than it's worth, and you'll run into more maintenance headaches trying to keep such an old computer alive.
      2. What is a gateway? netmask? ip address? dhcp?
        Short answers: your IP address is your unique address on the network, your gateway is the computer you send information to for it to be passed along to the rest of the internet, and netmask is how you tell your computer which other computers are on your local network. DHCP is a protocol that manages this information in a dynamic way, allowing network connections to be informal, and allowing you to connect to a network without explicitly knowing an appropriate IP, netmask and gateway.
      3. How can I install Xwindows? Where's the mouse?
        I've put a mouse out on that box, feel free to install xwindows, I'll go over this briefly next time. You can configure it to work with dhcp, and connect it to one of the green cat5 cables coming out of the hub on the microwave, to test it (that hub in attached to a dhcp server and is intended for people to come in and use their laptops).
  • vi, vim (text editors)
      useful beginning commands:
        movement: h,j,k,l (left,down,up,right respectively)
        switching between modes:
          a,i (append or insert when in command mode)
          ESC (escape key, go back to command mode from text input mode)
        deleting text in command mode
          delete a single character: x
          delete a line: dd
        exiting vi
        :q, :q!, :wq (quit, quit-without-saving, save and quit -- from command mode)
    • Next time, configuring your computer to be a router, so you can run an internal network in your home and all your roommates can share one dsl or cable modem line (or modem)!

      Homework for next week:

    • Go thru the VI Tutor and/or the VIM Tutor -- save your own copy in a unix account and "vi vi-tutor.txt". if you're logged into a terminal via ssh, you can type,
      lynx -dump http://www.ocf.berkeley.edu/sysadmin-class/2002-spring/vi-tutor.txt > vi-tutor.txt
      
        Why learn vi? Because vi comes installed on all modern versions of Unix, while emacs and other popular editors do not. You can use emacs after you install it, but you may find that you need to edit some files to do some configuration before you can install new software. Also because I'll quiz you on it next week.

        If you're already skilled labor with vi, and you want to learn something more esoteric, learn how to use "ed", the line (rather than screen) text editor. Knowing how to use ed is actually useful. Not only can you lord it over other, less clued sysadmins, but ed's command language is also used in sed, awk, and vi.

        If that's not enough, learn emacs.


  • c.2002, Devin Jones - jones@csua.berkeley.edu
    last modified: