Linux Systems Administrator
To be a Systems Administrator one has to be able to work on just about
anything that plugs into just about anything. Over time you will learn how to do
all that and, if you're really lucky, you may even get it right some of the time. Most of
the skills you'll need you'll acquire in a rush of panic and fear, but at
least you won't soon forget the experience.
The basic knowledge you'll need are those that look good on your resume:
You'll also acquire some other, less technical skills:
The other consideration is that I prefer Linux
or UNIX and I'm the one writing all this. I especially like the capability
to create on-the-fly scripts to manage most of the routine tasks. Linux
provides several scripting shells but bash is the default. Once you
master shell scripts, you'll find all manner of ways to minimize the more
tedious Sysadmin tasks. For more detail see this.
For a fairly brief overview of Linux, click Here
The files and directories you use will change depend on which
distribution of Linux you've installed. To keep it simple (for me) I'm
going to assume Redhat or one of its derivatives. Redhat is a kind of System V
type system rather the BSDish offshoots of other distros and it's pretty
much a universal standard.
Most of the system level configuration scripts are located in the
/etc/ directory. This will be the system passwd file, shadow (for encrypted
passwords), the init scripts for booting (inittab is still used so check it out) the directories for
starting the daemons (the rc*.d directories, init.d,, xinet.d, mail, etc.)
and the rc.local file for adding your own stuff to the boot process. The
daemons themselves will be scattered around in various places but you can
usually find them by looking in their startup scripts.
If you compile add-on programs from source, the default install directory will usually be
/usr/local with various executables in /usr/local/bin. Other distros will
prefer /opt. The /sbin directory is where the system level commands live,
things like chkconfig, ifconfig and other scripts and executables that the
Sysadmin needs but aren't generally necessary for regular users. There is
also a /bin directory where most of the general purpose, user level commands
are located.
Removable device like CDs, DVDs, floppy drives, usb devices, etc will
usually have a directory in the /media directory (possibly /mnt). You will
usually use one of these to mount a removable device although you could
mount it to any empty directory.
The /usr directory is a kind of catchall that has all manner of mostly user
level stuff. It has the on-line manual, /usr/bin and /usr/sbin for scripts
and executables, /usr/local for new programs and packages, libraries and
kernel modules and the kernel itself. It's usually partitioned separately
from the root partition.
the /lib directory has libraries and modules and other bits and pieces that
other programs depend on.
The /home directory is where the system will put all new users by default.
It does this by consulting the /etc/default files and copying the stuff in
/etc/skel to the new user's home directory. If you want to change these
initial settings, do it here. This directory should also be mounted
separately.
The /var directory is where most of the log files are stored, the mail
files and mail spool files, the web site, the crontabs and lots of other
things that change often. This directory also needs to a separate
partition.
The /boot directory is where the kernel and other components needed for
booting are kept. The /boot/grub directory is where the grub.conf file is
found. You can edit this file to change the order of which kernel boots,
the default wait time before booting the default kernel and some other
useful things.
The graphics configuration is in the /etc/Xll/xorg.conf file. If the
display screws up, check this file and tinker with the settings until you
get it right. Make sure the /var/gdm has the group of gdm. In normal
operation a live, production server shouldn't really be running in graphics
mode anyway (runlevel 5) so this shouldn't be an issue.
The best time to partition the hard disk(s) is during a fresh install.
Always select the manual partition option. While it's a little more
trouble, it will save you headaches later on. You should also read up
on LVM (Logical Volume Management) and configure it as a kind of safety
overflow in case a partition starts to fill up. The following
partitioning scheme has worked well for me:
If you want to make a change to anything always make a backup
of the original first. Edit the original. Test it. If somethings goes wrong
copy the saved original back to its old filename. If possible create a
directory somewhere, copy the files you need there and work on those.
Mistakes can be disastrous so always plan on a way to recover. Ideally you
will use something like RCS to keep track of what you've done.
You also need to learn various backup and recovery techniques, just in
case. The rsync utility is a handy way to backup important stuff but so is
dump and restore. Even tar and cpio provide you ways to stash critical
files and directories somewhere safe. However you do it, DO IT.
|
Return to the Contents Pages