A Practical Guide to Red Hat® Linux®: Fedora™ Core and Red Hat Enterprise Linux, Third Edition

Book description

A new edition of this title is available, ISBN-10: 0137142951 ISBN-13: 9780137142958

“Since I’m in an educational environment, I found the content of Sobell’s book to be right on target and very helpful for anyone managing Linux in the enterprise. His style of writing is very clear. He builds up to the chapter exercises, which I find to be relevant to real-world scenarios a user or admin would encounter. An IT/IS student would find this book a valuable complement to their education. The vast amount of information is extremely well balanced and Sobell manages to present the content without complicated asides and meandering prose. This is a ‘must have’ for anyone managing Linux systems in a networked environment or anyone running a Linux server. I would also highly recommend it to an experienced computer user who is moving to the Linux platform.”
—Mary Norbury, IT Director, Barbara Davis Center/University of Colorado at Denver, from a review posted on slashdot.org

“I had the chance to use your UNIX books when I when was in college years ago at Cal Poly San Luis Obispo, CA. I have to say that your books are among the best! They’re quality books that teach the theoretical aspects and applications of the operating system.”
—Benton Chan, IS Engineer

“The book has more than lived up to my expectations from the many reviews I read, even though it targets FC2. I have found something very rare with your book: It doesn’t read like the standard a technical text, it reads more like a story. It’s a pleasure to read and hard to put down. Did I say that?! :-)”
—David Hopkins, Business Process Architect

“Thanks for your work and for the book you wrote. There are really few books that can help people to become more efficient administrators of different workstations. We hope (in Russia) that you will continue bringing us a new level of understanding of Linux/UNIX systems.”
—Anton Petukhov

“Mark Sobell has written a book as approachable as it is authoritative.”
—Jeffrey Bianchine, Advocate, Author, Journalist

“Excellent reference book, well suited for the sysadmin of a Linux cluster, or the owner of a PC contemplating installing a recent stable Linux. Don’t be put off by the daunting heft of the book. Sobell has striven to be as inclusive as possible, in trying to anticipate your system administration needs.”
—Wes Boudville, Inventor

A Practical Guide to Red Hat® Linux® is a brilliant book. Thank you Mark Sobell.”
—C. Pozrikidis, University of California at San Diego

“This book presents the best overview of the Linux operating system that I have found. . . . It should be very helpful and understandable no matter what the reader’s background is: traditional UNIX user, new Linux devotee, or even Windows user. Each topic is presented in a clear, complete fashion and very few assumptions are made about what the reader knows. . . . The book is extremely useful as a reference, as it contains a 70-page glossary of terms and is very well indexed. It is organized in such a way that the reader can focus on simple tasks without having to wade through more advanced topics until they are ready.”
—Cam Marshall, Marshall Information Service LLC, Member of Front Range UNIX Users Group FRUUG, Boulder, Colorado

“Conclusively, this is THE book to get if you are a new Linux user and you just got into RH/Fedora world. There’s no other book that discusses so many different topics and in such depth.”
—Eugenia Loli-Queru, Editor in Chief, OSNews.com

The Best Just Became BETTER—Again! Completely Revised to Meet All Your Fedora Core and Red Hat Enterprise Linux Needs!

Fedora Core and Red Hat Enterprise Linux are advanced operating systems. You need a book that’s just as advanced. This book explains Linux clearly and effectively—with a focus on features you care about, from system security and Internet server setup to Windows file/printer sharing. Best-selling author Mark Sobell starts at the beginning and walks you through everything that matters, from installing Linux using the included DVD to working with GNOME, KDE, Samba, sendmail, Apache, DNS, NIS, and iptables.

This edition contains extensive coverage, including full chapters on using Linux from the command line and GUI; even more thorough system administration and security guidance; and up-to-the-minute, step-by-step instructions for setting up networks and every major type of Internet server. Along the way, you learn the “hows” and the “whys.” Mark Sobell knows every Linux nook and cranny, has taught hundreds of thousands of readers, and never forgets what it’s like to be new to Linux. Whether you are a user, an administrator, or a programmer, this book gives you all you need—and more.

Don’t settle for yesterday’s Linux book...get the ONLY book that meets today’s challenges and tomorrow’s!

