"Red Hat Linux 9
Red Hat Linux System Administration Primer
Red Hat Linux 9: Red Hat Linux System Administration Primer Copyright © 2003 by Red Hat, Inc.
Red Hat, Inc. 1801 Varsity Drive Raleigh NC 27606-2072 USA Phone: +1 919 754 3700 Phone: 888 733 4281 Fax: +1 919 754 3701 PO Box 13588 Research Triangle Park NC 27709 USA
rhl-sap(EN)-9-Print-RHI (2003-02-20T01:08) Copyright © 2003 by Red Hat, Inc. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, V1.0 or later (the latest version is presently available at http://www.opencontent.org/openpub/). Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder. Distribution of the work or derivative of the work in any standard (paper) book form for commercial purposes is prohibited unless prior permission is obtained from the copyright holder. Red Hat, Red Hat Network, the Red Hat "Shadow Man" logo, RPM, Maximum RPM, the RPM logo, Linux Library, PowerTools, Linux Undercover, RHmember, RHmember More, Rough Cuts, Rawhide and all Red Hat-based trademarks and logos are trademarks or registered trademarks of Red Hat, Inc. in the United States and other countries. Linux is a registered trademark of Linus Torvalds. Motif and UNIX are registered trademarks of The Open Group. Intel and Pentium are a registered trademarks of Intel Corporation. Itanium and Celeron are trademarks of Intel Corporation. AMD, AMD Athlon, AMD Duron, and AMD K6 are trademarks of Advanced Micro Devices, Inc. Netscape is a registered trademark of Netscape Communications Corporation in the United States and other countries. Windows is a registered trademark of Microsoft Corporation. SSH and Secure Shell are trademarks of SSH Communications Security, Inc. FireWire is a trademark of Apple Computer Corporation. All other trademarks and copyrights referred to are the property of their respective owners. The GPG fingerprint of the security@redhat.com key is: CA 20 86 86 2B D6 9D FC 65 F6 EC C4 21 91 80 CD DB 42 A6 0E
Table of Contents
Introduction.......................................................................................................................................... i 1. Changes to This Manual ........................................................................................................ i 2. Document Conventions.......................................................................................................... i 3. More to Come ...................................................................................................................... iv 3.1. Send in Your Feedback ......................................................................................... iv 4. Sign Up for Support ............................................................................................................. iv 1. The Philosophy of System Administration ................................................................................... 1 1.1. Automate Everything ......................................................................................................... 1 1.2. Document Everything ........................................................................................................ 2 1.3. Communicate as Much as Possible.................................................................................... 3 1.3.1. Tell Your Users What You Are Going to Do ...................................................... 3 1.3.2. Tell Your Users What You Are Doing ................................................................ 4 1.3.3. Tell Your Users What You Have Done ............................................................... 4 1.4. Know Your Resources........................................................................................................ 5 1.5. Know Your Users ............................................................................................................... 6 1.6. Know Your Business.......................................................................................................... 6 1.7. Security Cannot be an Afterthought .................................................................................. 6 1.7.1. The Risks of Social Engineering......................................................................... 7 1.8. Plan Ahead ......................................................................................................................... 7 1.9. Expect the Unexpected ...................................................................................................... 8 1.10. In Conclusion. . . .............................................................................................................. 8 1.11. Red Hat Linux-Specific Information ............................................................................... 8 1.11.1. Automation ....................................................................................................... 8 1.11.2. Documentation and Communication ................................................................ 9 1.11.3. Security ........................................................................................................... 10 1.12. Additional Resources ..................................................................................................... 10 1.12.1. Installed Documentation ................................................................................. 10 1.12.2. Useful Websites .............................................................................................. 12 1.12.3. Related Books ................................................................................................. 12 2. Resource Monitoring .................................................................................................................... 15 2.1. Basic Concepts................................................................................................................. 15 2.2. System Performance Monitoring ..................................................................................... 15 2.3. Monitoring System Capacity ........................................................................................... 16 2.4. What to Monitor?............................................................................................................. 16 2.4.1. Monitoring CPU Power .................................................................................... 17 2.4.2. Monitoring Bandwidth...................................................................................... 18 2.4.3. Monitoring Memory.......................................................................................... 18 2.4.4. Monitoring Storage ........................................................................................... 19 2.5. Red Hat Linux-Specific Information ............................................................................... 20 2.5.1. free .................................................................................................................. 20 2.5.2. top .................................................................................................................... 21 2.5.3. vmstat.............................................................................................................. 22 2.5.4. The Sysstat Suite of Resource Monitoring Tools ............................................. 23 2.6. Additional Resources ....................................................................................................... 26 2.6.1. Installed Documentation ................................................................................... 27 2.6.2. Useful Websites ................................................................................................ 27 2.6.3. Related Books ................................................................................................... 27
3. Bandwidth and Processing Power ............................................................................................... 29 3.1. Bandwidth ........................................................................................................................ 29 3.1.1. Buses ................................................................................................................. 29 3.1.2. Datapaths........................................................................................................... 30 3.1.3. Potential Bandwidth-Related Problems ............................................................ 30 3.1.4. Potential Bandwidth-related Solutions ............................................................. 30 3.1.5. In Summary. . . .................................................................................................. 31 3.2. Processing Power ............................................................................................................. 32 3.2.1. Facts About Processing Power.......................................................................... 32 3.2.2. Consumers of Processing Power....................................................................... 32 3.2.3. Improving a CPU Shortage ............................................................................... 33 3.3. Red Hat Linux-Specific Information ............................................................................... 36 3.3.1. Monitoring Bandwidth on Red Hat Linux ........................................................ 36 3.3.2. Monitoring CPU Utilization on Red Hat Linux................................................ 37 3.4. Additional Resources ....................................................................................................... 41 3.4.1. Installed Documentation ................................................................................... 41 3.4.2. Useful Websites ................................................................................................ 41 3.4.3. Related Books ................................................................................................... 42 4. Physical and Virtual Memory ...................................................................................................... 43 4.1. Storage Access Patterns ................................................................................................... 43 4.2. The Storage Spectrum...................................................................................................... 43 4.2.1. CPU Registers ................................................................................................... 44 4.2.2. Cache Memory.................................................................................................. 44 4.2.3. Main Memory — RAM .................................................................................... 45 4.2.4. Hard Drives ....................................................................................................... 46 4.2.5. Off-Line Backup Storage .................................................................................. 47 4.3. Basic Virtual Memory Concepts...................................................................................... 47 4.3.1. Virtual Memory in Simple Terms ..................................................................... 47 4.3.2. Backing Store — the Central Tenet of Virtual Memory ................................... 48 4.4. Virtual Memory: the Details ............................................................................................ 48 4.4.1. Page Faults ........................................................................................................ 49 4.4.2. The Working Set ............................................................................................... 49 4.4.3. Swapping........................................................................................................... 50 4.5. Virtual Memory Performance Implications ..................................................................... 50 4.5.1. Worst Case Performance Scenario.................................................................... 50 4.5.2. Best Case Performance Scenario ...................................................................... 51 4.6. Red Hat Linux-Specific Information ............................................................................... 51 4.7. Additional Resources ....................................................................................................... 54 4.7.1. Installed Documentation ................................................................................... 54 4.7.2. Useful Websites ................................................................................................ 54 4.7.3. Related Books ................................................................................................... 54 5. Managing Storage ......................................................................................................................... 57 5.1. An Overview of Storage Hardware.................................................................................. 57 5.1.1. Disk Platters ...................................................................................................... 57 5.1.2. Data reading/writing device .............................................................................. 57 5.1.3. Access Arms ..................................................................................................... 58 5.2. Storage Addressing Concepts .......................................................................................... 59 5.2.1. Geometry-Based Addressing ............................................................................ 59 5.2.2. Block-Based Addressing................................................................................... 60 5.3. Mass Storage Device Interfaces....................................................................................... 60 5.3.1. Historical Background ...................................................................................... 61 5.3.2. Present-Day Industry-Standard Interfaces ........................................................ 62 5.4. Hard Drive Performance Characteristics ......................................................................... 64 5.4.1. Mechanical/Electrical Limitations .................................................................... 64 5.4.2. I/O Loads and Performance .............................................................................. 66
5.5. Making the Storage Usable.............................................................................................. 67 5.5.1. Partitions/Slices................................................................................................. 67 5.5.2. File Systems ...................................................................................................... 69 5.5.3. Directory Structure............................................................................................ 71 5.5.4. Enabling Storage Access................................................................................... 71 5.6. Advanced Storage Technologies ...................................................................................... 72 5.6.1. Network-Accessible Storage............................................................................. 72 5.6.2. RAID-Based Storage ........................................................................................ 73 5.7. Storage Management Day-to-Day ................................................................................... 78 5.7.1. Monitoring Free Space...................................................................................... 78 5.7.2. Disk Quota Issues ............................................................................................. 80 5.7.3. File-Related Issues ............................................................................................ 81 5.7.4. Adding/Removing Storage................................................................................ 82 5.8. A Word About Backups. . . .............................................................................................. 88 5.9. Red Hat Linux-Specific Information ............................................................................... 88 5.9.1. Device Naming Conventions ............................................................................ 88 5.9.2. File System Basics ............................................................................................ 89 5.9.3. Mounting File Systems ..................................................................................... 91 5.9.4. Network-Accessible Storage Under Red Hat Linux ......................................... 94 5.9.5. Mounting File Systems Automatically with /etc/fstab............................... 95 5.9.6. Monitoring Disk Space ..................................................................................... 95 5.9.7. Adding/Removing Storage................................................................................ 97 5.9.8. Implementing Disk Quotas ............................................................................. 101 5.9.9. Creating RAID Arrays .................................................................................... 105 5.9.10. Day to Day Management of RAID Arrays ................................................... 106 5.10. Additional Resources ................................................................................................... 107 5.10.1. Installed Documentation ............................................................................... 107 5.10.2. Useful Websites ............................................................................................ 108 5.10.3. Related Books ............................................................................................... 108 6. Managing User Accounts and Resource Access ....................................................................... 109 6.1. Managing User Accounts............................................................................................... 109 6.1.1. The Username ................................................................................................. 109 6.1.2. Passwords........................................................................................................ 112 6.1.3. Access Control Information............................................................................ 116 6.1.4. Managing Accounts and Resource Access Day-to-Day ................................. 117 6.2. Managing User Resources ............................................................................................. 119 6.2.1. Who Can Access Shared Data ........................................................................ 119 6.2.2. Where Users Access Shared Data................................................................... 120 6.2.3. What Barriers Are in Place To Prevent Abuse of Resources .......................... 121 6.3. Red Hat Linux-Specific Information ............................................................................. 121 6.3.1. User Accounts, Groups, and Permissions ....................................................... 121 6.3.2. Files Controlling User Accounts and Groups ................................................. 123 6.3.3. User Account and Group Applications ........................................................... 126 6.4. Additional Resources ..................................................................................................... 127 6.4.1. Installed Documentation ................................................................................. 128 6.4.2. Useful Websites ...................."
|
You need to upgrade your Flash Player , or try to enable javascript in order see this document properly.
|
|