Reference Guide RH9.pdf

(4940 KB) Pobierz
185842117 UNPDF
Red Hat Linux 9
Red Hat Linux Reference Guide
185842117.001.png
Red Hat Linux 9: Red Hat Linux Reference Guide
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-rg(EN)-9-Print-RHI (2003-02-13T19:20)
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 modied 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 ngerprint 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
185842117.002.png
Table of Contents
Introduction.......................................................................................................................................... i
1. Changes To This Manual ....................................................................................................... i
2. Finding Appropriate Documentation .................................................................................... ii
2.1. Documentation For First-Time Linux Users.......................................................... ii
2.2. For the More Experienced .................................................................................... iv
2.3. Documentation for Linux Gurus ........................................................................... iv
3. Document Conventions ........................................................................................................ iv
4. Using the Mouse ................................................................................................................. vii
5. Copying and Pasting Text With X....................................................................................... vii
6. More to Come ..................................................................................................................... vii
6.1. We Need Feedback! ............................................................................................viii
7. Sign Up for Support ...........................................................................................................viii
I. System Reference.............................................................................................................................. i
1. Boot Process, Init, and Shutdown ......................................................................................... 1
1.1. The Boot Process ................................................................................................... 1
1.2. A Detailed Look at the Boot Process ..................................................................... 1
1.3. Running Additional Programs at Boot Time ......................................................... 6
1.4. SysV Init Runlevels ............................................................................................... 7
1.5. Shutting Down ....................................................................................................... 8
2. Boot Loaders ....................................................................................................................... 11
2.1. Boot Loaders and System Architecture ............................................................... 11
2.2. GRUB................................................................................................................... 11
2.3. Installing GRUB .................................................................................................. 12
2.4. GRUB Terminology ............................................................................................. 13
2.5. GRUB Interfaces.................................................................................................. 14
2.6. GRUB Commands ............................................................................................... 16
2.7. GRUB Menu Conguration File.......................................................................... 16
2.8. LILO .................................................................................................................... 18
2.9. Options in /etc/lilo.conf ............................................................................. 19
2.10. Changing Runlevels at Boot Time ..................................................................... 21
2.11. Additional Resources ......................................................................................... 21
3. File System Structure .......................................................................................................... 23
3.1. Why Share a Common Structure?........................................................................ 23
3.2. Overview of File System Hierarchy Standard (FHS) .......................................... 23
3.3. Special File Locations.......................................................................................... 27
4. The sysconfig Directory.................................................................................................. 29
4.1. Files in the /etc/sysconfig/ Directory .......................................................... 29
4.2. Directories in the /etc/sysconfig/ Directory ................................................ 41
4.3. Additional Resources ........................................................................................... 41
5. The proc File System......................................................................................................... 43
5.1. A Virtual File System........................................................................................... 43
5.2. Top-level Files in the proc File System .............................................................. 44
5.3. Directories in /proc/ .......................................................................................... 57
5.4. Using the sysctl Command .............................................................................. 72
5.5. Additional Resources ........................................................................................... 73
6. Users and Groups ................................................................................................................ 75
6.1. User and Group Management Tools .................................................................... 75
6.2. Standard Users ..................................................................................................... 75
6.3. Standard Groups................................................................................................... 77
6.4. User Private Groups ............................................................................................. 79
6.5. Shadow Passwords ............................................................................................... 80
7. The X Window System ....................................................................................................... 81
7.1. XFree86................................................................................................................ 81
7.2. Desktop Environments and Window Managers................................................... 82
7.3. XFree86 Server Conguration Files .................................................................... 83
7.4. Fonts..................................................................................................................... 89
7.5. Runlevels and XFree86 ........................................................................................ 92
7.6. Additional Resources ........................................................................................... 93
II. Network Services Reference........................................................................................................ 95
8. Network Interfaces.............................................................................................................. 97
8.1. Network Conguration Files................................................................................ 97
8.2. Interface Conguration Files ............................................................................... 98
8.3. Interface Control Scripts .................................................................................... 101
8.4. Network Function Files...................................................................................... 103
8.5. Additional Resources ......................................................................................... 103
9. Network File System (NFS).............................................................................................. 105
9.1. Methodology ...................................................................................................... 105
9.2. NFS Server Conguration Files......................................................................... 107
9.3. NFS Client Conguration Files ......................................................................... 109
9.4. Securing NFS ..................................................................................................... 111
9.5. Additional Resources ......................................................................................... 112
10. Apache HTTP Server ...................................................................................................... 115
10.1. Apache HTTP Server 2.0 ................................................................................. 115
10.2. Migrating Apache HTTP Server 1.3 Conguration Files ................................ 116
10.3. After Installation .............................................................................................. 125
10.4. Starting and Stopping httpd ........................................................................... 126
10.5. Conguration Directives in httpd.conf ....................................................... 127
10.6. Default Modules............................................................................................... 142
10.7. Adding Modules............................................................................................... 143
10.8. Virtual Hosts .................................................................................................... 143
10.9. Additional Resources ....................................................................................... 145
11. Email ............................................................................................................................... 147
11.1. Email Protocols ................................................................................................ 147
11.2. Email Program Classications ......................................................................... 149
11.3. Mail Transport Agents ..................................................................................... 150
11.4. Mail Delivery Agents....................................................................................... 157
11.5. Mail User Agents ............................................................................................. 163
11.6. Additional Resources ....................................................................................... 164
12. Berkeley Internet Name Domain (BIND) ....................................................................... 167
12.1. Introduction to DNS......................................................................................... 167
12.2. /etc/named.conf ......................................................................................... 168
12.3. Zone Files......................................................................................................... 174
12.4. Using rndc ...................................................................................................... 179
12.5. Advanced Features of BIND............................................................................ 181
12.6. Common Mistakes to Avoid ............................................................................ 182
12.7. Additional Resources ....................................................................................... 183
13. Lightweight Directory Access Protocol (LDAP)............................................................ 185
13.1. Why Use LDAP? ............................................................................................. 185
13.2. LDAP Terminology.......................................................................................... 186
13.3. OpenLDAP Daemons and Utilities.................................................................. 186
13.4. OpenLDAP Conguration Files....................................................................... 188
13.5. The /etc/openldap/schema/ Directory..................................................... 189
13.6. OpenLDAP Setup Overview............................................................................ 189
13.7. Conguring Your System to Authenticate Using OpenLDAP......................... 191
13.8. Upgrading to OpenLDAP Version 2.0 ............................................................. 193
13.9. Additional Resources ....................................................................................... 193
III. Security Reference.................................................................................................................... 195
14. Pluggable Authentication Modules (PAM)..................................................................... 197
14.1. Advantages of PAM ......................................................................................... 197
14.2. PAM Conguration Files ................................................................................. 197
14.3. PAM Conguration File Format ...................................................................... 197
14.4. Sample PAM Conguration Files .................................................................... 200
14.5. Creating PAM Modules ................................................................................... 202
14.6. PAM and Device Ownership............................................................................ 202
14.7. Additional Resources ....................................................................................... 203
15. TCP Wrappers and xinetd ............................................................................................ 205
15.1. TCP Wrappers.................................................................................................. 205
15.2. TCP Wrappers Conguration Files.................................................................. 206
15.3. xinetd ............................................................................................................. 212
15.4. xinetd Conguration Files............................................................................. 212
15.5. Additional Resources ....................................................................................... 217
16. iptables ....................................................................................................................... 219
16.1. Packet Filtering ................................................................................................ 219
16.2. Differences between iptables and ipchains ............................................. 220
16.3. Options Used in iptables Commands .......................................................... 221
16.4. Storing iptables Information ....................................................................... 227
16.5. Additional Resources ....................................................................................... 228
17. Kerberos .......................................................................................................................... 229
17.1. Advantages of Kerberos................................................................................... 229
17.2. Kerberos Terminology ..................................................................................... 230
17.3. How Kerberos Works ....................................................................................... 231
17.4. Kerberos and PAM ........................................................................................... 232
17.5. Conguring a Kerberos 5 Server ..................................................................... 232
17.6. Conguring a Kerberos 5 Client ...................................................................... 234
17.7. Additional Resources ....................................................................................... 235
18. SSH Protocol................................................................................................................... 237
18.1. Features of SSH ............................................................................................... 237
18.2. SSH Protocol Versions ..................................................................................... 238
18.3. Event Sequence of an SSH Connection ........................................................... 238
18.4. OpenSSH Conguration Files ......................................................................... 240
18.5. More Than a Secure Shell................................................................................ 241
18.6. Requiring SSH for Remote Connections ......................................................... 242
19. Tripwire........................................................................................................................... 245
19.1. How to Use Tripwire........................................................................................ 245
19.2. Installing the Tripwire RPM ............................................................................ 246
19.3. Customizing Tripwire ...................................................................................... 247
19.4. Initialize the Tripwire Database ....................................................................... 249
19.5. Running an Integrity Check ............................................................................. 250
19.6. Examining Tripwire Reports............................................................................ 250
19.7. Updating the Tripwire Database ...................................................................... 252
19.8. Updating the Tripwire Policy File ................................................................... 253
19.9. Updating the Tripwire Conguration File ....................................................... 254
19.10. Tripwire File Location Reference .................................................................. 255
19.11. Additional Resources ..................................................................................... 256
IV. Appendixes ................................................................................................................................ 259
A. General Parameters and Modules .................................................................................... 261
A.1. Specifying Module Parameters ......................................................................... 261
A.2. CD-ROM Module Parameters........................................................................... 261
A.3. SCSI parameters................................................................................................ 263
A.4. Ethernet Parameters .......................................................................................... 266
Zgłoś jeśli naruszono regulamin