::Search Result::

Thursday, August 14, 2008

Installing Linux in a Server Configuration

Akey attribute in Linux’s recent success is the remarkable improvement in installation
tools. What once was a mildly frightening process many years back has now become
almost trivial. Even better, there are many ways to install the software; CD-ROMs are no
longer the only choice (although they are still the most common). Network installations are
part of the default list of options as well, and they can be a wonderful help when installing a
large number of hosts.

In most cases, designating a system as a server will enable more services than you want.
A single Linux system is capable of providing all sorts of services: disk, printers, mail, news,
web, chat, and more. Many of these services are turned on automatically. But the reality is that
most servers are dedicated to performing one or two tasks, and any other installed services
simply take up memory and drag on performance, as well as provide hackers another avenue
of attack.

This module discusses the installation process as it pertains to servers. This requires you to
do two things: differentiate between a server and a client workstation and streamline a server’s
operation in terms of its dedicated functions.
You will go through this process for Red Hat Linux, which you will find on the CD-ROM
that came with this book.

Performing Preinstallation Evaluation
Before getting into the actual installation phase, it is important that you take a moment and
evaluate two things:
● The hardware the system is going to run on
● The server’s ideal configuration to provide the services you need
Let’s start by examining hardware issues.

Hardware
As with any operating system, before getting started with the installation process, you should
determine what hardware configurations would work. Each commercial vendor publishes a
hardware compatibility list (HCL) and makes it available on its web site. Red Hat’s hardware
support site is at http://hardware.redhat.com, where you can search a compatibility database
for systems or components. In general, most popular Intel-based configurations work without
difficulty.

A general suggestion that applies to all operating systems is to avoid cutting-edge hardware
and software configurations. While they appear to be really impressive, they haven’t had the
maturing process some of the slightly older hardware has gone through. For servers, this usually isn’t an issue, since there is no need for a server to have the latest and greatest toys,
such as 3-D video cards. After all, your main goal is to provide a highly available server for
your users, not to play Doom. (Although it should be noted that I, myself, during my less
responsible days as a junior-level administrator, found that Linux is wonderfully stable even
while running Doom and being a file server.)

Server Design
When a system becomes a server, its stability, availability, and performance become a
significant issue. These three factors are usually improved through the purchase of more
hardware, which is unfortunate. It’s a shame to pay thousands of dollars extra to get a system
capable of achieving in all three areas when you could have extracted the desired level of
performance out of existing hardware with a little tuning. With Linux, this is not hard. Even
better, the gains are outstanding!

The most significant design decision you must make when managing a server configuration
is not technical but administrative. You must design a server to be unfriendly to casual users.
This means no cute multimedia tools, no sound card support, and no fancy web browsers
(when at all possible). In fact, it should be a rule that casual use of a server is strictly prohibited—not only to site users but site administrators as well.

Another important aspect of designing a server is making sure that it has a good environment.
As a system administrator, you must ensure the physical safety of your servers by keeping
them in a separate room under lock and key (or the equivalent). The only access to the servers
for nonadministrative personnel should be through the network. The server room itself should
be well ventilated and kept cool. The wrong environment is an accident waiting to happen.
Systems that overheat and nosy users who think they know how to fix problems can be as
great a danger to server stability as bad software (arguably even more so).

Once the system is in a safe place, installing battery backup is also crucial. Backup power
serves two key purposes: to keep the system running during a power failure so that it may
gracefully shut down, thereby avoiding file damage or loss; and to ensure that voltage spikes,
drops, and other noises don’t interfere with the health of your system.

Here are some specific things you can do to improve your server situation:
● Take advantage of the fact that the graphical user interface is uncoupled from the core
operating system, and avoid starting the XWindow System (Linux’s GUI) unless someone
needs to sit at the console and run an application. After all, like any other application, X
requires memory and CPU time to work, both of which are better off going to the server
processes instead.
● Determine what functions the server is to perform, and disable all other functions. Not
only are unused functions a waste of memory and CPU, they complicate the process of
securing the server.
● Unlike some other operating systems, Linux allows you to pick and choose the features
you want in the kernel. The default kernel will already be reasonably well tuned, so you
won’t have to worry about it; but if you do need to change a feature or upgrade the kernel,
be picky about what you add and what you don’t. Make sure you really need a feature
before adding it.

NOTE
You may hear an old recommendation that you recompile your kernel to make the most
effective use of your system resources. This is no longer true—the only reason to recompile
your kernel is to upgrade or add support for a new device. Remember: Once a server is
in use, don’t change what’s stable and performs reasonably well without a good reason.

Uptime
All of this chatter about taking care of servers and making sure silly things don’t cause them to
crash stems from a long-time UNIX philosophy: Uptime is good. More uptime is better.
The UNIX (Linux) uptime command tells the user how long the system has been running
since its last boot, how many users are currently logged in, and how much load the system is
experiencing. The last two are useful measures that are necessary for day-to-day system health
and long-term planning. (For example, the server load has been staying high lately, so maybe
it’s time to buy a faster/bigger/better server.)

