Return to Table of Contents

Chapter 1

The Linux Operating System

Introduction

A Brief History of Linux

The Linux Kernel Is Free

The Engine

The Rest of the Stuff

Pick Your Own

A Linux Distribution

Linux Is Not Always Free

Why Pay for a Linux Version?

What If Linus Quits?

The Main Differences between Linux and Other Operating Systems

Feature Rich

Why Use Linux?

Use It Where?

Server or Workstation?

Latest and Greatest Hardware?

Where to Look for Drivers

Migrate to Desktop Workstation

Distributions of Linux

Quick Distribution Reviews

Debian GNU/Linux 2.1

Caldera OpenLinux 2.3

Turbo Linux 4.0

RedHat Linux 6.1

Linux Mandrake PowerPack 6.1

SuSE Linux 6.3

Database Server Roundup

SPIRO-Linux

Corel Linux

Considerations Before Upgrading or Migrating

Hardware Compatibility

Test Environment

Upgrading

Migrating from Another OS

Which Distribution?

How to Begin the Process

How to Get Your People Started

Issues to Present to Your Manager

Doing a Proper Cost Analysis

Resources

Summary

FAQs

·     Introduction

·     A Brief History of Linux

·     The Main Differences between Linux and Other Operating Systems

·     Why Use Linux?

·     Distributions of Linux

·     Considerations Before Upgrading or Migrating

·     How to Begin the Process

·     Summary

Introduction

Linux as an operating system has been in continuous development since about 1991, when Linus Torvalds began to write a UNIX-based operating system for the Intel PC environment. The original Linux kernel was very compact and had only the most basic functionality. Taking advantage of the Open Source community, which was still in its infancy, Linus released Linux to the world.

Nearly a decade later, the Linux OS is beginning to find its place in the business community as a viable and often superior replacement to many other server and desktop operating systems. Linux has entered into and excelled at a newer area—that of a database server—as proven by the many alliances between various Linux vendors and some of the big database vendors like Oracle and DB, to name a few. This book introduces Linux as an excellent alternative database server platform, examines the pros and cons of several database solutions, and introduces a few examples of real-world applications.

A Brief History of Linux

Linux was initiated as a pet project by a student named Linus Torvalds while working at a school in Helsinki. He started this pet project after working with Minix, another UNIX-like operating system that ran on an Intel-based PC.

Why would anyone take on such a daunting task as rewriting an operating system? As a graduate student, the high cost of dumb terminals compared to the advantages of a basic PC as a desktop system was becoming clear. But the cost of the desktop software and the required desktop operating system kept the average student and user from being able to afford a PC with all the necessary software products. In an effort to alleviate this problem, and extend the resources of the school at which he was working, Linus decided that this redevelopment of Minix would be a worthwhile project even if it just meant the school could use some old PCs as dumb terminals to connect to the main servers.

Linus opened his project to the Internet community for development ideas and additional development resources in early 1992. The Internet community quickly latched onto this project and helped supplement its development in a fashion that every software development house would jealously like to tap into—free and unlimited support in many languages.

The Internet development allowed hundreds and then thousands to collaborate or go their own way with the things they preferred. This provided a very fast development with many eyes debugging and testing the code.

In terms of the development of utilities, there was no “best design” of a utility. Anyone could contribute whatever he or she deemed a useful utility. This is evident in the fact that there are several utilities that do the same basic function; they were included so that if you were already familiar with a specific utility, Linux would provide a clone for you. For example, there are a dozen or more file editors supplied in text-based and X Window versions.

Linus has since removed all Minix code and has completely rewritten the kernel using his own code.

The Linux Kernel Is Free

Linux was developed for fun and for free. The Linux kernel and the related source code are made freely available to everyone and will continue to be free as far as Linus is concerned. Linux is copyrighted by Linus Torvalds under the terms of the General Public License (GPL). The GPL allows anyone to freely distribute the full source code, make copies thereof, and sell or distribute it (with a few exceptions) any way he or she wishes, in its entirety. The GPL is supplied along with the Linux kernel (usr/src/linux/COPYING/ directory on the Linux CD-ROM) or it can be downloaded and viewed from many sites on the Internet.

