Customization Guide RH9.pdf

(7686 KB) Pobierz
Red Hat Linux 9
Red Hat Linux Customization
Guide
761734077.001.png 761734077.002.png 761734077.003.png
Red Hat Linux 9: Red Hat Linux Customization 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-cg(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 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
761734077.004.png
Table of Contents
Introduction.......................................................................................................................................... i
1. Changes to This Manual ........................................................................................................ i
2. Document Conventions ......................................................................................................... ii
3. More to Come ....................................................................................................................... v
3.1. Send in Your Feedback .......................................................................................... v
4. Sign Up for Support .............................................................................................................. v
I. File Systems....................................................................................................................................... i
1. The ext3 File System ............................................................................................................ 1
1.1. Features of ext3...................................................................................................... 1
1.2. Creating an ext3 File System ................................................................................. 1
1.3. Converting to an ext3 File System ......................................................................... 2
1.4. Reverting to an ext2 File System ........................................................................... 2
2. Swap Space ........................................................................................................................... 5
2.1. What is Swap Space? ............................................................................................. 5
2.2. Adding Swap Space ............................................................................................... 5
2.3. Removing Swap Space .......................................................................................... 6
2.4. Moving Swap Space .............................................................................................. 7
3. Redundant Array of Independent Disks (RAID) .................................................................. 9
3.1. What is RAID?....................................................................................................... 9
3.2. Who Should Use RAID?........................................................................................ 9
3.3. Hardware RAID versus Software RAID................................................................ 9
3.4. RAID Levels and Linear Support ........................................................................ 10
4. Logical Volume Manager (LVM)........................................................................................ 13
5. Managing Disk Storage....................................................................................................... 15
5.1. Viewing the Partition Table.................................................................................. 16
5.2. Creating a Partition .............................................................................................. 16
5.3. Removing a Partition ........................................................................................... 18
5.4. Resizing a Partition .............................................................................................. 19
6. Implementing Disk Quotas ................................................................................................. 21
6.1. Conguring Disk Quotas ..................................................................................... 21
6.2. Managing Disk Quotas ........................................................................................ 24
6.3. Additional Resources ........................................................................................... 25
II. Installation-Related Information................................................................................................ 27
7. Kickstart Installations ......................................................................................................... 29
7.1. What are Kickstart Installations? ......................................................................... 29
7.2. How Do You Perform a Kickstart Installation? ................................................... 29
7.3. Creating the Kickstart File ................................................................................... 29
7.4. Kickstart Options ................................................................................................. 30
7.5. Package Selection ................................................................................................ 44
7.6. Pre-installation Script........................................................................................... 45
7.7. Post-installation Script ......................................................................................... 47
7.8. Making the Kickstart File Available .................................................................... 48
7.9. Making the Installation Tree Available................................................................ 49
7.10. Starting a Kickstart Installation ......................................................................... 49
8. Kickstart Congurator ..................................................................................................... 53
8.1. Basic Conguration ............................................................................................. 53
8.2. Installation Method .............................................................................................. 54
8.3. Boot Loader Options............................................................................................ 55
8.4. Partition Information............................................................................................ 56
8.5. Network Conguration ........................................................................................ 59
8.6. Authentication...................................................................................................... 60
8.7. Firewall Conguration ......................................................................................... 61
8.8. X Conguration ................................................................................................... 62
8.9. Package Selection ................................................................................................ 65
8.10. Pre-Installation Script ........................................................................................ 65
8.11. Post-Installation Script....................................................................................... 66
8.12. Saving the File ................................................................................................... 68
9. Basic System Recovery....................................................................................................... 69
9.1. Common Problems .............................................................................................. 69
9.2. Booting into Rescue Mode................................................................................... 69
9.3. Booting into Single-User Mode ........................................................................... 71
9.4. Booting into Emergency Mode ............................................................................ 72
10. Software RAID Conguration .......................................................................................... 73
11. LVM Conguration........................................................................................................... 77
III. Network-Related Conguration................................................................................................ 81
12. Network Conguration ..................................................................................................... 83
12.1. Overview ............................................................................................................ 84
12.2. Establishing an Ethernet Connection ................................................................. 84
12.3. Establishing an ISDN Connection ..................................................................... 85
12.4. Establishing a Modem Connection .................................................................... 87
12.5. Establishing an xDSL Connection ..................................................................... 88
12.6. Establishing a Token Ring Connection .............................................................. 90
12.7. Establishing a CIPE Connection ........................................................................ 91
12.8. Establishing a Wireless Connection................................................................... 92
12.9. Managing DNS Settings .................................................................................... 94
12.10. Managing Hosts ............................................................................................... 95
12.11. Activating Devices ........................................................................................... 96
12.12. Working with Proles ...................................................................................... 96
12.13. Device Aliases ................................................................................................. 98
13. Basic Firewall Conguration .......................................................................................... 101
13.1. Security Level Conguration Tool ................................................................ 101
13.2. GNOME Lokkit ............................................................................................. 104
13.3. Activating the iptables Service.................................................................... 107
14. Controlling Access to Services ....................................................................................... 109
14.1. Runlevels.......................................................................................................... 109
14.2. TCP Wrappers.................................................................................................. 110
14.3. Services Conguration Tool .......................................................................... 111
14.4. ntsysv ............................................................................................................... 112
14.5. chkconfig ...................................................................................................... 112
14.6. Additional Resources ....................................................................................... 113
15. OpenSSH......................................................................................................................... 115
15.1. Why Use OpenSSH?........................................................................................ 115
15.2. Conguring an OpenSSH Server ..................................................................... 115
15.3. Conguring an OpenSSH Client...................................................................... 115
15.4. Additional Resources ....................................................................................... 120
16. Network File System (NFS)............................................................................................ 121
16.1. Why Use NFS? ................................................................................................ 121
16.2. Mounting NFS File Systems............................................................................ 121
16.3. Exporting NFS File Systems............................................................................ 122
16.4. Additional Resources ....................................................................................... 126
17. Samba.............................................................................................................................. 127
17.1. Why Use Samba? ............................................................................................. 127
17.2. Conguring a Samba Server ............................................................................ 127
17.3. Connecting to a Samba Share .......................................................................... 132
17.4. Additional Resources ....................................................................................... 134
18. Dynamic Host Conguration Protocol (DHCP) ............................................................. 135
18.1. Why Use DHCP? ............................................................................................. 135
18.2. Conguring a DHCP Server ............................................................................ 135
18.3. Conguring a DHCP Client ............................................................................. 139
18.4. Additional Resources ....................................................................................... 140
19. Apache HTTP Server Conguration............................................................................... 141
19.1. Basic Settings................................................................................................... 141
19.2. Default Settings................................................................................................ 143
19.3. Virtual Hosts Settings ...................................................................................... 148
19.4. Server Settings ................................................................................................. 151
19.5. Performance Tuning......................................................................................... 152
19.6. Saving Your Settings........................................................................................ 153
19.7. Additional Resources ....................................................................................... 153
20. Apache HTTP Secure Server Conguration................................................................... 155
20.1. Introduction...................................................................................................... 155
20.2. An Overview of Security-Related Packages .................................................... 155
20.3. An Overview of Certicates and Security ....................................................... 157
20.4. Using Pre-Existing Keys and Certicates ........................................................ 157
20.5. Types of Certicates ........................................................................................ 158
20.6. Generating a Key ............................................................................................. 159
20.7. Generating a Certicate Request to Send to a CA ........................................... 161
20.8. Creating a Self-Signed Certicate ................................................................... 162
20.9. Testing The Certicate ..................................................................................... 163
20.10. Accessing The Server .................................................................................... 163
20.11. Additional Resources ..................................................................................... 164
21. BIND Conguration........................................................................................................ 165
21.1. Adding a Forward Master Zone ....................................................................... 165
21.2. Adding a Reverse Master Zone........................................................................ 167
21.3. Adding a Slave Zone........................................................................................ 169
22. Authentication Conguration.......................................................................................... 171
22.1. User Information .............................................................................................. 171
22.2. Authentication.................................................................................................. 172
22.3. Command Line Version ................................................................................... 174
23. Mail Transport Agent (MTA) Conguration .................................................................. 177
IV. System Conguration ............................................................................................................... 179
24. Console Access ............................................................................................................... 181
24.1. Disabling Shutdown Via Ctrl-Alt-Del.............................................................. 181
24.2. Disabling Console Program Access................................................................. 181
24.3. Disabling All Console Access ......................................................................... 182
24.4. Dening the Console........................................................................................ 182
24.5. Making Files Accessible From the Console .................................................... 182
24.6. Enabling Console Access for Other Applications ........................................... 183
24.7. The floppy Group .......................................................................................... 184
25. User and Group Conguration........................................................................................ 185
25.1. Adding a New User.......................................................................................... 185
25.2. Modifying User Properties............................................................................... 186
25.3. Adding a New Group ....................................................................................... 187
25.4. Modifying Group Properties ............................................................................ 187
25.5. Command Line Conguration ......................................................................... 188
25.6. Explaining the Process ..................................................................................... 191
26. Gathering System Information........................................................................................ 193
26.1. System Processes ............................................................................................. 193
26.2. Memory Usage................................................................................................. 195
26.3. File Systems ..................................................................................................... 196
26.4. Hardware.......................................................................................................... 197
26.5. Additional Resources ....................................................................................... 199
27. Printer Conguration ...................................................................................................... 201
27.1. Adding a Local Printer..................................................................................... 202
Zgłoś jeśli naruszono regulamin