But the all-important number is how long the server has been running since its last reboot.
Long uptimes are a sign of proper care, maintenance, and, from a practical standpoint, system
stability. You’ll often find UNIX administrators boasting about their server’s uptimes the way
you hear car buffs boast about horsepower. This is also why you’ll hear UNIX administrators
cursing at system changes (regardless of operating system) that require a reboot to take effect,
even though applying the latest kernel security patch may justify that reboot. You may deny
caring about it now, but in six months you’ll probably scream at anyone who reboots the system
unnecessarily. Don’t bother trying to explain this phenomenon to a nonadmin, because they’ll
just look at you oddly. You’ll just know in your heart that your uptime is better than theirs.

Dual-Booting Issues
If you are new to Linux, you may not be ready to commit to a complete system when you just
want a test drive. All distributions of Linux can be installed on only certain partitions of your
hard disk while leaving others alone. Typically, this means allowing Microsoft Windows to
coexist with Linux.

Because you are focusing on server installations, the text will not cover the details of
building a dual-booting system; however, anyone with a little experience in creating partitions on a disk should be able to figure this out. If you are having difficulty, you may want to refer
to the installation guide that comes with your distribution or another one of the many available
beginner’s guides to Linux.
Some quick hints: If a Windows 95 or Windows 98 partition currently consumes an entire
hard disk as drive C:, you can use the fips tool to repartition the disk. Simply defragment and
then run fips.exe. If you are using Windows NT/2000 with NTFS and have already allocated
all the disk with data on each partition, you may have to move data around a bit by hand to
free up a partition. Don’t bother trying to shrink an NTFS partition, though; because of its
complexity, it doesn’t like being resized, and doing so will lead to corruption.

You may find using a commercial tool such as Partition Magic to be especially helpful,
because it offers support for NTFS, FAT32, and regular FAT, as well as a large number of
other file system types. Its user interface is also significantly nicer than fips.

If you’re going to be installing a dual-boot system, install Linux last. If you install
Windows last, it will clobber the boot information for your Linux system. If you install Linux
last, it will recognize that you have Windows installed and let you choose which one you want
to boot by default. Linux gets an “A” for citizenship.

Methods of Installation
With the improved connectivity and speed of both local area networks and Internet connections,
it is becoming an increasingly popular option to perform installations over the network rather
than using a local CD-ROM.

In general, you’ll find that network installations become important once you’ve decided to
deploy Linux over many machines and therefore require a fast installation procedure in which
many systems can install at the same time.

Typically, server installations aren’t well suited to automation, because each server usually
has a unique task; thus, each server will have a slightly different configuration. For example, a
server dedicated to handling logging information sent to it over the network is going to have
especially large partitions set up for the appropriate logging directories, compared with a file
server that performs no logging of its own. (The obvious exception is for server farms where
you have large numbers of replicated servers. But even those installations have their nuances
that require attention to detail specific to the installation.)

Because of this, you will focus exclusively on the technique for installing a system from a
CD-ROM. Of course, once you have gone through the process from a CD-ROM, you will find
performing the network-based installations to be very straightforward.

If It Just Won’t Work Right . . .
You’ve gone through the installation procedure . . . twice. This book said it should work.
The installation manual said it should work. The Linux guru you spoke with last week said
it should work. But it’s just not working.

In the immortal words of Douglas Adams, don’t panic. No operating system installs
smoothly 100 percent of the time. (Yes, not even the Mac OS!) Hardware doesn’t always work
as advertised, combinations of hardware conflict with each other, that CD-ROM your friend
burned for you has CRC errors on it (remember: it is legal for your buddy to burn you a copy
of Linux!), or (hopefully not) the software has a bug.

With Linux, you have several paths you can follow for help. If you have purchased your
copy from a commercial vendor such as SuSE or Red Hat, you can always call tech support
and reach a knowledgeable person who is dedicated to working through the problem with you.
If you didn’t purchase a box set, you can purchase support from Red Hat and other distributors
of Linux. Last, but certainly not least, is the option of going online for help. An incredible
number of web sites are available to help you get started. They contain not only useful tips
and tricks but also documentation and discussion forums where you can post your questions.
Obviously, you’ll want to start with the site dedicated to your distribution: www.redhat.com
for Red Hat Linux. Other distributions have their own sites. Check your distribution for its
appropriate web site information.

Here are some recommended sites for installation help:
comp.os.linux.admin This is a newsgroup, not a web site. You can read it with a news
client, or through the web at http://groups.google.com.
comp.os.linux.redhat This is another newsgroup, but Red Hat Linux–specific.
linux.redhat This is another Red Hat Linux newsgroup.
http://www.linuxdoc.org/ This site is a collection of wonderful information about all
sorts of Linux-related topics, including installation guides. Just a warning, though: Not all
documents are up to date. Be sure to check the date of any document’s last update before
following the directions. There is a mix of cookbook-style help guides as well as guides
that give more complete explanations of what is going on.
http://linuxnewbie.org/ This site features “Newbie-ized Help Files” that help with a
variety of hardware and software issues.
http://everythinglinux.org/ Everything Linux, as you might expect, has a wide variety
of resources for the Linux user, including how-to information and reviews.

No comments:

::Adsense::