The Engine

The Linux kernel is just one small part of the whole thing collectively known as Linux—it just happens to be the most important part. You can think of your average PC as being like the chassis of an engine, one you can buy from any supplier of car chassis, and there are many suppliers available. The next most important part is the engine—for your PC, this would be the Linux kernel. The kernel “makes it all run.” The kernel handles IO, does memory management, and basically “runs” things. So, you have a chassis and an engine, but no steering, no wheels, no doors, no seats, no power “things.” These are the extras that you also get to select (see Pick Your Own) or have someone else select for you (see Linux Distribution).

The Rest of the Stuff

The kernel is the engine of your operating system. And just like any other operating system, you need some utilities to do useful work like creating a document and printing it; and other utilities to install, display, and print “stuff” on some other host; and to share files and play sounds. This “stuff” is a set of utilities that is freely available on the Internet, the same as the Linux kernel. Table 1.1 provides a very small sample of the utilities supplied with Linux.

Operation

Command Line Utility

File Manipulation

cp, mv, rm, ln, touch, ls, cat, more, >, >>, 2>, <

Setup

ifconfig, mount, showmount, /etc/printcap, /etc/hosts

Stats

ps, vmstat, nfsstat, innstat, netstat, top, who, users, pac, du,

Utilities

vi, pine, pico, sed, awk, grep, find, netscape, tar, cpio, compress

Network Services

DHCP, http, SMB, ftp, telnet, talk, pop3, imap, fingerd, sendmail

Table 1.1 Basic UNIX Utilities Supplied with Every Linux Distribution

Pick Your Own

Imagine if you could go to one huge store and cruise down an aisle on your new PC ”chassis” and pick the parts you wanted for your new PC “car,” and assuming they would fit together, at the end of the conveyor belt, you had all the pieces to build your PC car. The best part is that there is no check-out—all of this stuff is free! Well, usually. If you knew what you were doing in this huge Internet store, you would already know what you needed, what your preferred choice was for each option (since there are always many to choose from), and you already knew it fit together. This is what the commercial versions are—a collection of these programs and utilities, along with some of their own homemade utilities that make up their version or distribution of Linux.

A Linux Distribution

Whenever you get a copy of Linux, either commercially or free, you get what collectively is called a distribution. A distribution is one company’s collection of utilities for Linux along with the kernel and possibly some of their proprietary products, like database managers, firewall software, etc.

A typical Linux distribution contains hundreds of standard UNIX-like utilities as well as an excellent set of development tools, games, databases, graphical display, and control utilities, as well as a windowing Graphical User Interface (GUI) called the X Window System.

Linux Is Not Always Free

Some of these Linux distributions are not entirely free. The base of their system may be free but they charge for the extras that make it their special version of Linux. There are commercial versions of Linux produced by companies like Debian, RedHat, VA Linux, SuSE, and more. But that does not mean you cannot get a copy of them for free. You can download a full copy of these Linux distributions usually from their own sites as well as from any one of the many mirror sites scattered throughout the Internet.

Why Pay for a Linux Version?

The commercial versions offer added bonuses that are not available with the free versions, although the actual media that is supplied may seem identical. The difference is usually in some value-added product or service that is included with the commercial product. For example, RedHat Linux, when bought commercially from a retailer, includes 30–180 days of free installation support as well as a subscription to their update central web service. The Debian Distribution provides unlimited support from its web and ftp sites. You can also buy this support and update service on a yearly contractual basis from RedHat and other providers. This is how RedHat makes its money and continues to pour that money back into developing additional features for their product.

Commercial versions are also more likely to be kept current and usually have a simplified installation and unified interface prepared for you. In the early days of Linux, you were given a basic set of instructions on how to get the supplied Linux distribution to install. You then had to configure your files and printers, network and sound cards individually. Current releases almost always have some slick installation script that may be color-oriented and menu-based (most common), or it may be GUI-oriented (X Window) like the current release of RedHat.

What If Linus Quits?

All the source code is freely available; even if Linus decides to stop working, someone else can easily take the source and continue the development. And the kernel is only one small, albeit very important, part of the whole thing referred to as Linux. Most of the many utilities have been contributed from the open source arena and the GNU project.

