Red Hat Enterprise Linux 5 Administration - Unleashed

618 509 2
Red Hat Enterprise Linux 5 Administration - Unleashed

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Red HatEnterprise Linux5 Administration UNLEASHED 800 East 96th Street, Indianapolis, Indiana 46240 USA Tammy Fox Red Hat Enterprise Linux 5 Administration Unleashed Copyright  2007 by Sams Publishing All rights reserved. No part of this book shall be reproduced, stored in a retrieval system, or transmitted by any means, electronic, mechanical, photocopying, recording, or otherwise, without written permission from the publisher. No patent liability is assumed with respect to the use of the information contained herein. Although every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions. Nor is any liability assumed for damages resulting from the use of the information contained herein. ISBN-10: 0-672-32892-5 ISBN-13: 978-0-6723-2892-3 Library of Congress Catalog Card Number: 2005910113 Printed in the United States of America First Printing: April 2007 10090807 4321 Trademarks All terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized. Sams Publishing cannot attest to the accuracy of this information. Use of a term in this book should not be regarded as affecting the validity of any trademark or service mark. Warning and Disclaimer Every effort has been made to make this book as complete and as accurate as possi- ble, but no warranty or fitness is implied. The information provided is on an “as is” basis. The author and the publisher shall have neither liability nor responsibility to any person or entity with respect to any loss or damages arising from the information contained in this book. Bulk Sales Sams Publishing offers excellent discounts on this book when ordered in quantity for bulk purchases or special sales. For more information, please contact U.S. Corporate and Government Sales 1-800-382-3419 corpsales@pearsontechgroup.com For sales outside of the U.S., please contact International Sales international@pearsoned.com Acquisitions Editor Mark Taber Development Editor Songlin Qiu Managing Editor Patrick Kanouse Senior Project Editor San Dee Phillips Copy Editor Katherin Bidwell Indexer Ken Johnson Proofreader Paula Lowell Technical Editor Brock Organ Publishing Coordinator Vanessa Evans Book Designer Gary Adair Page Layout TnT Design, Inc. Contents at a Glance Introduction . 1 Part I: Installation and Configuration 7 1 Installing Red Hat Enterprise Linux . 9 2 Post-Installation Configuration 57 3 Operating System Updates . 79 Part II: Operating System Core Concepts 97 4 Understanding Linux Concepts 99 5 Working with RPM Software . 125 6 Analyzing Hardware 151 7 Managing Storage . 167 8 64-Bit, Multi-Core, and Hyper-Threading Technology Processors 195 Part III: System Administration 203 9 Managing Users and Groups . 205 10 Techniques for Backup and Recovery . 221 11 Automating Tasks with Scripts 239 Part IV: Network Services 253 12 Identity Management 255 13 Network File Sharing . 293 14 Granting Network Connectivity with DHCP . 319 15 Creating a Web Server with the Apache HTTP Server 327 16 Hostname Resolution with BIND 339 17 Securing Remote Logins with OpenSSH 355 18 Setting Up an Email Server with Sendmail 367 19 Explaining Other Common Network Services 379 Part V: Monitoring and Tuning 401 20 Monitoring System Resources . 403 21 Monitoring and Tuning the Kernel 423 22 Monitoring and Tuning Applications . 449 Part VI: Security 461 23 Protecting Against Intruders with Security-Enhanced Linux . 463 24 Configuring a Firewall . 477 25 Linux Auditing System 505 Appendixes 523 A Installing Proprietary Kernel Modules 525 B Creating Virtual Machines . 529 C Preventing Security Breaches with ExecShield 547 D Troubleshooting . 551 Index . 559 Table of Contents Introduction 1 Part I Installation and Configuration 7 1 Installing Red Hat Enterprise Linux 9 Choosing an Installation Method . 9 Creating the Installation Source 11 Creating the Installation CDs . 11 Creating a Boot Disc . 12 Using the ISO Files . 13 Adding Updates to Installation Media or Source 14 Starting the Installation 15 Starting a CD Installation 15 Starting a Network or Hard Drive Installation 16 Starting a Kickstart or PXE Installation . 17 Performing the Installation 17 Deciding on a Partitioning Method and Type 23 Installing with Kickstart 30 Creating the Kickstart File 31 Making the Kickstart File Accessible . 47 Starting the Kickstart Installation 49 Installing with PXE 51 Configuring the tftp Server 52 Configuring the DHCP Server . 55 Starting the PXE Network Installation 55 Performing an Upgrade . 55 Red Hat Network Provisioning . 56 Summary 56 2 Post-Installation Configuration 57 Red Hat Setup Agent . 57 Logging In for the First Time 64 Network Configuration . 65 Network Configuration Files 65 Starting and Stopping the Network 68 Printer Configuration . 69 Adding a Printer . 69 Adding a Printer Class . 72 Setting the Default Printer . 74 Administering Remotely 74 Adding Boot Parameters 76 GRUB . 76 ELILO . 77 OS/400 . 77 YABOOT . 77 z/IPL 78 Summary 78 3 Operating System Updates 79 Navigating Through the RHN Website . 80 Assigning Users for the RHN Website . 81 Subscribing to RHN Channels 82 Performing Actions on Individual Systems from the RHN Website 82 Using System Groups on the RHN Website . 83 Performing Actions on a System Group 83 Granting Users Access to Specific Systems . 85 Retrieving Software from RHN with YUM . 85 What Is YUM? . 86 Managing Software with YUM 87 Summary 95 Part II Operating System Core Concepts 97 4 Understanding Linux Concepts 99 Learning the Desktop . 99 Filesystem Hierarchy System . 102 Shell Basics 103 Navigating the Filesystem 104 Finding Files 107 Finding Commands 108 Reading Text Files . 109 Starting Applications . 109 Becoming the Root User 110 Manual Pages . 111 Editing Text Files 112 Vi Editor . 113 Emacs Editor 114 File Permissions 116 Initialization Scripts 119 Runlevels 120 Changing the Default Runlevel . 120 Red Hat Enterprise Linux 5 Administration Unleashed vi Configuring the Runlevels 121 Service Configuration Tool . 122 Summary 123 5 Working with RPM Software 125 Understanding How RPM Works . 125 Finding the Software . 127 Installing Software 127 Installing a New Kernel 130 Updating Software 131 Removing Software . 132 Verifying Software Files . 133 Querying Package Files 134 Building RPM Packages 135 Setting Up the Build Environment . 136 Creating the Spec File 137 Creating the Makefile 143 Creating the Source Tarball . 143 Building the Package . 144 Signing the Package 145 Testing the Package . 148 Summary 149 6 Analyzing Hardware 151 Listing Devices . 152 Listing PCI Devices . 152 Listing USB Devices . 154 Listing Storage Devices 156 Detecting Hardware 157 Detecting Hardware with Kudzu 157 Detecting Hardware with ddcprobe 158 Gathering Information from the BIOS 159 Querying the BIOS 160 Querying the SMBIOS or DMI . 160 Querying Vendor-Specific Data . 163 Listing and Configuring Kernel Modules 163 HAL . 165 Summary 166 7 Managing Storage 167 Understanding Partitioning 167 Creating Partitions 169 Creating a Filesystem on a Partition . 170 Contents vii Labeling the Partition 170 Creating a Mount Point . 170 Resizing Partitions 171 Removing Partitions 171 Understanding LVM 171 Adding Additional Disk Space . 172 Creating a Physical Volume 173 Creating and Modifying Volume Groups 174 Creating and Modifying Logical Volumes . 174 Creating Snapshots . 178 Understanding RAID . 179 Setting Up RAID Devices 180 Adding and Failing RAID Partitions . 181 Monitoring RAID Devices . 182 Using MD Multipath . 184 Understanding Clustering and GFS 185 Using Access Control Lists . 185 Enabling ACLs . 186 Setting and Modifying ACLs . 186 Removing ACLs 189 Preserving ACLs . 189 Using Disk Quotas 189 Enabling Quotas . 190 Setting and Modifying Quotas 191 Displaying Quotas 193 Summary 193 8 64-Bit, Multi-Core, and Hyper-Threading Technology Processors 195 64-Bit Processors 195 Multi-Core Processors 197 Processors with Hyper-Threading Technology 200 Summary 202 Part III System Administration 203 9 Managing Users and Groups 205 What Are Users and Groups? 206 Managing Users . 206 Adding and Modifying Users 206 Deleting Users 208 Configuring via the Command Line 208 Managing Groups . 211 Adding and Modifying Groups 212 Deleting Groups . 213 Configuring via the Command Line 213 Red Hat Enterprise Linux 5 Administration Unleashed viii How It All Works 214 Best Practices . 216 Managing Usernames 217 Managing Passwords . 217 Deleting Accounts 218 Structuring Home Directories 218 Summary 219 10 Techniques for Backup and Recovery 221 Writing a Backup Plan . 222 What Data to Back Up . 222 Incremental Versus Full Backups . 223 Using Amanda for Backups 223 Setting up the Amanda Server . 223 Setting Up the Amanda Clients . 227 Executing the Backup 230 Restoring from Backup 232 Other Linux Backup Utilities 232 The tar Utility 232 The rsync Utility 233 Recovery and Repair . 234 Rescue Mode 235 Single-User Mode 236 Emergency Mode 237 Filesystem Repair 237 Boot Loader Repair 237 Summary 238 11 Automating Tasks with Scripts 239 Writing Scripts with Bash . 239 Executing Commands in a Bash Script . 240 Variables . 242 Running the Script 243 Conditionals 244 Loops . 245 Additional Scripting Languages . 247 Writing Scripts with Python . 247 Writing Scripts with Perl 247 Writing Scripts with Sed . 248 Writing Scripts with Awk . 249 Scheduling Tasks with Cron . 249 Summary 252 Contents ix [...]... production-ready software Each release of Red Hat Enterprise Linux is based on a Fedora operating system release The kernel and all of the other software in Red Hat Enterprise Linux are specifically configured and tested for enterprise- level usage Both Red Hat Enterprise Linux and Fedora are based on open source software developed by the open source community, some of whom are members of the Red Hat engineering... manager During her time in documentation, she created a new manual, the Red Hat Linux Customization Guide, which eventually became the Red Hat Enterprise Linux System Administration Guide She also wrote and contributed to the Red Hat configuration tools, including writing Red Hat Logviewer Before joining Red Hat, Tammy co-wrote and taught Linux integration and performance classes for a leading computer manufacturer...x Red Hat Enterprise Linux 5 Administration Unleashed Part IV Network Services 253 12 Identity Management 255 Understanding PAM 255 Enabling NIS 257 NIS and SELinux 257 Allowing... procedures and user management policies so that they are scalable 2 Red Hat Enterprise Linux 5 Administration Unleashed for future growth It also provides details about the new features of Red Hat Enterprise Linux 5 including Virtualization for setting up virtual machines in which multiple operating systems are run on the same physical hardware, Security-Enhanced Linux and ExecShield for protecting against... recover from a system failure Step-by-step procedures are given whenever possible so the reader can read it once and then quickly bookmark the reference content so they can go back to it time and time again For potential Red Hat Enterprise Linux customers, this book demonstrates why Red Hat Enterprise Linux is an enterprise operating system For existing Red Hat Enterprise Linux subscribers, it offers insight... of just you or thousands of users What Is Red Hat Enterprise Linux? Starting in 2001, Red Hat, Inc began offering Red Hat Enterprise Linux in addition to their original consumer operating system, Red Hat Linux In 2003, Red Hat started the Fedora Project to release the Fedora Core operating system instead of Red Hat Linux The Fedora Project progresses at a rapid rate, releasing a new version of Fedora... Configuration IN THIS PART CHAPTER 1 Installing Red Hat Enterprise Linux 9 CHAPTER 2 Post-Installation Configuration 57 CHAPTER 3 Operating System Updates 79 This page intentionally left blank CHAPTER 1 Installing Red Hat Enterprise Linux IN THIS CHAPTER Choosing an Installation Method Creating the Installation Source Starting the Installation The Red Hat Enterprise Linux installation program is quite versatile... errata that might be available for this book This page intentionally left blank Introduction So you’ve decided to buy my book (or you are at least intrigued enough to read the introduction) This book is a comprehensive guide to Red Hat Enterprise Linux 5, specifically geared at system administrators Read on to find out what Red Hat Enterprise Linux is, why this book is different than all the other Linux. .. concise, easy-to-read technical content that educates administrators and empowers them to do their job with ease and confidence Use this book to explore all the possible administrative solutions available in Red Hat Enterprise Linux 5 and determine which ones are best for you and your organization, whether your organization consists of just you or thousands of users What Is Red Hat Enterprise Linux? Starting... 55 1 OS Core Concepts Troubleshooting 55 3 System Administration Troubleshooting 55 4 Network Troubleshooting 55 5 Monitoring and Tuning Troubleshooting 55 6 Security Troubleshooting . Red Hat  Enterprise Linux  5 Administration UNLEASHED 800 East 96th Street, Indianapolis, Indiana 46240 USA Tammy Fox Red Hat Enterprise Linux 5 Administration. information contained herein. ISBN-10: 0-6 7 2-3 2892 -5 ISBN-13: 97 8-0 -6 72 3-2 89 2-3 Library of Congress Catalog Card Number: 20 059 10113 Printed in the United States

Ngày đăng: 17/10/2013, 23:15

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan