Red Hat Enterprise Linux 3 System Administration Guide

Transcription

Red Hat Enterprise Linux 3System Administration Guide

Red Hat Enterprise Linux 3: System Administration GuideCopyright 2003 by Red Hat, Inc.Red Hat, Inc.1801 Varsity DriveRaleigh NC 27606-2072 USAPhone: 1 919 754 3700Phone: 888 733 4281Fax: 1 919 754 3701PO Box 13588Research Triangle Park NC 27709 USArhel-sag(EN)-3-Print-RHI (2003-07-25T17:10)Copyright 2003 by Red Hat, Inc. This material may be distributed only subject to the terms and conditions set forth in theOpen 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 copyrightholder.Distribution of the work or derivative of the work in any standard (paper) book form for commercial purposes is prohibitedunless 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 andlogos 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, Opteron, Athlon, Duron, and K6 are registered 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.IBM, AS/400, OS/400, RS/6000, S/390, and zSeries are registered trademarks of International Business MachinesCorporation. eServer, iSeries, and pSeries are trademarks of International Business Machines 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 ContentsIntroduction. i1. Changes to This Manual . i2. Document Conventions. ii3. More to Come . v3.1. Send in Your Feedback . v4. Sign Up for Support . vI. File Systems. i1. The ext3 File System . 11.1. Features of ext3. 11.2. Creating an ext3 File System . 11.3. Converting to an ext3 File System . 21.4. Reverting to an ext2 File System . 22. Swap Space . 52.1. What is Swap Space? . 52.2. Adding Swap Space . 52.3. Removing Swap Space . 62.4. Moving Swap Space . 73. Redundant Array of Independent Disks (RAID) . 93.1. What is RAID?. 93.2. Who Should Use RAID?. 93.3. Hardware RAID versus Software RAID. 93.4. RAID Levels and Linear Support . 104. Logical Volume Manager (LVM). 134.1. What is LVM? . 134.2. Additional Resources . 145. Managing Disk Storage. 155.1. Viewing the Partition Table. 165.2. Creating a Partition . 165.3. Removing a Partition . 185.4. Resizing a Partition . 196. Implementing Disk Quotas . 216.1. Configuring Disk Quotas . 216.2. Managing Disk Quotas . 246.3. Additional Resources . 257. User-Defined Device Names. 277.1. Configuring Devlabel . 277.2. How It Works . 297.3. Additional Resources . 298. Access Control Lists . 318.1. Mounting File Systems . 318.2. Setting Access ACLs . 318.3. Setting Default ACLs. 328.4. Retrieving ACLs . 338.5. Archiving File Systems With ACLs. 338.6. Compatibility with Older Systems. 348.7. Additional Resources . 34

II. Installation-Related Information. 379. Kickstart Installations . 399.1. What are Kickstart Installations? . 399.2. How Do You Perform a Kickstart Installation? . 399.3. Creating the Kickstart File . 399.4. Kickstart Options . 409.5. Package Selection . 559.6. Pre-installation Script. 569.7. Post-installation Script . 579.8. Making the Kickstart File Available . 589.9. Making the Installation Tree Available. 599.10. Starting a Kickstart Installation . 6010. Kickstart Configurator. 6310.1. Basic Configuration . 6310.2. Installation Method . 6410.3. Boot Loader Options. 6510.4. Partition Information. 6610.5. Network Configuration . 6910.6. Authentication. 7010.7. Firewall Configuration . 7110.8. X Configuration . 7210.9. Package Selection . 7510.10. Pre-Installation Script . 7510.11. Post-Installation Script. 7610.12. Saving the File . 7811. Basic System Recovery. 7911.1. Common Problems . 7911.2. Booting into Rescue Mode. 7911.3. Booting into Single-User Mode . 8111.4. Booting into Emergency Mode . 8212. Software RAID Configuration . 8313. LVM Configuration. 8714. PXE Network Installations . 9114.1. Setting up the Network Server . 9114.2. PXE Boot Configuration . 9114.3. Adding PXE Hosts. 9314.4. Starting the tftp Server . 9414.5. Configuring the DHCP Server . 9414.6. Adding a Custom Boot Message. 9514.7. Performing the PXE Installation. 9515. Diskless Environments. 9715.1. Start the tftp Server . 9715.2. Configuring the DHCP Server . 9715.3. Configuring the NFS Server. 9815.4. Finish Configuring the Diskless Environment . 9815.5. Adding Hosts . 9915.6. Booting the Hosts. 99

