Installing and Administering Linux
Nick Pilon and Ryan Ernst
27th October 2005
– Typeset by FoilTEX –
• We will not cover actual Linux installation procedures.
• We will cover a basic overview of things you need to keep in
mind when installing.
• We will cover basic administration concerns.
• Try and give you a starting point to learn to install and
– Boostrap past the diﬃcult stuﬀ.
Linux Properly GNU/Linux, but that’s a mouthful!
Distro Distribution of Linux. Distros are how Linux itself is
packaged, and provide mechanisms for installing Linux and
manging the install.
Package The most common mechanism for installing a pro-
gram onto a Linux system. A program or set of related
programs “packaged up” for easy downloading and installa-
Package Manager A program responsible for manging the
packages installed on a machine; allows for installation,
conﬁguration, and uninstallation of packages.
• Most reliable method is to check the Hardware HOWTO:
• Hardware not on the list may be supported, but is a more
• Take note of the hardware on your machine before the install,
and ﬁnd out how much work will be needed to enable it.
• Find out if you just need to install a kernel module, or if it
requires more extensive software support?
• Sometimes hardware will work in one distribution but not
another. Google can often be helpful in determining which
distros it will work with.
Knoppix and Live CDs
• A good way to test hardware compatibility is by using
Knoppix or another Live CD distro.
• A distribution of Linux that allows a full system to be booted
from just a CD.
• Provide a way for you to test Linux on your machine without
touching the contents of the hard disk, and scout for any
diﬃculties you may encounter during your install.
• Red Hat (Fedora - http://fedora.redhat.com)
• Mandriva (formerly Mandrake, http://mandriva.com)
• Debian (http://www.debian.org)
• Ubuntu (http://www.ubuntulinux.org)
• Suse (http://www.novell.com/linux/suse)
• Gentoo (http://www.gentoo.org)
• Can ask for CDs of many of these from the help desk, or
download and burn your own.
• Go with what you’re familiar with ﬁrst.
• Precompiled binary packages can save time and hassle.
Most distributions and pieces of software have precompiled
• A distribution with wide community support can help you
• Good documentation is a must - before downloading or
starting an install process, read over relevant online docu-
• Check distro-speciﬁc hardware compatibility lists, if they’re
• Package management systems are the main things that
• Learn to use at least the basic features of the package
management system for your distro.
• Two general models:
– Central repository. Used by Debian, Gentoo, Ubuntu. A
central store of software is maintained by the distribution’s
authors, and software and upgrades can be installed from
– Distributed packages. Package creation and maintenance
is the responsibility of individual software authors. Usually
up to the administrator to watch for upgrades.
• If your distribution has a central repository, use the search
tools for it.
• If your distribution doesn’t, your work is slightly harder.
There are several resources that can help you:
– Google. (http://www.google.com/linux)
– Freshmeat (http://freshmeat.net/)
• Freshmeat provides a listing of open source projects, cate-
gorized in various ways.
• Some software does not come packaged. You will have to
compile it yourself.
• First step is to read up on the build process and make sure
you have all dependencies installed. This usually means
“development” packages, which include appropriate headers
• Most software will use autoconf, this gives a very simple
– make install
Basic Software You Will Need
• A compiler and associated libraries and tools. gcc and the
GNU suite are used by everyone; no questions here.
• A shell. bash is an old favourite, but there are many options.
• An editor. Please learn emacs or vim, they will make your
life much easier.
• Your distribution’s package management tool.
• Probably X.org, a free X server, and either KDE or GNOME,
whichever you prefer. (KDE!)
• Learn to use man, and learn to read man pages.
• Basic shell redirection:
– command > output ﬁle
– command < input ﬁle
– command1 | command2
• Learn basic shell utilities: head, tail, less, cd, ls, grep, ﬁnd,
xargs, ps, netstat
• Learn more complex shell utilities and scripting languages as
• Agree on a root password with your group members, and
devise some standard way of documenting things done as
root, services running, etc.
– Root can do anything on the system.
– Document what you do with root.
• For extra convenience, set up sudo, so you can execute
things as root without changing users.
/usr “Global” system ﬁles used during normal operation, in-
cluding programs and shared libraries.
/bin Programs the system needs immediately when it boots.
Basic system software.
/home User home directories get stored under here. This is
where they put their ﬁles.
/etc Conﬁguration ﬁles.
/var Files and folders that change frequently. temp ﬁles, logs,
mail folders, htdocs folder.
• Most applications put their conﬁg ﬁles in a folder under
• Vary in format between applications.
• Typically use # to start comments, just like Perl and shell
• Most applications come with sample conﬁg ﬁles with most
options commented out, which you can edit to get a func-
– Much easier than writing one from scratch!
• Options are well-documented, but assume you’re familiar
with program documentation.
• Applications write log ﬁles that contain details as to their
• Applications support providing diﬀerent levels of detail in
their logs through Log Levels.
– Usually conﬁgurable in the application’s conﬁg ﬁles.
• Convention is that application logs are stored under /var/log,
in a ﬁle or directory named after the program.
• Some log entries are stored in common ﬁles too - system.log,
• Use tail -f to view a log in real time.
• Google or another search engine is your best friend. Also
• Do you know what’s going wrong? If error messages aren’t
getting printed to the console, check the application’s log
• When possible, do searches based on the exact text of error
– These will often take you to oﬃcial forums or mailing
lists. You may have to follow several conversation threads
to ﬁnd your answer.
• Have you read the relevant sections of the manual?
• If you’re getting frustrated, remember to take a break!
Asking For Help
• Most projects maintain a mailing list or forum where users
can ask for help.
• Make sure you’ve done a search for similar problems or
• Describe in detail what you’ve already attempted and what
sources you’ve consulted.
– Remember to be polite when asking questions. The
people answering them typically aren’t getting paid.
Error Resolution Process
• Where are you getting the error?
– For problems with installation, most programs come with
INSTALL ﬁles or some other documentation.
– Conﬁguration problems? Keep backups around, and try
rolling back and making the changes in small chunks.
– Getting an application running? Some packages may need
substantial additional work to get going.
∗ This is for security on programs that can be dangerous
or annoying if misconﬁgured.
∗ exim and other mail transfer programs are a good