1.1. Overview
Linux was a phenomenon waiting to happen. The computer industry suffered from a rift. In the 1980s and 1990s, people had to choose between inexpensive, market-driven PC operating systems from Microsoft and expensive, technology-driven operating systems such as UNIX. Free software was being created all over the world, but lacked a common platform to rally around. Linux has become that common platform.
Red Hat Linux is the most popular commercial distribution of Linux. Red Hat and other commercial distributions, such as Caldera's OpenLinux, have taken the Linux concept a step further. With Red Hat Linux, users no longer have to download, compile, and check Linux source code to make sure that all the right pieces are put together for Linux to work. Basically, Red Hat has made it possible for Linux to be used by people other than computer geeks.
Red Hat Linux has also made Linux a more viable alternative for corporate users. Many companies have felt insecure about relying on a free operating system to handle their critical data. With Red Hat Linux, they can rely on Red Hat Software, Inc. (http://www.redhat.com/) to provide tested versions of that software and technical support if there are problems.
1.2. Introducing Red Hat Linux
Red Hat Linux 7.2 is the best representation of a Linux community that is coming of age. With version 7.2, Red Hat Linux has become a solid, polished platform for both desktop and server computing.
More than 1,200 individual software packages (compared to just over 600 in Red Hat Linux 6.2) are included in this latest release. These packages contain features that would cost you hundreds or thousands of dollars to duplicate if you bought them as separate commercial products. These features let you:
___ Connect your computers to a LAN or the Internet.
___ Create documents and publish your work on paper or on the Web.
___ Work with multimedia content to manipulate images, play MPEG music files, view video, and even burn your own CDs.
___ Play games individually or over a network.
___ Communicate over the Internet using a variety of Web tools for browsing, chatting, transferring files, participating in newsgroups, and sending and receiving e-mail.
___ Configure a computer to act as a network server, such as a print server, Web server, file server, mail server, news server, and a database server.
This is just a partial list of what you can do with Red Hat Linux. Using this book as your guide, you will find that there are many more features built into Red Hat Linux as well.
Support for new video cards, printers, storage devices, and applications are being added every day. Linux programmers around the world are no longer the only ones creating hardware drivers. Every day more hardware vendors are creating their own drivers, so they can sell products to the growing Linux market. New applications are being created to cover everything from personal productivity tools to programs that access massive corporate databases.
Remember that old x486 computer in your closet? Don't throw it away! Just because a new release of Red Hat Linux is out doesn't mean that you need all new hardware for it to run. Support for many old computer components get carried from one release to the next. There are old PCs running Red Hat Linux today as routers (to route data between your LAN and the Internet), firewalls (to protect your network from outside intrusion), and file servers (to store shared files on your LAN) - with maybe an Ethernet card or an extra hard disk added.
Past versions of Linux showed the promise of what Linux could be. Red Hat Linux 7.2 could be the realization of that promise. This brings us to the more basic question: What is Linux?
1.3. What Is Linux?
Linux is a free operating system that was created by Linus Torvalds when he was a student at the University of Helsinki in 1991. Torvalds started Linux by writing a kernel - the heart of the operating system - partly from scratch and partly by using publicly available software. (For the definition of an operating system and a kernel, see the sidebar “What Is an Operating System?” later in this chapter.) Torvalds then released the system to his friends and to a community of “hackers” on the Internet and asked them to work with it and enhance it. It took off.
Today, there are hundreds of software developers around the world contributing software to the Linux effort. Because the source code for the software is freely available, anyone can work on it, change it, or enhance it. On top of the Linux kernel effort, the creators of Linux also drew on a great deal of system software and applications that are now bundled with Linux from the GNU software effort (GNU stands for “GNU is Not UNIX”), which is directed by the Free Software Foundation (FSF). There is a vast amount of software that can be used with Linux, all of which includes features that can compete with or surpass those of any other operating system in the world.
If you have heard Linux described as a free version of UNIX, there is good reason for it. Although much of the code for Linux started from scratch, the blueprint for what the code would do was created to follow POSIX standards. POSIX (Portable Operating System Interface for UNIX) is a computer industry operating system standard that every major version of UNIX complied with. In other words, if your operating system was POSIX-compliant, it was UNIX. See the next section describing Linux’s roots in the UNIX operating system.
1.3.1. What Is An Operating System?
An operating system is made up of software instructions that lie between the computer hardware (disks, memory, ports, and so on) and the application programs (word processors, Web browsers, spreadsheets, and so on). At the center is the kernel, which provides the most basic computing functions (managing system memory, sharing the processor, opening and closing devices, and so on). Besides the kernel, an operating system provides other basic services needed to operate the computer, including:
___ File systems - The file system provides the structure in which information is stored on the computer. Information is stored in files, primarily on hard disks inside the computer. Files are organized within a hierarchy of directories. The Linux file system holds the data files that you save, the programs you run, and the configuration files that set up the system.
___ Device drivers - These provide the interfaces to each of the hardware devices connected to your computer. A device driver enables a program to write to a device without needing to know details about how each piece of hardware is implemented. The program opens a device, sends and receives data, and closes a device.
___ User interfaces - An operating system needs to provide a way for users to run programs and access the file system. Linux has both graphical and text-based user interfaces. Gnome and KDE provide graphical user interfaces, whereas shell command interpreters (such as bash) run programs by typing commands and options.
___ System services - An operating system provides system services, many of which can be started automatically when the computer boots. In Linux, system services can include processes that mount file systems, start your network, and run scheduled tasks.
Without an operating system, an application program would have to know the details of each piece of hardware, instead of just being able to say, “open that device and write a file there.”
1.4. Linux’s Roots In UNIX
Linux grew within a culture of free exchange of ideas and software. Like UNIX - the operating system on which Linux is based - the focus was on keeping communications open among software developers. Getting the code to work was the goal, without much concern about who owned the code, and the Internet was the primary communications medium. What, then, were the conditions that made the world ripe for a computer system such as Linux?
In the 1980s and 1990s, while Microsoft flooded the world with personal computers running DOS and Windows operating systems, power users demanded more from an operating system. They ached for systems that could run on networks, support many users at once (multiuser), and run many programs at once (multitasking). DOS (Disk Operating System) and Windows didn’t cut it.
If there was an early operating system that might have risen to meet this challenge, it had to be UNIX, which came out of AT&T Bell Laboratories in 1969. Compare the cultures in which UNIX and Windows arose. Microsoft bought rights to the Disk Operating System (DOS), then set out to make it (or its successors) the only operating system choice on personal computers. Microsoft's goal was to dominate the market for personal computers running personal productivity applications.
UNIX, on the other hand, grew out of a culture where technology was king and marketing people were, well, hard to find. Bell Laboratories in Murray Hill, New Jersey, was a think tank where ideas came first and profits were somebody else’s problem. A quote from Dennis Ritchie, co-creator of UNIX and designer of the C programming language, in a 1980 lecture on the evolution of UNIX, sums up the spirit that started UNIX. He was commenting on both his hopes and those of his colleagues for the UNIX project after a similar project called Multics had just failed:
“What we wanted to preserve was not just a good environment in which to do programming, but a system around which a fellowship could form. We knew from experience that the essence of communal computing as supplied by remote-access, time-shared machines, is not just to type programs into a terminal instead of a keypunch, but to encourage close communication.”
In that spirit, the first source code of UNIX was distributed free to universities. Like Linux, the availability of UNIX source code made it possible for a diverse population of software developers to make their own enhancements to UNIX and share them with others.
By the early 1980s, UNIX development moved from the organization in Murray Hill to a more commercially oriented development laboratory in Summit, New Jersey (a few miles down the road). During that time, UNIX began to find commercial success as the computing system of choice for applications such as AT&T’s telephone switching equipment, for supercomputer applications such as modeling weather patterns, and for controlling NASA space projects.
Major computer hardware vendors licensed the UNIX source code to run on their computers. To try to create an environment of fairness and community to its OEMs (original equipment manufacturers), AT&T began standardizing what these different ports of UNIX had to be able to do to still be called UNIX. To that end, compliance with POSIX standards and the AT&T UNIX System V Interface Definition (SVID) were specifications UNIX Vendors could use to create compliant UNIX systems. Those same documents also served as road maps for the creation of Linux.
1.5. Common Linux Features
No matter what version of Linux you use, the piece of code common to all is the Linux kernel. Although the kernel can be modified to include support for the features you want, every Linux kernel can offer the following features:
___ Multiuser - Not only can you have many user accounts available on a Linux system, you can also have multiple users logged in and working on the system at the same time. Users can have their own environments arranged the way they want: their own home directory for storing files and their own desktop interface (with icons, menus, and applications arranged to suit them).
___ Multitasking - In Linux, it is possible to have many programs running at the same time, which means that not only can you have many programs going at once, but that Linux, itself, can have programs running in the background. Many of these system processes make it possible for Linux to work as a server, with these background processes listening to the network for requests to log in to your system, view a Web page, print a document, or copy a file. These background processes are referred to as daemons.
___ Graphical User Interface (X Window System) - The powerful framework for working with graphical applications in Linux is referred to as the X Window System (or simply X). X handles the functions of opening X-based GUI applications and displaying them on an X server process (the process that manages your screen, mouse, and keyboard).
On top of X, you use an X-based desktop environment to provide a desktop metaphor and window manager to provide the specific look-and-feel of your GUI (icons, window frames, menus, and colors). There are several desktop environments and dozens of desktop managers to choose from. (Red Hat provides several desktop managers, but focuses on Gnome and KDE desktop environments.)
___ Hardware support - You can configure support for almost every type of hardware that can be connected to a computer. There is support for floppy disk drives, CD-ROMs, removable disks (such as Zip drives), sound cards, tape devices, video cards, and most anything else you can think of. Note Not every hardware manufacturer provides Linux drivers with their peripheral devices and adapter cards. Although most popular hardware will be supported eventually in Linux, it can sometimes take a while for a member of the Linux community to write a driver.
___ Networking connectivity - To connect your Linux system to a network, Linux offers support for a variety of Local Area Network (LAN) boards, modems, and serial devices. In addition to LAN protocols, such as Ethernet and Token Ring protocols, all the most popular upper-level networking protocols can be built-in. The most popular of these protocols is TCP/IP (used to connect to the Internet). Other protocols, such as IPX (for Novell networks) and X.25 (a packet-switching network type that is popular in Europe), are also available.
___ Network servers - Providing networking services to the client computers on the LAN or to the entire Internet is what Linux does best. A variety of software packages are available that enable you to use Linux as a print server, file server, FTP server, mail server, Web server, news server, or workgroup (bootp or NIS) server.
___ Application support - Because of compatibility with POSIX and several different application programming interfaces (APIs), a wide range of freeware and shareware software is available for Linux. Most GNU software from the Free Software Foundation will run in Linux.
Note Because of the popularity of the Red Hat Package Management (RPM) format for packaging software, many software packages are available on the Internet in RPM format. If the RPM version matches your processor type, you can install the package without building and compiling the package. See Chapter 5 for information on working with RPM packages.
1.6. Primary Advantages Of Linux
When compared to different commercially available operating systems, Linux's best assets are its price and its reliability. Most people know that its initial price is free (or at least under $100 when it comes in a box or with a book). However, when people talk about Linux’s affordability, they are usually thinking of its total cost, which includes the capability of using inexpensive hardware and compatible free add-on applications.
Although commercial operating systems tend to encourage upgrading to later hardware, Linux doesn’t. In terms of reliability, the general consensus is that Linux is comparable to many commercial UNIX systems but more reliable than most desktop-oriented operating systems. This is especially true if you rely on your computer system to stay up because it is a Web server or a file server.
Another advantage of using Linux is that help is always available on the Internet. There is probably someone out there in a Linux newsgroup who is willing to help you get around your problem. Because the source code is available, if you need something fixed you can even patch the code yourself! On the other hand, I’ve seen commercial operating system vendors sit on reported problems for months without fixing them. Remember that the culture of Linux is one that thrives on people helping other people.
Note If you have general questions about Red Hat Linux, try the linux.redhat.misc newsgroup. For specific questions about networking or hardware, try comp.os.linux.networking and comp.os.linux.hardware, respectively.
1.7. What Is Red Hat Linux?
Having directories of software packages floating extraneously around the Internet was not a bad way for hackers to share software. However, for Linux to be acceptable to a less technical population of computer users, it needed to be simple to install and use. Likewise, businesses that were thinking about committing their mission-critical applications to a computer system would want to know that this system had been carefully tested.
To those ends, several companies and organizations began gathering and packaging Linux software together into usable forms called distributions. The main goal of a Linux distribution is to make the hundreds of unrelated software packages that make up Linux work together as a cohesive whole. The most popular distribution is Red Hat Linux.
Red Hat Linux is a commercial product produced by Red Hat Software, Inc. You can walk into a store and buy a boxed set of CDs and manuals. Or you can get Red Hat Linux free by downloading it over the Internet or by installing it from CDs that come with books such as this one. The boxed set provides technical support on installation and an extra CD that contains limited and demo versions of commercially available Linux application packages (such as word processors and database applications). Check the Red Hat Web site (http://www.redhat.com/) for details on what is included with Red Hat products.
1.8. Why Choose Red Hat Linux?
To distinguish themselves from other versions of Linux, each distribution adds some extra features. Because most of the power features are already built-in, most enhancements for a particular distribution exist to make it easier to install, configure, and use Linux. Also, because there are different software packages available to do the same jobs (such as window managers or a particular server type), a distribution can distinguish itself by which packages it chooses to include and feature.
Red Hat Linux has set itself apart from other Linux distributions in these ways:
___ Software packaging - Red Hat Software, Inc. created the Red Hat Package Management (RPM) method of packaging Linux. RPMs allow less technically savvy users to easily install Linux software. With RPM tools, you can install from CD, hard disk, over your LAN, or over the Internet. It’s easy to track which packages are installed or to look at the contents of a package. Because RPM is available to the Linux community, it has become one of the de facto standards for packaging Linux software.
___ Easy installation - The Red Hat Linux installation process provides easy steps for installing Linux. During installation, Red Hat also helps you take the first few steps toward configuring Linux. You can choose which packages to install and how to partition your hard disk. You can even get your desktop GUI ready to go by configuring your video card, user accounts, and even your network.
___ UNIX System V–style run-level scripts - To have your system services (daemon processes) start up and shut down in an organized way, Red Hat Linux uses the UNIX System V mechanism for starting and stopping services. Shell scripts (that are easy to read and change) are contained in subdirectories of /etc. When the run level changes, such as when the system boots up or you change to single-user mode, messages tell you whether each service started correctly or failed to execute properly (a very nice feature!). Chapter 12 describes how to use run-level scripts.
___ Desktop environments (Gnome and KDE) - To make it easier to use Linux, Red Hat Linux is ready to use the Gnome or KDE desktop environments. Gnome is installed by default and offers some nice features that include drag-and-drop protocols and windows that operate like window shades. KDE is another popular desktop manager that includes several tools, such as the KDE Control Center for configuring the desktop and the KOrganizer for managing appointments.
___ Administration tools - There are some helpful configuration tools for setting up some of the trickier tasks in Linux. Several different GUI tools provide a graphical, form-driven interface for configuring networking, users, file systems, and initialization services. Instead of creating obtuse command lines or having to create tricky configuration files, these graphical tools can set up those files automatically.
Note There are advantages and disadvantages of using a GUI-based program to manipulate text-based configuration files. GUI-based configuration tools can lead you through a setup procedure and error-check the information you enter. However, some features can’t be accessed through the GUI, and if something goes wrong, it can be trickier to debug. Also, by adding proprietary interfaces to standard features, different Linux versions start to diverge.
___ Testing - The exact configuration that you get on a Red Hat Linux distribution has been thoroughly tested by experts around the world. On the other hand, when you download Linux over the Internet, you can’t guarantee that what you get will match the system that is on the CD.
1.9. New Features In Red Hat Linux 7.2
While the inclusion of the Linux 2.4 kernel was the major enhancement for version 7.1, Red Hat Linux 7.2 includes new features that span different areas of the operating system. In case you are upgrading from a Red Hat Linux 7.0 or earlier system, I have included descriptions of the Linux 2.4 kernel (which you may be seeing for the first time). Features that appear in Red Hat Linux for the first time in version 7.2 include a new boot manager (GRUB), a new journaling file system (ext3), and a handful of new application packages.
1.9.1. Improvements To Linux 2.4 Kernel
With Red Hat Linux 7.2, Red Hat continues to tune and improve the Linux 2.4 kernel that was added to the distribution in version 7.1. Though many new features and fixes have been added to the Linux 2.4 kernel, the most prominent features are aimed at enterprise computing. The term enterprise computing implies that the computing systems serve a lot of people and are expected to be able to handle high volumes of data reliably.
Here is a list of many of the new features:
___ Enhanced Symetric Multiprocessing - With the Linux development community getting support from major computer hardware vendors such as IBM, Dell Computer, Hewlett-Packard, Silicon Graphics, and Intel, the Linux 2.4 kernel has been enhanced to handle more powerful, multiprocessor computers. The Linux 2.2 kernel could manage up to eight processors. However, it is limited by being able to handle only 1,024 simultaneous threads.
The Linux 2.4 kernel is intended to handle multiple processors more efficiently and effectively than the 2.2 kernel. The 2.4 kernel is designed to be able to scale up at runtime to handle many more threads if necessary.
___ Greater capacity - Besides being able to manage many processors, the Linux 2.4 kernel is made to support more RAM (up to 4GB), more IDE controllers (up to 10), and more network interface cards (up to 16 Ethernet NICs).
___ Networking enhancements - Key networking components have been redesigned to be able to handle the greater system loads in enterprise computing environments. In particular, security features such as firewalls (using the iptables feature) have been built into the kernel. Support for new networking hardware, such as high-speed ATM network adapters, has also been added to the kernel.
___ Improved Universal Serial Bus (USB) support - Though some USB support is included with Red Hat Linux 7, more USB devices are supported in the Linux 2.4 kernel. In Red Hat Linux 7, USB devices are limited to USB mouse support and USB keyboard support. The new kernel supports new USB video camera drivers, printer drivers, and Abstract Control Module drivers.
___ New file system interface - Besides including, and presumably improving, previously supported file-system types such as DOS and Windows file systems (FAT, NTFS, VFAT, and FAT32), several new file-system types have been added. These include the DVD disk file system (UDF), the UNIX NFS file system, and the IRIX XFS (EFS) file system.
In general, the Linux 2.4 kernel enhancements are aimed at helping Red Hat Linux, as well as other Linux distributions, run faster, more efficiently, and more reliably in large-scale computing environments. The new kernel should also help limit the number of Linux kernel variants by including the features in Linux 2.4 that allow the same kernel to work on everything from single-user workstations to enterprise servers that can support thousands of simultaneous transactions.
1.9.2. GRUB Boot Manager
The GRand Unified Bootloader (GRUB) replaces the LInux LOader (LILO) as the default boot manager for Red Hat Linux 7.2. When your computer starts up, the first thing it does is run the boot manager. The boot manager lets you select which operating system to boot (if you have more than one on your computer), and then hands control of the rest of the boot process to the operating system you chose.
GRUB can boot both multiboot and non-multiboot operating systems. Multiboot operating systems let you pass arguments to the operating system when you boot. Non-multiboot systems simply allow you to use a feature called chain-loading, which allows it to simply load another boot loader to start the operating system.
Here are examples of operating systems that GRUB can selectively boot from the same computer:
___ Multiboot Operating Systems - Red Hat Linux, FreeBSD, NetBSD, OpenBSD, and OpenLinux.
___ Non-Multiboot Operating Systems - DOS, OS/2, Windows 95, Windows 98, Windows NT, Windows ME, and Windows 2000.
For multiboot systems, GRUB allows you to pass options to the kernel at boot time. For example, you can identify a hardware device to use a particular driver or override auto-detection of a device. You can also use a configuration file to name and identify the locations of boot images on your computer.
1.9.3. Journaling File System (Ext3)
The default file system for Red Hat Linux has changed from ext2 to ext3 for this release. The ext3 file system is what is referred to as a journaling file system. Journaling file systems are designed to recover quickly from system crashes. Quick recovery makes ext3 an important asset for computers that need to be up all the time. The ext3 file system is really just an ext2 file system with the ability to recover faster after the system goes down. File systems can grow larger and larger with ext3, without accepting a penalty of long file system checks after a crash.
1.9.4. Additional Software Packages
Red Hat Linux can't go from 600 to over 1,200 software packages in a few years' time without having lots of new features spread across the operating system. The following bullet list should give you an idea of some of the new software packages for Red Hat Linux 7.2:
___ alien - Contains programs for converting software packages to different formats.
___ cdlabelgen - Contains tools for printing CD labels.
___ cdrdao - Contains software for duplicating CDs.
___ curl - Contains utility for copying files over the Internet.
___ docbook - Contains tools for creating documents in docbook format.
___ ethereal - Contains utilities for analyzing network traffic.
___ GConf - Contains tools for managing Gnome configuration information.
___ gnucash - Contains tools for managing personal finances.
___ grip - Contains tools for playing and copying music CDs.
___ hotplug - Contains utilities for configuring USB devices.
___ iptraf - Contains tools for monitoring IP traffic.
___ w3m - Contains the w3m utility for browsing the Web in text mode.
___ webalizer - Contains webalizer for analyzing Web server log files.
___ xawtv - Contains the xawtv command that allows you to watch TV on your computer screen.
1.10. The Culture Of Free Software
I would be remiss to not say something about the culture of free software development from which Linux has thrived and will continue to thrive. The copyright for Red Hat Linux is covered under the GNU public license.
That license, which most free software falls under, provides the following:
___ Author rights - The original author retains the rights to his or her software.
___ Free distribution - People can use the GNU software in their own software, changing and redistributing it as they please. They do, however, have to include the source code with their distribution (or make it easily available).
___ Copyright maintained - Even if you were to repackage and resell the software, the original GNU agreement must be maintained with the software. This means that all future recipients of the software must have the opportunity to change the source code, just as you did.
It is important to remember that there is no warranty on GNU software. If something goes wrong, the original developer of the software has no obligation to fix the problem. However, the Linux culture has provided resources for that event. Experts on the Internet can help you iron out your problems, or you can access one of the many Linux newsgroups to read how others have dealt with their problems and to post your own questions about how to fix yours. Chances are that someone will know what to do - maybe even going so far as to provide the software or configuration file you need.
Note The GNU project uses the term free software to describe the software that is covered by the GNU license. On occasion, you may see the term open source software being used to describe software. Though source code availability is part of the GNU license, the GNU project claims that software defined as open source is not the same as free software because it can encompass semi-free programs and even some proprietary programs. See http://www.opensource.org/ for a description of open source software.
1.11. Summary
Linux is a free computer operating system that was created by Linus Torvalds in 1991 and that has grown from contributions from software developers all over the world. Red Hat Linux is a distribution of Linux that packages together the software needed to run Linux and makes it easier to install and run.
Features in Red Hat Linux include a simplified installation procedure, Red Hat Package Management (RPM) tools for managing the software, and easy-to-use Gnome and KDE desktop environments. You can get Red Hat Linux from the Internet, from distributions that come with books such as this one, or from a commercially available boxed set of Red Hat Linux software.
Linux is based on a culture of free exchange of software. Linux’s roots are based in the UNIX operating system. UNIX provided most of the framework that was used to create Linux. That framework came in the form of the POSIX standard, which defined the interfaces a UNIX system needs to support in order to be a UNIX system.
Sabtu, 12 Januari 2008
Langganan:
Postingan (Atom)