III. Package Management . 10116. Package Management with RPM. 10316.1. RPM Design Goals . 10316.2. Using RPM . 10416.3. Checking a Package’s Signature . 10916.4. Impressing Your Friends with RPM . 11016.5. Additional Resources . 11217. Package Management Tool . 11317.1. Installing Packages. 11317.2. Removing Packages . 11518. Red Hat Network . 117IV. Network-Related Configuration. 12119. Network Configuration . 12319.1. Overview. 12419.2. Establishing an Ethernet Connection . 12419.3. Establishing an ISDN Connection . 12519.4. Establishing a Modem Connection . 12719.5. Establishing an xDSL Connection . 12819.6. Establishing a Token Ring Connection. 13019.7. Establishing a CIPE Connection. 13119.8. Establishing a Wireless Connection. 13319.9. Managing DNS Settings . 13519.10. Managing Hosts . 13619.11. Activating Devices . 13719.12. Working with Profiles . 13719.13. Device Aliases . 13919.14. Establishing an IPsec Connection. 14119.15. Saving and Restoring the Network Configuration . 14520. Basic Firewall Configuration . 14720.1. Security Level Configuration Tool. 14720.2. Activating the iptables Service. 14921. Controlling Access to Services . 15121.1. Runlevels. 15121.2. TCP Wrappers. 15221.3. Services Configuration Tool . 15321.4. ntsysv. 15421.5. chkconfig . 15521.6. Additional Resources . 15522. OpenSSH. 15722.1. Why Use OpenSSH?. 15722.2. Configuring an OpenSSH Server . 15722.3. Configuring an OpenSSH Client. 15722.4. Additional Resources . 16223. Network File System (NFS). 16323.1. Why Use NFS? . 16323.2. Mounting NFS File Systems. 16323.3. Exporting NFS File Systems. 16523.4. Additional Resources . 16924. Samba. 17124.1. Why Use Samba?. 17124.2. Configuring a Samba Server . 17124.3. Connecting to a Samba Share . 17724.4. Additional Resources . 17825. Dynamic Host Configuration Protocol (DHCP) . 18125.1. Why Use DHCP? . 181

25.2. Configuring a DHCP Server . 18125.3. Configuring a DHCP Client . 18525.4. Additional Resources . 18626. Apache HTTP Server Configuration. 18926.1. Basic Settings. 18926.2. Default Settings. 19126.3. Virtual Hosts Settings . 19626.4. Server Settings . 19926.5. Performance Tuning. 20026.6. Saving Your Settings. 20126.7. Additional Resources . 20127. Apache HTTP Secure Server Configuration. 20327.1. Introduction. 20327.2. An Overview of Security-Related Packages . 20327.3. An Overview of Certificates and Security . 20527.4. Using Pre-Existing Keys and Certificates. 20527.5. Types of Certificates . 20627.6. Generating a Key . 20727.7. Generating a Certificate Request to Send to a CA. 20927.8. Creating a Self-Signed Certificate . 21027.9. Testing The Certificate . 21127.10. Accessing The Server . 21127.11. Additional Resources . 21228. BIND Configuration. 21328.1. Adding a Forward Master Zone . 21328.2. Adding a Reverse Master Zone. 21528.3. Adding a Slave Zone. 21729. Authentication Configuration. 21929.1. User Information. 21929.2. Authentication. 22029.3. Command Line Version . 222V. System Configuration . 22530. Console Access . 22730.1. Disabling Shutdown Via [Ctrl]-[Alt]-[Del]. 22730.2. Disabling Console Program Access. 22730.3. Disabling All Console Access . 22830.4. Defining the Console. 22830.5. Making Files Accessible From the Console . 22830.6. Enabling Console Access for Other Applications . 22930.7. The floppy Group . 23031. Date and Time Configuration. 23131.1. Time and Date Properties. 23131.2. Time Zone Configuration. 23232. Keyboard Configuration. 23333. Mouse Configuration . 23534. X Window System Configuration . 23734.1. Display Settings . 23734.2. Advanced Settings . 23735. User and Group Configuration. 23935.1. Adding a New User. 23935.2. Modifying User Properties. 24035.3. Adding a New Group . 24135.4. Modifying Group Properties . 24135.5. Command Line Configuration . 24235.6. Explaining the Process. 245

35.7. Additional Information . 24636. Printer Configuration . 24936.1. Adding a Local Printer. 25036.2. Adding an IPP Printer . 25136.3. Adding a Remote UNIX (LPD) Printer . 25236.4. Adding a Samba (SMB) Printer. 25336.5. Adding a Novell NetWare (NCP) Printer. 25436.6. Adding a JetDirect Printer . 25536.7. Selecting the Printer Model and Finishing. 25636.8. Printing a Test Page. 25736.9. Modifying Existing Printers. 25836.10. Saving the Configuration File . 26036.11. Command Line Configuration . 26036.12. Managing Print Jobs . 26236.13. Sharing a Printer . 26436.14. Additional Resources . 26637. Automated Tasks. 26737.1. Cron. 26737.2. At and Batch . 26937.3. Additional Resources . 27138. Log Files . 27338.1. Locating Log Files . 27338.2. Viewing Log Files. 27338.3. Adding a Log File . 27438.4. Examining Log Files. 27539. Upgrading the Kernel. 27739.1. Overview of Kernel Packages . 27739.2. Preparing to Upgrade . 27839.3. Downloading the Upgraded Kernel . 27939.4. Performing the Upgrade. 27939.5. Veri

Welcome to the Red Hat Enterprise Linux System Administration Guide. The Red Hat Enterprise Linux System Administration Guide contains information on how to customize your Red Hat Enterprise Linux system to t your needs. If you are looking for a step-by-step, task-oriented guide for conguring