Contrary to popular belief, Linus does not do everything. There are many other contributors, just like Henry Ford did not invent the car as such. There were many contributors up to this point and there will be many more. Alan Cox is one notable contributor to kernel development in such areas as dealing with additional hardware and new CPU design requirements. Specifically, AMD is providing all the processor nuts and bolts of the Athlon processor to Alan Cox. Kernels released in the very near future should SMOKE (be optimized to run) on an Athlon machine.

The Main Differences between Linux and Other Operating Systems

Linux is a UNIX clone that is written to be POSIX-compliant wherever possible. Linux was originally written for the Intel platform but there are ports to PowerPC, Macintosh, Amiga, some Atari computers, and even the Palm Pilot. If you know the basic commands, file system layout, and general utilities of any other UNIX variant, you know basic Linux commands, the basic interface, and the file system. If you are Microsoft Windows or Macintosh oriented, you may not be as comfortable at first but you will find that almost everything is similar.

Feature Rich

Not every Linux distribution has exactly the same set of utilities, but in general, the base features supplied with Linux are quite impressive, to say the least. Since Microsoft Windows had almost no competition at the desktop, their advertisements almost always spoke about the improvements over their previous offerings, not their competition. Linux was and is a competitive operating system for the Intel or clone-based PC as both a workstation and server operating system. And most of the improvements added to Windows NT over the past four years have been UNIX-like services that Linux has always supported.

Some of the many features included with most Linux variants that make Linux a great database server are

·         ·           Multitasking

·         ·           SMP

·         ·           32- and 64-bit virtual memory models

·         ·           Protected kernel mode

·         ·           ELF standard binaries

·         ·           Multi-user

·         ·           Free GUI

·         ·           Binary compatibility with other UNIX variants

·         ·           Extensive network protocols and services support

·         ·           All the standard UNIX network services like HTTP, FTP, Telnet, etc.

Multitasking

With a true 32-bit Intel (64-bit on supported RISC CPUs) multitasking environment, Linux has the ability to run multiple programs apparently ”simultaneously,” which, in reality, is a very fast round robin—but who cares, it works. This is an essential requirement of a database server. Many process threads can be started simultaneously and execute in parallel, thus offering excellent performance and optimization of IO channels.

Symmetric Multiprocessor Support

Out of the box, Linux will support between 1, and in some cases, up to 16 CPUs, depending on the variant. This multiprocessor support makes Linux an excellent platform for a database server, able to handle many threaded processes simultaneously. Almost all major vendors sell multiprocessor servers specifically for database and web services. The Linux kernel is well-designed to handle these multiple processors, providing almost full utilization of each additional processor instead of a declining utilization ratio as each new processor is added, as some other operating systems provide.

32-Bit (and 64-Bit RISC) Virtual Memory

Linux uses the full processor 32-bit memory management services to provide virtual memory of 4GB on Intel platforms and 16 exabytes when using 64-bit Linux on any RISC processor. Each new process gets an independent user-level process with 2GB of virtual space available if required; in reality, it uses only enough RAM as needed to support the process. This provides security and independence between every process on the system.

Binary Compatibility: Standard Extremely Low Frequency (ELF) Binaries

Linux has embraced the standardized ELF-based binaries’ and shared libraries’ (similar to dynamic link libraries (DLL) but not compatible) application design strategy. This allows applications to run on multiple operating systems without need of recompilation. SCO UNIX 4.2, SVR4, AIX, Sun, and most Linux Intel-based versions are among the many UNIX variants that are moving toward this compatibility design. For example, Corel Draw! for SCO also runs under Linux.

Multi-User

True multi-user capabilities (not just multiple access, which is what NT mostly provides—rarely are there separate users logged into one NT host) provide for multiple users to run multiple processes on a single Linux server host.

Fully Protected Kernel Mode Operations

The Linux operating system runs all applications in fully protected mode (no process can circumvent the operating system). No user application can interfere with any other user application unless it is specifically allowed, and there is no direct access to any hardware in Linux. These are the two main problems with DOS-type operating systems.

Free X Window GUI