Compared with the other Linux books out there, A Practical Guide to Red Hat® Linux®, Third Edition, delivers...

  • Complete coverage of Fedora Core and Red Hat Enterprise Linux

  • Deeper coverage of the command line and the GNOME and KDE GUIs, including GUI customization

  • More practical coverage of file sharing with Samba, NFS, and FTP

  • More detailed, usable coverage of Internet server configuration including Apache, sendmail, NFS, and DNS/BIND

  • More state-of-the-art security techniques, including SELinux (Security Enhanced Linux), ACLs (Access Control Lists), firewall setup using the Red Hat GUI and using iptables, and a full chapter on OpenSSH

  • More and better coverage of “meat-and-potatoes” system/network administration tasks

  • A more practical introduction to writing bash shell scripts

  • Complete instructions on how to keep your Linux system up-to-date using yum

  • And much more...including a 500+ term glossary and a comprehensive index to help you find what you need fast!

  • Includes DVD! Get the full version of Red Hat’s Fedora Core 5 release!


     

    Table of contents

    1. A Practical Guide to Red Hat® Linux®, Third Edition
      1. Praise for A Practical Guide to Red Hat® Linux®, Second Edition
      2. Preface
        1. This Book Includes Fedora Core 5 on a DVD
        2. What Is New in This Edition?
        3. Features of This Book
        4. Key Topics Covered in This Book
          1. Details
        5. Supplements
        6. Thanks
      3. 1. Welcome to Linux
          1. The GNU–Linux Connection
            1. The History of GNU–Linux
              1. Fade to 1983
              2. Next Scene, 1991
            2. The Code Is Free
            3. Have Fun!
          2. The Linux 2.6 Kernel
          3. The Heritage of Linux: UNIX
          4. What Is So Good About Linux?
            1. Why Linux Is Popular with Hardware Companies and Developers
            2. Linux Is Portable
            3. Standards
            4. The C Programming Language
          5. Overview of Linux
            1. Linux Has a Kernel Programming Interface
            2. Linux Can Support Many Users
            3. Linux Can Run Many Tasks
            4. Linux Provides a Secure Hierarchical Filesystem
            5. The Shell: Command Interpreter and Programming Language
              1. Filename Generation
              2. Device-Independent Input and Output
              3. Shell Functions
              4. Job Control
            6. A Large Collection of Useful Utilities
            7. Interprocess Communication
            8. System Administration
          6. Additional Features of Linux
            1. GUIs: Graphical User Interfaces
            2. (Inter)Networking Utilities
            3. Software Development
          7. Conventions Used in This Book
          1. Chapter Summary
          2. Exercises
      4. I. Installing Red Hat Linux
        1. 2. Installation Overview
            1. More Information
            2. Planning the Installation
              1. Considerations
              2. Requirements
              3. Which Are You Installing: Fedora Core or Red Hat Enterprise Linux?
              4. Installing a Fresh Copy or Upgrading an Existing Red Hat System?
              5. Graphical or Textual Installation?
              6. Setting Up the Hard Disk
                1. Primary and Extended Partitions
                2. Partitioning a Disk
                  1. Planning Partitions
                  2. Partition Suggestions
              7. RAID
              8. LVM: Logical Volume Manager
            3. How the Installation Works
            4. The Medium: Where Is the Source Data?
              1. Formats
              2. Sources
                1. CDs or DVD
                2. Hard Disk
                3. Network
            5. Downloading, Burning, and Installing a CD Set or a DVD (FEDORA)
              1. Finding a Site to Download From
              2. Finding the Right Files and Downloading Them
              3. Using BitTorrent to Download the ISO Image Files
              4. Checking the Files
              5. Burning the CDs or DVD
            6. Rescue CD
            7. Gathering Information About the System
            8. Finding the Installation Manual
            1. Chapter Summary
            2. Exercises
            3. Advanced Exercises
        2. 3. Step-by-Step Installation
            1. Installing Red Hat Linux
              1. Booting the System: The boot: Prompt
              2. Boot Parameters
              3. The CD Found Screen
              4. The Anaconda Installer
                1. Using Anaconda
                2. Anaconda Screens
              5. Firstboot: When You Reboot
              6. Initializing Databases and Updating the System
            2. Installation Tasks
              1. Using Disk Druid to Partition the Disk
              2. LVs: Logical Volumes
              3. Using the Kickstart Configurator
              4. parted: Reports on and Partitions a Hard Disk
              5. Setting Up a Dual-Boot System
                1. Creating Free Space on a Windows System
                2. Installing Red Hat Linux as the Second Operating System
            3. The X Window System
              1. system-config-display: Configures the Display
              2. The xorg.conf File
                1. ServerLayout Section
                2. InputDevice Section
                3. Monitor Section
                4. Device Section
                5. Screen Section
                6. Multiple Monitors
              3. gdm: Displays a Graphical Login
                1. Configuring gdm
                2. Using kdm
              4. More Information
            1. Chapter Summary
            2. Exercises
            3. Advanced Exercises
      5. II. Getting Started with Red Hat Linux
        1. 4. Introduction to Red Hat Linux
            1. Curbing Your Power: Superuser/root Access
            2. A Tour of the Red Hat Linux Desktop
              1. Logging In on the System
              2. Getting the Most from the Desktop
                1. The Power of the Desktop: Using the Main Panel
                2. Launching Applications from the Main Menu
                3. Controlling Windows
                  1. Changing the Input Focus (Window Cycling)
                  2. Shading a Window
                  3. Cutting and Pasting Objects Using the Clipboard
                4. Controlling the Desktop Using the Root Window
                5. Running Commands from the Terminal Emulator/Shell
                6. Session Management
              3. Using Konqueror to Manage Files, Run Programs, and Browse the Web
              4. Customizing Your Desktop with the KDE Control Center
              5. Customizing the Main Panel Using the Panel Menu
            3. Getting the Facts: Where to Find Documentation
              1. The KDE Help Center
              2. GNOME Help
              3. man: Displays the System Manual
              4. info: Displays Information About Utilities
              5. The ––help Option
              6. HOWTOs: Finding Out How Things Work
              7. Getting Help with the System
                1. Finding Help Locally
                2. Using the Internet to Get Help
            4. More About Logging In
              1. The Login Screen
              2. What to Do if You Cannot Log In
              3. Logging Out
              4. Using Virtual Consoles
              5. Logging In Remotely: Terminal Emulation and ssh or telnet
              6. Changing Your Password
              7. switchdesk: Changes Your Default Desktop
              8. Logging In on a Terminal
                1. Bringing a GUI Up from a Character-Based Display
                2. Correcting Mistakes
                  1. Erasing a Character
                  2. Deleting a Word
                  3. Deleting a Line
                  4. Aborting Execution
                3. Repeating/Editing Command Lines
            1. Chapter Summary
            2. Exercises
            3. Advanced Exercises
        2. 5. The Linux Utilities
            1. Special Characters
            2. Basic Utilities
              1. ls: Lists the Names of Files
              2. cat: Displays a Text File
              3. rm: Deletes a File
              4. less Is more: Display a Text File One Screen at a Time
              5. hostname: Displays the System Name
            3. Working with Files
              1. cp: Copies a File
              2. mv: Changes the Name of a File
              3. lpr: Prints a File
              4. grep: Searches for a String
              5. head: Displays the Beginning of a File
              6. tail: Displays the End of a File
              7. sort: Displays a File in Order
              8. uniq: Removes Duplicate Lines from a File
              9. diff: Compares Two Files
              10. file: Tests the Contents of a File
            4. | (Pipe): Communicates Between Processes
            5. Four More Utilities
              1. echo: Displays Text
              2. date: Displays the Time and Date
              3. script: Records a Shell Session
              4. unix2dos: Converts Linux and Macintosh Files to Windows Format
            6. Compressing and Archiving Files
              1. bzip2: Compresses a File
              2. bunzip2 and bzcat: Decompress a File
              3. gzip: Compresses a File
              4. tar: Packs and Unpacks Archives
            7. Locating Commands
              1. which and whereis: Locate a Utility
              2. apropos: Searches for a Keyword
              3. locate: Searches for a File
            8. Obtaining User and System Information
              1. who: Lists Users on the System
              2. finger: Lists Users on the System
              3. w: Lists Users on the System
            9. Communicating with Other Users
              1. write: Sends a Message
              2. mesg: Denies or Accepts Messages
            10. Email
            11. Tutorial: Creating and Editing a File with vim
              1. Starting vim
              2. Command and Input Modes
              3. Entering Text
              4. Getting Help
                1. Correcting Text as You Insert It
                2. Moving the Cursor
                3. Deleting Text
                4. Undoing Mistakes
                5. Entering Additional Text
                6. Correcting Text
              5. Ending the Editing Session
              6. The compatible Parameter
            1. Chapter Summary
            2. Exercises
            3. Advanced Exercises
        3. 6. The Linux Filesystem
            1. The Hierarchical Filesystem
            2. Directory Files and Ordinary Files
              1. Filenames
                1. Filename Extensions
                2. Hidden Filenames
              2. The Working Directory
              3. Your Home Directory
                1. Startup Files
            3. Pathnames
              1. Absolute Pathnames
                1. ~ (Tilde) in Pathnames
              2. Relative Pathnames
                1. Significance of the Working Directory
            4. Directory Commands
              1. mkdir: Creates a Directory
                1. cd: Changes to Another Working Directory
                2. The . and .. Directory Entries
              2. Important Standard Directories and Files
            5. Working with Directories
              1. rmdir: Deletes a Directory
              2. Using Pathnames
              3. mv, cp: Move or Copy Files
              4. mv: Moves a Directory
            6. Access Permissions
              1. ls –l: Displays Permissions
              2. chmod: Changes Access Permissions
              3. Setuid and Setgid Permissions
              4. Directory Access Permissions
            7. ACLs: Access Control Lists
              1. Enabling ACLs
              2. Working with Access Rules
              3. Setting Default Rules for a Directory
            8. Links
              1. Symbolic Links
                1. ln: Creates a Symbolic Link
              2. rm: Removes a Link
            1. Chapter Summary
            2. Exercises
            3. Advanced Exercises
        4. 7. The Shell
            1. The Command Line
              1. Syntax
                1. Command Name
                2. Arguments
                  1. Options
              2. Processing the Command Line
              3. Executing the Command Line
              4. Editing the Command Line
            2. Standard Input and Standard Output
              1. The Screen as a File
              2. The Keyboard and Screen as Standard Input and Standard Output
              3. Redirection
                1. Redirecting Standard Output
                2. Redirecting Standard Input
                3. noclobber: Avoids Overwriting Files
                4. Appending Standard Output to a File
                5. /dev/null: Making Data Disappear
              4. Pipes
                1. Filters
                2. tee: Sends Output in Two Directions
            3. Running a Program in the Background
              1. Moving a Job from the Foreground to the Background
              2. kill: Aborting a Background Job
            4. Filename Generation/Pathname Expansion
              1. The ? Special Character
              2. The * Special Character
              3. The [ ] Special Characters
            5. Builtins
            1. Chapter Summary
              1. Utilities and Builtins Introduced in This Chapter
            2. Exercises
            3. Advanced Exercises
      6. III. Digging into Red Hat Linux
        1. 8. Linux Guis: X, Gnome, and KDE
            1. X Window System
              1. Using X
                1. Starting X from a Character-Based Display
                2. Remote Computing and Local Displays
                  1. The DISPLAY Variable
                  2. The –display Option
                  3. Running Multiple X Servers
                3. Stopping the X Server
                4. Remapping Mouse Buttons
              2. Window Managers
                1. KDE and GNOME
                2. GNUStep
            2. Using GNOME
              1. The Nautilus File Manager
                1. Spatial View
                2. Traditional View
                  1. Side Pane
                  2. View Pane
                  3. Control Bars
                3. Features Available from Both Spatial and Traditional Views
                4. Properties
              2. GNOME Utilities
                1. beagle: Desktop Search (FEDORA)
                2. Font Preferences
                3. Pick a Font Window
                4. Pick a Color Window
                5. Run Application Window
                6. GNOME Terminal Emulator/Shell
            3. Using KDE
              1. Konqueror Browser/File Manager
                1. Web Shortcuts
                2. Bookmarks
                3. Menubar
                4. Toolbars
                  1. Main Toolbar
                  2. Extra Toolbar
                  3. Location Toolbar
                  4. Bookmark Toolbar
                5. kfind: Finds Files
                6. More About Views
                  1. Active View Indicator
                  2. Link Indicator
                  3. Lock to Current Location
                7. Shortcuts
                8. Navigation Panel
              2. KDE Utilities
                1. konsole: Terminal Emulator
                2. kcolorchooser: Selects a Color
                3. Run Command
                4. klipper: Clipboard Utility
            1. Chapter Summary
            2. Exercises
            3. Advanced Exercises
        2. 9. The Bourne Again Shell
            1. Background
            2. Shell Basics
              1. Startup Files
                1. Login Shells
                2. Interactive Nonlogin Shells
                3. Noninteractive Shells
                4. Setting Up Startup Files
                5. . (Dot) or source: Runs a Startup File in the Current Shell
              2. Commands That Are Symbols
              3. Redirecting Standard Error
              4. Writing a Simple Shell Script
                1. chmod: Makes a File Executable
                2. #! Specifies a Shell
                3. # Begins a Comment
                4. Running a Shell Script
              5. Separating and Grouping Commands
                1. ; and NEWLINE Separate Commands
                2. \ Continues a Command
                3. | and & Separate Commands and Do Something Else
              6. Job Control
                1. jobs: Lists Jobs
                2. fg: Brings a Job to the Foreground
                3. bg: Sends a Job to the Background
              7. Manipulating the Directory Stack
                1. dirs: Displays the Stack
                2. pushd: Pushes a Directory on the Stack
                3. popd: Pops a Directory Off the Stack
            3. Parameters and Variables
              1. User-Created Variables
                1. unset: Removes a Variable
              2. Variable Attributes
                1. readonly: Makes the Value of a Variable Permanent
                2. declare and typeset: Assign Attributes to Variables
              3. Keyword Variables
                1. HOME: Your Home Directory
                2. PATH: Where the Shell Looks for Programs
                3. MAIL: Where Your Mail Is Kept
                4. PS1: User Prompt (Primary)
                5. PS2: User Prompt (Secondary)
                6. PS3: Menu Prompt
                7. PS4: Debugging Prompt
                8. IFS: Separates Input Fields (Word Splitting)
                9. CDPATH: Broadens the Scope of cd
                10. Keyword Variables: A Summary
            4. Special Characters
            5. Processes
              1. Process Structure
              2. Process Identification
              3. Executing a Command
            6. History
              1. Variables That Control History
              2. Reexecuting and Editing Commands
                1. fc: Displays, Edits, and Reexecutes Commands
                  1. Viewing the History List
                  2. Editing and Reexecuting Previous Commands
                  3. Reexecuting Commands Without Calling the Editor
                2. Using an Exclamation Point (!) to Reference Events
                  1. Event Designators
              3. The Readline Library
                1. vi Editing Mode
                2. emacs Editing Mode
                3. Readline Completion Commands
                  1. Command Completion
                  2. Pathname Completion
                  3. Variable Completion
                4. .inputrc: Configuring Readline
                  1. Variables
                  2. Key Bindings
                  3. Conditional Constructs
            7. Aliases
              1. Single Versus Double Quotation Marks in Aliases
              2. Examples of Aliases
            8. Functions
            9. Controlling bash Features and Options
              1. Command Line Options
              2. Shell Features
                1. set ±o: Turns Shell Features On and Off
                2. shopt: Turns Shell Features On and Off
            10. Processing the Command Line
              1. History Expansion
              2. Alias Substitution
              3. Parsing and Scanning the Command Line
              4. Command Line Expansion
                1. Order of Expansion
                2. Brace Expansion
                3. Tilde Expansion
                4. Parameter and Variable Expansion
                5. Arithmetic Expansion
                6. Command Substitution
                7. Word Splitting
                8. Pathname Expansion
                9. Process Substitution
            1. Chapter Summary
            2. Exercises
            3. Advanced Exercises
        3. 10. Networking and the Internet
            1. Types of Networks and How They Work
              1. Broadcast Networks
              2. Point-to-Point Networks
              3. Switched Networks
              4. LAN: Local Area Network
                1. Ethernet
                2. Wireless
              5. WAN: Wide Area Network
              6. Internetworking Through Gateways and Routers
                1. Firewall
              7. Network Protocols
                1. IP: Internet Protocol
                2. TCP: Transmission Control Protocol
                3. UDP: User Datagram Protocol
                4. PPP: Point-to-Point Protocol
                5. Xremote and LBX
              8. Host Address
                1. Static Versus Dynamic IP Addresses
              9. Hostnames
                1. IPv6
            2. Communicate Over a Network
              1. finger: Displays Information About Remote Users
              2. Sending Mail to a Remote User
              3. Mailing List Servers
            3. Network Utilities
              1. Trusted Hosts
              2. OpenSSH Tools
              3. telnet: Logs In on a Remote System
                1. Using telnet to Connect to Other Ports
              4. ftp: Transfers Files Over a Network
              5. ping: Tests a Network Connection
              6. traceroute: Traces a Route Over the Internet
              7. host and dig: Query Internet Nameservers
              8. jwhois: Looks Up Information About an Internet Site
            4. Distributed Computing
              1. The Client/Server Model
              2. DNS: Domain Name Service
              3. Ports
              4. NIS: Network Information Service
              5. NFS: Network Filesystem
            5. Usenet
            6. WWW: World Wide Web
              1. URL: Uniform Resource Locator
              2. Browsers
              3. Search Engines
            1. Chapter Summary
            2. Exercises
            3. Advanced Exercises
      7. IV. System Administration
        1. 11. System Administration: Core Concepts
            1. System Administrator and Superuser
              1. System Administration Tools
                1. su: Gives You Another User’s Privileges
                2. consolehelper: Runs Programs as root
                3. kill: Sends a Signal to a Process
            2. Rescue Mode
              1. Avoiding a Trojan Horse
              2. Getting Help
            3. SELinux
              1. More Information
              2. config: The SELinux Configuration File
              3. sestatus: Displays the State of SELinux
              4. Setting the Targeted Policy with system-config-securitylevel
            4. System Operation
              1. Booting the System
              2. Init Scripts: Start and Stop System Services
                1. service: Configures Services I
                2. system-config-services: Configures Services II
                  1. Background Services Tab
                  2. On Demand Services Tab
                3. chkconfig: Configures Services III
              3. Single-User Mode
              4. Going to Multiuser Mode
              5. Multiuser/Graphical mode
              6. Logging In
              7. Logging Out
              8. Bringing the System Down
                1. CONTROL-ALT-DEL: Reboots the System
                2. consolehelper: Allows an Ordinary User to Run a Privileged Command
                3. Going to Single-User Mode
                4. Turning the Power Off
              9. Crash
                1. Repairing a Filesystem
                2. When the System Does Not Boot
            5. System Administration Utilities
              1. Red Hat Configuration Tools
              2. Command Line Utilities
            6. Setting Up a Server
              1. Standard Rules in Configuration Files
                1. Specifying Clients
                2. Specifying a Subnet
              2. rpcinfo: Displays Information About portmap
              3. The xinetd Superserver
              4. Securing a Server
                1. TCP Wrappers: Client/Server Security (hosts.allow and hosts.deny)
                2. Setting Up a chroot Jail
                  1. Using chroot
                  2. Running a Service in a chroot Jail
                  3. Security Considerations
              5. DHCP: Configures Hosts
                1. More Information
                2. How DHCP Works
                3. DHCP Client
                  1. Prerequisites
                  2. dhclient: The DHCP Client
                4. DHCP Server
                  1. Prerequisites
                  2. dhcpd: The DHCP Daemon
                  3. Static IP Addresses
            7. nsswitch.conf: Which Service to Look at First
              1. How nsswitch.conf Works
                1. Information
                2. Methods
                3. Search Order
                4. Action Items
                5. compat Method: ± in passwd, group, and shadow Files
            8. PAM
              1. More Information
              2. Configuration Files, Module Types, and Control Flags
              3. Example
              4. Modifying the PAM Configuration
            1. Chapter Summary
            2. Exercises
            3. Advanced Exercises
        2. 12. Files, Directories, and Filesystems
            1. Important Files and Directories
            2. File Types
              1. Ordinary Files, Directories, Links, and Inodes
              2. Special Files
                1. FIFO Special File (Named Pipe)
                2. Sockets
                3. Major and Minor Device Numbers
                4. Block and Character Devices
                5. Raw Devices
            3. Filesystems
              1. mount: Mounts a Filesystem
                1. Mount Options
                2. Mounting a Linux Floppy Diskette
              2. umount: Unmounts a Filesystem
              3. fstab: Keeps Track of Filesystems
              4. fsck: Checks Filesystem Integrity
              5. tune2fs: Changes Filesystem Parameters
              6. RAID Filesystem
            1. Chapter Summary
            2. Exercises
            3. Advanced Exercises
        3. 13. Downloading and Installing Software
            1. yum: Keeps the System Up-to-Date (FEDORA)
              1. Configuring yum
              2. Using yum to Update, Install, and Remove Packages
              3. yum Groups
              4. Other yum Commands
              5. Running yum Automatically
              6. Upgrading a System with yum
              7. Downloading rpm Package Files with yumdownloader
            2. pirut: Adds and Removes Software Packages (FEDORA)
            3. BitTorrent (FEDORA)
              1. Prerequisites
              2. Using BitTorrent
            4. rpm: Red Hat Package Manager
              1. Querying Packages and Files
              2. Installing, Upgrading, and Removing Packages
              3. Installing a Linux Kernel Binary
            5. Installing Non-rpm Software
              1. The /opt and /usr/local Directories
              2. GNU Configure and Build System
            6. Keeping Software Up-to-Date
              1. Bugs
              2. Errata
              3. up2date: Keeps Software Up-to-Date (RHEL)
                1. up2date-config: Configures up2date
                2. Red Hat Network Alert Notification Tool
              4. Red Hat Network (RHEL)
                1. Subscribing to Red Hat Network (RHEL)
                2. rhnsd: RHN Daemon
            7. wget: Downloads Files Noninteractively
            1. Chapter Summary
            2. Exercises
            3. Advanced Exercises
        4. 14. Printing with CUPS
            1. Introduction
              1. Prerequisites
              2. More Information
              3. Notes
            2. JumpStart I: Configuring a Local Printer Using system-config-printer
            3. JumpStart II: Configuring a Remote Printer Using CUPS
            4. Traditional UNIX Printing
            5. Configuring Printers Using CUPS
              1. The CUPS Web Interface
                1. Setting Up and Modifying a Printer
                2. Jobs
                3. Classes
              2. CUPS on the Command Line
                1. lpinfo: Displays Available Drivers
                2. lpadmin: Configures Printers
                  1. Adding or Modifying a Printer
                  2. Example lpadmin Commands
                3. Printing Quotas
                4. Managing Print Queues
              3. Sharing CUPS Printers
            6. The KDE Printing Manager
            7. Integration with Windows
              1. Printing from Windows
              2. Printing to Windows
            1. Chapter Summary
            2. Exercises
            3. Advanced Exercises
        5. 15. Rebuilding the Linux Kernel
            1. Preparing the Source Code
              1. Locating the Source Code
              2. Installing the Source Code
            2. Read the Documentation
            3. Configuring and Compiling the Linux Kernel
              1. Cleaning the Source Tree
              2. Configuring the Linux Kernel
                1. EXTRAVERSION Number
              3. Compiling the Linux Kernel
              4. Using Loadable Kernel Modules
            4. Installing the Kernel and Associated Files
            5. Rebooting
            6. Boot Loader
              1. grub: The Linux Loader
              2. LOADLIN: A DOS-Based Linux Loader
            7. dmesg: Displays Kernel Messages
            1. Chapter Summary
            2. Exercises
            3. Advanced Exercises
        6. 16. Administration Tasks
            1. Configuring User and Group Accounts
              1. system-config-users: Manages User Accounts
              2. useradd: Adds a User Account
              3. userdel: Removes a User Account
              4. groupadd: Adds a Group
            2. Backing Up Files
              1. Choosing a Backup Medium
              2. Backup Utilities
                1. tar: Archives Files
                2. cpio: Archives Files
              3. Performing a Simple Backup
              4. dump, restore: Back Up and Restore Filesystems
            3. Scheduling Tasks
              1. crond and crontab: Schedule Routine Tasks
              2. at: Runs Occasional Tasks
              3. kcron: Schedules Tasks
            4. System Reports
              1. vmstat: Reports Virtual Memory Statistics
              2. top: Lists Processes Using the Most Resources
            5. Keeping Users Informed
            6. Creating Problems
              1. Failing to Perform Regular Backups
              2. Not Reading and Following Instructions
              3. Failing to Ask for Help When Instructions Are Not Clear
              4. Deleting or Mistyping a Critical File
            7. Solving Problems
              1. Helping When a User Cannot Log In
              2. Speeding Up the System
              3. lsof: Finds Open Files
              4. Keeping a Machine Log
              5. Keeping the System Secure
              6. Log Files and Mail for root
              7. Monitoring Disk Usage
              8. logrotate: Manages Log Files
              9. Removing Unused Space from Directories
              10. syslogd: Logs System Messages
            1. Chapter Summary
            2. Exercises
            3. Advanced Exercises
        7. 17. Configuring a LAN
            1. Setting Up the Hardware
              1. Connecting the Computers
              2. Gateways and Routers
              3. NIC: Network Interface Card
            2. Configuring the Systems
              1. system-config-network: Configures the Hardware
              2. iwconfig: Configures a Wireless NIC
            3. Setting Up Servers
            4. More Information
            1. Chapter Summary
            2. Exercises
            3. Advanced Exercises
      8. V. Using Clients and Setting Up Servers
        1. 18. OpenSSH: Secure Network Communication
            1. Introduction
            2. About OpenSSH
              1. Files
                1. /etc/ssh: Global Files
                2. ~/.ssh: User Files
              2. How OpenSSH Works
              3. More Information
            3. OpenSSH Clients
              1. Prerequisites
              2. JumpStart: Using ssh and scp
              3. Setup
                1. Recommended Settings
                2. Server Authentication/Known Hosts
              4. ssh: Connects to or Executes Commands on a Remote System
                1. Options
              5. scp: Copies Files from/to a Remote System
                1. Options
              6. sftp: A Secure FTP Client
              7. ~/.ssh/config and /etc/ssh/ssh_config Configuration Files
            4. sshd: OpenSSH Server
              1. Prerequisites
              2. Notes
              3. JumpStart: Starting the sshd Daemon
                1. Recommended Settings
                2. Starting sshd for the First Time
              4. Authorized Keys: Automatic Login
              5. Command Line Options
              6. /etc/ssh/sshd_config Configuration File
            5. Troubleshooting
            6. Tunneling/Port Forwarding
            1. Chapter Summary
            2. Exercises
            3. Advanced Exercises
        2. 19. FTP: Transferring Files Across a Network
            1. Introduction
            2. More Information
            3. FTP Client
              1. Prerequisites
              2. JumpStart: Downloading Files Using ftp
                1. Basic Commands
                2. Tutorial Session
              3. Notes
              4. Anonymous FTP
              5. Automatic Login
              6. Binary Versus ASCII Transfer Mode
              7. ftp Specifics
                1. Format
                2. Command Line Options
                3. ftp Commands
                  1. Shell Command
                  2. Transfer Files
                  3. Status
                  4. Directories
                  5. Files
                  6. Display Information
            4. FTP Server (vsftpd)
              1. Prerequisites
              2. Notes
              3. JumpStart: Starting a vsftpd Server
              4. Testing the Setup
              5. vsftpd.conf: The vsftpd Configuration File
                1. Stand-Alone Mode
                2. Logging In
                  1. Local Users
                  2. Anonymous Users
                3. Working Directory and the chroot Jail
                4. Downloading and Uploading Files
                  1. Download/Upload for Local Users
                  2. Anonymous Users
                5. Messages
                6. Display
                7. Logs
                8. Connection Parameters
                  1. Passive (PASV) Connections
                  2. Active (PORT) Connections
                  3. Timeouts
                9. Miscellaneous
                10. Files
            1. Chapter Summary
            2. Exercises
            3. Advanced Exercises
        3. 20. sendmail: Setting Up Mail Clients, Servers, and More
            1. Introduction
              1. Prerequisites
              2. Notes
              3. More Information
            2. JumpStart I: Configuring sendmail on a Client
            3. JumpStart II: Configuring sendmail on a Server
            4. How sendmail Works
              1. Mail logs
              2. Aliases and Forwarding
              3. Related Programs
            5. Configuring sendmail
              1. The sendmail.mc and sendmail.cf Files
                1. Editing sendmail.mc and Generating sendmail.cf
                2. About sendmail.mc
                3. Masquerading
                4. Accepting Email from Unknown Hosts
                5. Setting Up a Backup Server
              2. Other Files in /etc/mail
                1. mailertable: Forwards Email from One Domain to Another
                2. access: Sets Up a Relay Host
                3. virtusertable: Serves Email to Multiple Domains
            6. Additional Email Tools
              1. SpamAssassin
                1. Using SpamAssassin with a Mail Server
                2. Using SpamAssassin with a Mail Client
              2. Webmail
              3. Mailing Lists
              4. Setting Up an IMAP or POP3 Server
              5. Setting Up KMail
            7. Authenticated Relaying
              1. Creating a Self-Signed Certificate for sendmail
              2. Enabling SSL in sendmail
              3. Enabling SSL in the Mail Client
            8. Alternatives to sendmail
            1. Chapter Summary
            2. Exercises
            3. Advanced Exercises
        4. 21. NIS: Network Information Service
            1. Introduction to NIS
            2. How NIS Works
              1. More Information
            3. Setting Up an NIS Client
              1. Prerequisites
              2. Notes
              3. Step-by-Step Setup
                1. Specifying the System’s NIS Domain Name
                2. Edit /etc/yp.conf to Specify an NIS Server
                3. Start ypbind
              4. Testing the Setup
              5. yppasswd: Changes NIS Passwords
                1. passwd versus yppasswd
                2. Modifying User Information
                3. Adding and Removing Users
            4. Setting Up an NIS Server
              1. Prerequisites
              2. Notes
              3. Step-by-Step Setup
                1. Specify the System’s NIS Domain Name
                2. Edit /etc/ypserv.conf to Configure the NIS Server
                  1. Options
                  2. Access Rules
                3. Create /var/yp/securenets to Enhance Security
                4. Edit /var/yp/Makefile to Specify Maps
                  1. Variables
                  2. File Locations
                  3. The all: Target
                5. Start the Servers
                6. ypinit: Builds or Imports the Maps
              4. Testing
              5. yppasswdd: The NIS Password Update Daemon
                1. Start yppasswdd
                2. Allow GECOS and Login Shell Modification
            1. Chapter Summary
            2. Exercises
            3. Advanced Exercises
        5. 22. NFS: Sharing Filesystems
            1. Introduction
            2. More Information
            3. Setting Up an NFS Client
              1. Prerequisites
              2. JumpStart: Mounting a Remote Directory Hierarchy
                1. mount: Mounts a Remote Directory Hierarchy
                2. umount: Unmounts a Remote Directory Hierarchy
              3. mount: Mounts a Directory Hierarchy
                1. Attribute Caching
                2. Error Handling
                3. Miscellaneous Options
              4. Improving Performance
              5. /etc/fstab: Mounts Directory Hierarchies Automatically
            4. Setting Up an NFS Server
              1. Prerequisites
              2. Notes
              3. JumpStart: Configuring an NFS Server Using system-config-nfs
              4. Exporting a Directory Hierarchy
                1. /etc/exports: Holds a List of Exported Directory Hierarchies
                2. General Options
                3. User ID Mapping Options
                4. showmount: Displays NFS Status Information
              5. exportfs: Maintains the List of Exported Directory Hierarchies
                1. Options
              6. Testing the Server Setup
            5. automount: Automatically Mounts Directory Hierarchies
              1. Prerequisites
              2. More Information
              3. autofs: Automatically Mounted Directory Hierarchies
            1. Chapter Summary
            2. Exercises
            3. Advanced Exercises
        6. 23. Samba: Integrating Linux and Windows
            1. Introduction
            2. About Samba
              1. Prerequisites
              2. More Information
              3. Notes
              4. Samba Users, User Maps, and Passwords
            3. JumpStart: Configuring a Samba Server Using system-config-samba
            4. swat: Configures a Samba Server
            5. Manually Configuring a Samba Server
              1. Parameters in the smbd.conf File
                1. Global Parameters
                2. Security Parameters
                3. Logging Parameters
                4. Browser Parameters
                5. Communication Parameters
                6. Share Parameters
              2. The [homes] Share: Sharing Users’ Home Directories
            6. Accessing Linux Shares from Windows
              1. Browsing Shares
              2. Mapping a Share
            7. Accessing Windows Shares from Linux
              1. smbtree: Displays Windows Shares
              2. smbclient: Connects to Windows Shares
              3. Browsing Windows Networks
              4. Mounting Windows Shares
            8. Troubleshooting
            1. Chapter Summary
            2. Exercises
            3. Advanced Exercises
        7. 24. DNS/BIND: Tracking Domain Names and Addresses
            1. Introduction to DNS
              1. Nodes, Domains, and Subdomains
              2. Zones
              3. Queries
              4. Servers
              5. Resource Records
              6. DNS Query and Response
              7. Reverse Name Resolution
            2. About DNS
              1. How DNS Works
              2. Prerequisites
              3. More Information
              4. Notes
            3. JumpStart I: Setting Up a DNS Cache
            4. JumpStart II: Setting Up a Domain Using system-config-bind (FEDORA)
              1. Notes
              2. Using the BIND Configuration GUI Window
              3. Setting Up a Domain Server
              4. Adding Resource Records
            5. Setting Up BIND
              1. named.conf: The named Configuration File
                1. IP-list
                2. Comments
                3. Options Section
                4. Zone Section
              2. Zone Files
                1. Time Formats
                2. Domain Qualification
                3. Zone Name
                4. Zone File Directives
              3. A DNS Cache
                1. named.caching-nameserver.conf: The named Configuration File (FEDORA)
                2. named.rfc1912.zones: The Zone Configuration File (FEDORA)
                  1. Zone Files
                3. The named.conf Configuration File (RHEL)
              4. DNS Glue Records
              5. TSIGs: Transaction Signatures
                1. Creating a Secret Key
                2. Using the Shared Secret
              6. Running BIND in a chroot Jail
            6. Troubleshooting
            7. A Full-Functioned Nameserver
            8. A Slave Server
            9. A Split Horizon Server
            1. Chapter Summary
            2. Exercises
            3. Advanced Exercises
        8. 25. iptables: Setting Up a Firewall
            1. How iptables Works
            2. About iptables
              1. More Information
              2. Prerequisites
              3. Notes
            3. JumpStart: Building a Firewall Using system-config-securitylevel
            4. Anatomy of an iptables Command
            5. Building a Set of Rules
              1. Commands
              2. Packet Match Criteria
              3. Display Criteria
              4. Match Extensions
                1. Implicit Match Extensions
                  1. TCP
                  2. UDP
                  3. ICMP
                2. Explicit Match Extensions
                  1. State
              5. Targets
              6. Copying Rules to and from the Kernel
            6. system-config-securitylevel: Generates a Set of Rules
            7. Sharing an Internet Connection Using NAT
              1. Connecting Several Clients to a Single Internet Connection
              2. Connecting Several Servers to a Single Internet Connection
            1. Chapter Summary
            2. Exercises
            3. Advanced Exercises
        9. 26. Apache (httpd): Setting Up a Web Server
            1. Introduction
            2. About Apache
              1. Prerequisites
              2. More Information
              3. Notes
            3. JumpStart I: Getting Apache Up and Running
              1. Modifying the httpd.conf Configuration File
              2. Testing Apache
              3. Putting Your Content in Place
            4. JumpStart II: Setting Up Apache Using system-config-httpd
            5. Filesystem Layout
            6. Configuration Directives
              1. Directives I: Directives You May Want to Modify as You Get Started
              2. Contexts and Containers
                1. Contexts
                2. Containers
              3. Directives II: Advanced Directives
                1. Directives That Control Processes
                2. Networking Directives
                3. Logging Directives
                4. Directives That Control Content
                5. Configuration Directives
                6. Security Directives
            7. The Red Hat httpd.conf File
              1. Section 1: Global Environment
              2. Section 2: Main Server Configuration
              3. Section 3: Virtual Hosts
            8. Redirects
            9. Multiviews
            10. Server-Generated Directory Listings (Indexing)
            11. Virtual Hosts
            12. Troubleshooting
            13. Modules
              1. Module List
              2. mod_cgi and CGI Scripts
              3. mod_ssl
                1. Setting Up mod_ssl
                2. Using a Self-Signed Certificate for Encryption
                3. Notes on Certificates
              4. Authentication Modules and .htaccess
              5. Scripting Modules
            14. webalizer: Analyzes Web Traffic
            15. MRTG: Monitors Traffic Loads
            16. Error Codes
            1. Chapter Summary
            2. Exercises
            3. Advanced Exercises
      9. VI. Programming
        1. 27. Programming Tools
            1. Programming in C
              1. Checking Your Compiler
              2. A C Programming Example
              3. Compiling and Linking a C Program
            2. Using Shared Libraries
              1. Fixing Broken Binaries
              2. Creating Shared Libraries
            3. make: Keeps a Set of Programs Current
              1. Implied Dependencies
            4. Debugging C Programs
              1. gcc Compiler Warning Options
              2. Symbolic Debuggers
                1. gdb: Symbolic Debugger
                2. Graphical Symbolic Debuggers
            5. Threads
            6. System Calls
              1. strace: Traces System Calls
              2. Controlling Processes
              3. Accessing the Filesystem
            7. Source Code Management
              1. CVS: Concurrent Versions System
                1. Builtin CVS Help
                2. How CVS Stores Revision Files
                3. Basic CVS Commands
                  1. Checking Out Files from the Source Repository
                  2. Making Your Changes Available to Others
                  3. Updating Your Copies with Changes by Others
                  4. Adding New Files to the Repository
                  5. Removing Files from the Repository
                4. Other CVS Commands
                  1. Tagging a Release
                  2. Extracting a Release
                  3. Removing Working Files
                5. Adding a Module to the Repository
                6. CVS Administration
                7. Using TkCVS
            1. Chapter Summary
            2. Exercises
            3. Advanced Exercises
        2. 28. Programming the Bourne Again Shell
            1. Control Structures
              1. if...then
              2. if...then...else
              3. if...then...elif
                1. Debugging Shell Scripts
              4. for...in
              5. for
              6. while
              7. until
              8. break and continue
              9. case
              10. select
              11. Here Document
            2. File Descriptors
            3. Parameters and Variables
              1. Array Variables
              2. Locality of Variables
                1. Functions
              3. Special Parameters
                1. $$: PID Number
                2. $?: Exit Status
              4. Positional Parameters
                1. $#: Number of Command Line Arguments
                2. $0: Name of the Calling Program
                3. $1–$n: Command Line Arguments
                4. shift: Promotes Command Line Arguments
                5. set: Initializes Command Line Arguments
              5. Expanding Null and Unset Variables
                1. :– Uses a Default Value
                2. := Assigns a Default Value
                3. :? Displays an Error Message
            4. Builtin Commands
              1. type: Displays Information About a Command
              2. read: Accepts User Input
              3. exec: Executes a Command
              4. trap: Catches a Signal
              5. kill: Aborts a Process
              6. getopts: Parses Options
              7. A Partial List of Builtins
            5. Expressions
              1. Arithmetic Evaluation
              2. Logical Evaluation (Conditional Expressions)
              3. String Pattern Matching
              4. Operators
            6. Shell Programs
              1. A Recursive Shell Script
              2. The quiz Shell Script
            1. Chapter Summary
            2. Exercises
            3. Advanced Exercises
      10. VII. Appendixes
        1. A. Regular Expressions
            1. Characters
            2. Delimiters
            3. Simple Strings
            4. Special Characters
              1. Periods
              2. Brackets
              3. Asterisks
              4. Carets and Dollar Signs
              5. Quoting Special Characters
            5. Rules
              1. Longest Match Possible
              2. Empty Regular Expressions
            6. Bracketing Expressions
            7. The Replacement String
              1. Ampersand
              2. Quoted Digit
            8. Extended Regular Expressions
            1. Appendix Summary
        2. B. Help
            1. Solving a Problem
            2. Finding Linux-Related Information
              1. Documentation
              2. Useful Linux Sites
              3. Linux Newsgroups
              4. Mailing Lists
              5. Words
              6. Software
              7. Office Suites and Word Processors
            3. Specifying a Terminal
        3. C. Security
            1. Encryption
              1. Public Key Encryption
              2. Symmetric Key Encryption
              3. Encryption Implementation
              4. GnuPG/PGP
            2. File Security
            3. Email Security
              1. MTAs (Mail Transfer Agents)
              2. MUAs (Mail User Agents)
            4. Network Security
              1. Network Security Solutions
              2. Network Security Guidelines
            5. Host Security
              1. Login Security
              2. Remote Access Security
              3. Viruses and Worms
              4. Physical Security
            6. Security Resources
            1. Appendix Summary
        4. D. The Free Software Definition
        5. E. The Linux 2.6 Kernel
            1. Native Posix Thread Library (NPTL)
            2. IPSecurity (IPSec)
            3. Asynchronous I/O (AIO)
            4. 0(1) Scheduler
            5. OProfile
            6. kksymoops
            7. Reverse Map Virtual Memory (RMAP VM)
            8. HugeTLBFS: Translation Look-Aside Buffer Filesystem
            9. remap_file_pages
            10. 2.6 Network Stack Features (IGMPv3, IPv6, and Others)
            11. Internet Protocol Virtual Server (IPVS)
            12. Access Control Lists (ACLs)
            13. 4GB-4GB Memory Split: Physical Address Extension (PAE)
            14. Scheduler Support for HyperThreaded CPUs
            15. Block I/O (BIO) Block Layer
            16. Support for Filesystems Larger Than 2 Terabytes
            17. New I/O Elevators
            18. Interactive Scheduler Response Tuning
      11. Glossary

    Product information

    • Title: A Practical Guide to Red Hat® Linux®: Fedora™ Core and Red Hat Enterprise Linux, Third Edition
    • Author(s): Mark G. Sobell
    • Release date: June 2006
    • Publisher(s): Prentice Hall
    • ISBN: 9780132280273