The Linux Graphical User Interface is a completely free GUI, based on an X/Open standard version of the X Window System (most existing X-based programs will run under Linux without any modification). The X Window System has been around since the early 1980s, predating the Microsoft Windows design. You may even notice that the new look of Win9x / NT is very similar to the X Window standard that has been around for quite a bit longer.

Limited DOS / Windows Application Support or VMWare

Supplied with most versions of Linux is a DOS Emulator package called DOSEMU and a Windows Emulation package called WINE. Both of these packages provide simple, albeit limited, support of applications that do not try to bend any rules, like directly accessing hardware in some cases.

Another bright spot for Linux is a Virtual Memory Emulation package called VMWare. VMWare offers FULL Windows 3.x / 9.x / NT support by allowing Linux to be a host operating system with one or more of these guest operating systems installed in a virtual world, sharing with the Linux OS the local memory and hardware resources equally and at the same time. You literally can have both Linux and one or more Windows Operating Systems running at the same time on the same machine in different X windowpanes! This means you could provide either desktop to all users on the network on any relatively powerful PC (i.e., with the proper hardware: 266+ MHz, 96+ MB RAM, plus disk space). Note that VMWare offers the equivalent virtual memory management product for NT. You can install Linux as a guest OS onto NT and run both desktops together from a Windows window. You can download a 30-day free trial version from www.vmware.com for either OS.

Extensive Networking Support

Perhaps the biggest selling point for most any Linux version is the extensive networking support provided. This includes emulation packages and the related protocols for almost all other network operating systems commonly used on PC hardware. Additionally, there is extensive media support for various types of interfaces other than standard Ethernet and Token Ring, like ISDN and even Ham Radio support.

Full native protocol support is supplied for Macintosh, DOS, Windows NT / 9x /3.xx, Novell, and OS/2 through various add-on packages, making Linux appear like a local native server and or client to these other OS versions.

Standard Web Services

Internet services support is provided with the Apache web server (number one in the world), the most dominant web server product running http services on the Internet, as well as full versions of the latest CGI interfaces: Perl, Java, etc. Linux is an excellent web server; Apache is a top-of-the-line web application that has integration hooks for all the major database services using these CGI interfaces. The only web interface not supported locally is Active Server Pages.

Standard UNIX Services

Linux supports all the standard UNIX services: e-mail, FTP, UseNet news, Telnet, POP, IRC, NFS, DNS, NIS, SNMP, Kerberos, etc., as would be expected of any Internet OS.

For a much more detailed overview of what Linux is and is not, you can check out the Linux International web site at http://www.li.org/li/index.shtml.

Copyright

The Linux Kernel is Copyright © Linus B. Torvalds and is copyrighted under the terms of the General Public License (GPL). You can read the GPL by browsing the file /usr/src/linux/COPYING on your local Linux system, or it may be on the installation CD-ROM in the top-level directory as the file named COPYING. Linux is a trademark of Linus Torvalds.

Why Use Linux?

You would use Linux for the same reasons you would use any operating system: reliability, security, features, and cost. When you add these together, Linux is hard to beat. Few other operating systems boast the breadth of applications, the proven track record of reliability, the latest networking features, and a great price. No, it is not free. Nothing is really free. Someone has to install, manage, and maintain it. The initial software is free; the on-going costs of support and staffing are no different. Just the up-front costs are very reasonable.

Use It Where?

The most common starting point is in the server room as a router, dynamic host control protocol (DHCP), web, file transfer protocol (ftp), database, file or print server, for almost any operating system. Then you can migrate it to desktops.

Linux is a noted firewall server with the latest security offerings of IPChains and TCP Wrappers services. Linux can provide network address translation (NAT) as well as proxy services for intranet hosts accessing the Internet more securely. With Apache and WS-FTP services, you have a very secure and robust web and ftp site with extensive security, auditing, and management features to match, and which exceeds any other competing products on the market. Various Linux versions have created alliances with major database servers to ensure optimal integration and performance. One such alliance has been created between RedHat and Oracle and there are others; check the home web site of any version for the particulars.

Server or Workstation?

Linux is Linux, there is no real separation of a workstation and a server version in most cases. However, Linux may be packaged and sold with those names; for example, TurboLinux Workstation version retails for less than the TurboLinux Server package. The only difference is how much and what type of software you get to install. A workstation usually means the main Linux network services that pertain to a user and additional productivity applications like an office suite. A server version might not include these user productivity applications by default, but this would not preclude you from installing them at any later time.

If the main usage of your Linux host is as a file, print, web, and ftp service, then this host would be considered a server. If you add an office productivity suite like Corel WordPerfect, StarOffice, or Applixware (basically all Office97 equivalents), then you have a workstation again. This “workstation” and “server” designation is more a perceived use than a restriction put on the software. Most Linux versions come with all possible applications for both server services and user applications; you get to pick and choose what you want to install every time. You can even automate the installation to a single diskette bootup that connects to a central installation service with a script identifying what disk partitions to create of what size, and what packages should be installed. The RedHat distribution provides the Kickstart automated installation service for multiple installations onto similar machines of RedHat Linux.

Latest and Greatest Hardware?

Linux runs fine on older equipment and is an excellent way to get added mileage out of older equipment as a firewall, file and print (nfs, SMB, Novell, Mac), or web or ftp server. But for the desktop, last year’s models are the best. You DO NOT want the latest and greatest hardware; many times they are very specific to Windows only, like WinModems. Generally speaking, name-brand peripherals or peripherals that use well-known chip sets are the best. Linux has a large following and there is usually a driver for most common equipment easily available at some Internet site.

For IT Professionals

Odd Incompatibilities

In one recent class, some local machines were used. They contained a common network interface card (NIC) that was assumed to work with Linux. Sadly, all this NIC did was cause frustration. A quick browse of the NIC manufacturer corporate web page caused a ray of hope to appear. The Frequently Asked Questions (FAQ) section provided a Linux-specific section with a helpful hint that required a download of their DOS Setup utility disk files. The help on the site was “This NIC works best when not in Plug and Play mode with Linux.” The setup utility did not have any way to change this status on these particular NICs, although the NIC worked fine under Windows and NT. No amount of coaxing or begging helped. It was eventually replaced by a really old 8-bit NIC that worked just fine first time, every time. Just goes to show, you never know for sure.

The web site did indicate that their newer NIC cards were indeed Linux-compliant, and that there were even some Linux drivers available for them. Linux is becoming another respected OS for which hardware manufacturers are spending development time to be compatible.

Where to Look for Drivers

A great place to start is at the web site of the Linux distribution; for example, www.redhat.com, a small part of the main RedHat web site, or www.debian.org/distrib/ftplist, a small part of the main Debian web site. You can also just use your favorite search engine from any web browser and type in the keywords “Linux” and “your hardware name.” This usually provides several (if not hundreds) of links to sites with drivers. Most sites will also include their latest hardware compatibility HOWTO for additional hints.

Also, pick your favorite search engine, and type the keywords “Linux” and {your favorite hardware}. You should come up with a number of links to sites with drivers, maybe run down some favorites like video cards, network cards, and SCSI cards. The latest hardware compatibility HOWTO should provide some hints.

Migrate to Desktop Workstation

Surely you remember the last time you changed your operating system, from DOS to Win3.x / Novell or to Win95 / NT / Novell? This change to Linux will be no less traumatic. You may have to retrain some users in some cases. However, the basic GUI interface skills will remain the same, but the applications may appear different for some things, like your office suite. But if this is a dedicated database client desktop, the look and feel should be very similar if not exact, and the reliability is very high. Just think, the average user will have no clue how to put or get files from a floppy disk! Isn’t that worth something? Not only that, but how about a free office suite like StarOffice that provides compatibility of interface and documents? You may want to check out the StarOffice productivity suite supplied free from Sun Microsystems found at www.sun.com/products/staroffice/get.cgi. StarOffice comes bundled with many versions of Linux including RedHat 6.1 and TurboLinux 4.0. You can find these and other products like the new GNU Office Suite products by visiting sites like www.slashdot.org and www.freshmeat.net for Linux community news and the latest software downloads of games, applications, patches, and upgrades in most cases for all the different Linux versions.

Distributions of Linux

There are many commercial and noncommercial distributions of Linux. Some of the many are listed (in no particular order or for any particular reason) in Table 1.2.

Web Site

Distribution

www.caldera.com

Caldera Systems OpenLinux

www.conectiva.org

Conectiva Linux

www.debian.org

Debian GNU/Linux

www.libranet.com

Libranet

www.linux-mandrake.com

Linux Mandrake

www.linuxppc.com

LinuxPPC (PowerPC)

www.phatlinux.com

Phat Linux

www.redhat.com

Red Hat Linux

www.slackware.com

Slackware Linux

www.stampede.org

Stampede GNU/Linux

www.suse.de

SuSE Linux

www.turbolinux.com

TurboLinux

www.yellowdoglinux.com

Yellow Dog Linux (PPC, RS6k)

Table 1.2 A Sample List of Available Linux Distributions

Table 1.2 lists a few of the many Linux distributions, many of which are available in different language versions. Not all versions support all possible languages; check with the main web site for more details.

Quick Distribution Reviews

These reviews are neither complete nor in any order. These reviews are not meant to replace your own testing and evaluation of the various Linux distributions, but are intended more to get you started in the right direction.

All versions listed run a 2.2.10 or 2.2.12 kernel, provide the KDE and Gnome desktop, provide NFS and SAMBA additional network support services, and use Apache as their web server. All versions except Corel provide sendmail for their e-mail services. All these versions provide some form of written documentation when you buy the product commercially. All versions of Linux provide documentation in electronic format (you print it).

NOTE

The version numbers after each distribution name was current as of this document. Subsequent releases usually will use higher or longer numbers in all cases.

Debian GNU/Linux 2.1

Debian is a volunteer effort distribution of Linux of more than 500 volunteers cooperating over the Internet. Debian is sponsored by VA Linux Systems Inc., O’Reilly and Associates Inc., and Silicon Graphics Inc. Its packaged price is $20, and includes an O’Reilly book, called Learning Debian GNU/Linux, and a CD-ROM with the distribution on it. If you register your copy you can receive a free copy of StarOffice. The main Debian web site provides unlimited access to files and support, free updates forever, free software from their archives, and even free advice!

Caldera OpenLinux 2.3

Caldera has a very slick installation that multitasks the pieces and lets you play Tetris while you wait for the package installation to finish. The list is $49 and includes tech support. Caldera also supplies many office suites like WordPerfect, StarOffice, Koffice, and Applixware.

Turbo Linux 4.0

Turbo Linux is a solid performer with a cheap price as low as $20 (lists at $49) and a $199 server edition that includes some commercial products like BRU and excellent support services. This is also a RedHat-based distribution with its own set of installation and management utilities.

RedHat Linux 6.1

This is the preferred version with most of the market share according to almost all the surveys on Linux. The X-based installation is very slick (some details shown earlier) and includes some RedHat specific utilities like DiskDruid and Kickstart to name a few. RedHat has created many alliances with the big-name PC makers and most of the big-name database vendors like Oracle and IBM’s DB2. The base version is $29, but the deluxe version with a better support option is $79. It seems RedHat is announcing new partnerships with major hardware and software vendors on a weekly basis.

Linux Mandrake PowerPack 6.1

Mandrake is based on the RedHat distribution with additional features and lots of additional packages at a slightly lower price ($55) than the RedHat deluxe version ($79). Mandrake comes on six CD-ROMs, tied with SuSE for the most CD-ROMs in any distribution listed here.

SuSE Linux 6.3

This is the most popular version of Linux in Europe with a multitude of applications, desktops, and bundled name-brand software, similar to Mandrake. The tech support is above average and their installation is also GUI oriented. You also get a copy of VMWare along with StarOffice and Applixware office suites.

Database Server Roundup

As a final database-oriented roundup, Table 1.3 provides a quick overview of the main server-based Linux versions, along with their tech support and supported database servers included with their distributions.

 

Caldera

Debian

TurboLinux

RedHat

Mandrake

SuSE

Install

GUI

GUI

Text

GUI

Text

Text

System Setup

Lizard

Debian Installer

Turbocfg

linuxconf

linuxconf