Tải bản đầy đủ (.pdf) (1,129 trang)

red hat fedora core 6 unleashed

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (17.69 MB, 1,129 trang )

UNLEASHED
800 East 96th Street, Indianapolis, Indiana 46240 USA
Andrew Hudson
Paul Hudson
Fedora

Core 6
Red Hat
®
Red Hat Fedora Core 6 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, photo-
copying, recording, or otherwise, without written permission from the
publisher. No patent liability is assumed with respect to the use of the infor-
mation contained herein. Although every precaution has been taken in the
preparation of this book, the publisher and authors assume no responsibility
for errors or omissions. Nor is any liability assumed for damages resulting
from the use of the information contained herein.
International Standard Book Number: 0-672-32929-8
Printed in the United States of America
First Printing: December 2006
09080706 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.
Red Hat is a registered trademark and Fedora is a trademark of Red Hat, Inc.
Warning and Disclaimer


Every effort has been made to make this book as complete and as accurate as
possible, but no warranty or fitness is implied. The information provided is
on an “as is” basis. The authors 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 or from the use of the
CDs or programs accompanying it.
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

For sales outside the United States, please contact
International Sales

Library of Congress Cataloging-in-Publication Data
Hudson, Andrew.
Fedora core 6 unleashed / Andrew Hudson, Paul Hudson.
p. cm.
Includes bibliographical references and index.
ISBN 0-672-32929-8 (pbk. w/dvd : alk. paper) 1. Linux. 2. Operating
systems (Computers) I. Hudson, Paul, 1979- II. Title.
QA76.76.O63H8165 2006
005.4’32—dc22
2006034979
Acquisitions Editor
Damon Jordan
Managing Editor
Patrick Kanouse

Project Editor
Mandie Frank
Copy Editor
Mike Henry
Indexer
Ken Johnson
Proofreader
Linda Seifert
Technical Editors
Dallas Releford
Jason Byars
Dee-Ann LeBlanc
Chris Newman
Dave Taylor
Christopher Young
Publishing Coordinator
Vanessa Evans
Multimedia Developer
Dan Scherf
Designer
Gary Adair
This Book Is Safari Enabled
The Safari
®
Enabled icon on the cover of your favorite technology book
means the book is available through Safari Bookshelf. When you buy this
book, you get free access to the online edition for 45 days.
Safari Bookshelf is an electronic reference library that lets you easily search thousands of
technical books, find code samples, download chapters, and access technical information
whenever and wherever you need it.

To gain 45-day Safari Enabled access to this book:
• Go to />• Complete the brief registration form
If you have difficulty registering on Safari Bookshelf or accessing the online edition,
please email
Contents at a Glance
Introduction 1
Part I Installation and Configuration
1 Introducing Fedora
13
2 Preparing to Install Fedora
27
3 Installing Fedora
53
4 Post-Installation Configuration
83
5 First Steps with Fedora
119
Part II Desktop Fedora
6 The X Window System
165
7 Managing Software
191
8 On the Internet: Surfing the Web, Writing Email,
and Reading the News
209
9 Productivity Applications
239
10 Multimedia Applications
261
11 Graphics Manipulation

285
12 Printing with Fedora
299
13 Games
313
Part III System Administration
14 Managing Users
325
15 Automating Tasks
351
16 System Resources
413
17 Backing Up, Restoring, and Recovery
423
18 Network Connectivity
455
19 Remote Access with SSH and Telnet
507
20 Xen
515
Part IV Fedora As a Server
21 Apache Web Server Management
523
22 Administering Database Services
567
23 File and Print
593
24 Remote File Serving with FTP
625
25 Handling Electronic Mail 669

26 Setting Up a Proxy Server
691
27 Managing DNS
701
28 LDAP
741
29 News Servers
751
Part V Programming Linux
30 Using Perl
767
31 Working with Python
789
32 Writing PHP Scripts
809
33 C/C++ Programming Tools for Fedora
843
34 Mono
859
Part VI Fedora Housekeeping
35 Securing Your Machines
873
36 Performance Tuning
885
37 Command Line Masterclass
899
38 Advanced
yum 925
39 Managing the File System
935

40 Kernel and Module Management
973
Part VII Appendix
A Fedora and Linux Internet Resources
999
Index 1011
Table of Contents
Introduction 1
Part I Installation and Configuration
1 Introducing Fedora 13
What Is Fedora?
15
Inside Fedora Core
15
Features of the Fedora Install
18
Fedora File System Features
18
Fedora for Business
20
Fedora in Your Home
21
64-Bit Fedora
22
Fedora on the PPC Platform
22
Fedora on Dual-Core Machines
23
Getting the Most from Fedora and Linux Documentation
23

Fedora Developers and Documentation
25
Reference
26
2 Preparing to Install Fedora 27
Planning Your Fedora Deployment
28
Business Considerations
28
System Considerations
30
User Considerations
31
A Predeployment Planning Checklist
32
Planning the Installation
33
Hardware Requirements
33
Meeting the Minimum Fedora Core Hardware Requirements
34
Using Legacy Hardware
34
Planning for Hard Drive Storage for Your Fedora
Installation Class
35
Checking Hardware Compatibility
36
Preparing for Potential Hardware Problems
37

Preparing and Using a Hardware Inventory
40
Preparing for the Install Process
43
Preparing to Install from a CD-ROM
45
Partitioning Before and During Installation 45
Choosing a Partitioning Scheme
47
Hosting Parts of the Linux File System on Separate Partitions
47
Using Fedora’s
kickstart Installation Method 48
Reference
51
3 Installing Fedora 53
Before You Begin the Installation
53
Research Your Hardware Specifications
53
Choose an Installation Type
54
Choose Software Installation Options
54
Planning Partition Strategies
55
The Boot Loader
56
Choosing How to Install Fedora
57

Installing from CD or DVD
57
Installing Using a Network
58
Step-by-Step Installation
59
Starting the Install
60
Partitioning Your Hard Drive
66
Choosing, Configuring, and Installing the Boot Loader
68
Network Configuration
70
Setting the Time Zone
71
Creating a Root Password and User Accounts
73
Software Selection and Installation
74
Finishing the Install
76
firstboot Configuration 78
Logging In and Shutting Down
81
Reference
82
4 Post-Installation Configuration 83
Troubleshooting Post-Installation Configuration Problems
83

Your Hardware and Kudzu
84
Pointer and Keyboard Configuration
86
Configuring Keyboards with Linux
86
Configuring Pointing Devices in Fedora
90
Configuring Display Graphics
94
Configuring Sound Devices
96
Detecting and Configuring a Modem
97
Configuring a Serial-Port Modem
98
Configuring a Fax Modem
101
Configuring
minicom for Modem Use 101
Configuring WinModems for Laptops
102
Red Hat Fedora Core 6 Unleashedviii
Configuring Power Management in Fedora 102
Resetting the Date and Time
105
Using the
date Command 105
Using the
hwclock Command 105

Using the
system-config-date Client 106
Managing PCMCIA
107
Using PCMCIA
107
Controlling PCMCIA Service
109
Configuring and Using CD, DVD, and CD-RW Drives
109
Checking Drive Assignment
110
Initializing FireWire CD Drives
111
Configuring Wireless Networks
114
Reference
117
5 First Steps with Fedora 119
Working with the Linux File System
120
Viewing the Linux File System
121
Use Essential Commands from the
/bin and /sbin Directories 123
Store the Booted Kernel and View Stored Devices in the
/boot and /dev Directories 124
Use and Edit Files in the
/etc Directory 124
Protect the Contents of User Directories—

/home 129
Use the Contents of the
/proc Directory to Interact
with the Kernel
129
Work with Shared Data in the
/usr Directory 131
Temporary File Storage in the
/tmp Directory 131
Access Variable Data Files in the
/var Directory 131
Logging In to and Working with Linux
131
Text-Based Console Login
132
Working with Virtual Consoles
132
Using Simple Keyboard and Mouse Techniques in
a Linux Console Session
133
Logging Out
135
Logging In and Out from a Remote Computer
135
Changing Your User Information
137
Reading Documentation
138
Using Man Pages
139

Finding and Reading Software Package Documentation
139
Using the Shell
140
Using Environment Variables
142
Navigating and Searching with the Shell
144
Contents ix
Managing Files with the Shell 145
Compressing and Decompressing Files Through the Shell
146
Using the Text Editors
147
Working with
vi 148
Working with
emacs 149
Working with Permissions
151
Assigning Permissions
152
Directory Permissions
153
Understanding Set User ID and Set Group ID Permissions
155
Working As Root
156
Creating Users
157

Deleting Users
158
Shutting Down the System
158
Rebooting the System
159
Reference
160
Part II Desktop Fedora
6 The X Window System 165
Basic X Concepts
166
Using X
167
Elements of the
xorg.conf File 168
Configuring X
173
Starting X
177
Using a Display Manager
177
Starting X from the Console by Using
startx 180
Selecting and Using Window Managers
181
Using Fedora’s
switchdesk 182
The Tab Window Manager
183

The Motif Window Manager
184
AIGLX—Eye Candy for the Masses
185
The GNOME and KDE Desktop Environments
186
GNOME: The GNU Network Object Model Environment
186
KDE: The K Desktop Environment
188
Reference
189
7 Managing Software 191
Using RPM for Software Management
191
Command-Line and Graphical RPM Clients
193
Using
rpm on the Command Line 195
Package Organization with RPM
197
Extracting a Single File from an RPM File
198
Using pirut for Software Management 198
Red Hat Fedora Core 6 Unleashedx
Alternatives for Software Management 200
yum 201
pup 202
Compiling Software from Source
203

Building
rpms from src.rpm Files 203
Working with Source RPM Files
204
Compile from Source Tarballs
206
Reference
208
8 On the Internet: Surfing the Web, Writing Email,
and Reading the News 209
Choosing a Web Browser
209
Mozilla Firefox
210
The Mozilla Suite
211
Epiphany
212
Konqueror
212
Choosing an Email Client
213
Evolution
215
Mozilla Thunderbird
217
Balsa
217
KMail
219

Mozilla Mail
219
The
mail Application 220
mutt 222
Other Mail Clients
224
An Overview of Network News
224
Newsgroups
225
Selecting a Newsreader
226
The
slrn News Client 226
The Pan News Client
226
The KNode News Client
228
The Mozilla News Client
229
The Thunderbird News Client
231
RSS Readers
231
Firefox
231
Blam
231
Collaborating with TWiki

232
Internet Relay Chat
234
Internet Messaging with GAIM
236
Videoconferencing with Ekiga
236
Reference
238
Contents xi
9 Productivity Applications 239
Office Suites for Fedora
240
Working with OpenOffice.org
241
Working with OpenOffice.org Writer
244
Working with OpenOffice.org Calc
247
Working with Gnome Office
252
Working with KOffice
255
Productivity Applications Written for Microsoft Windows
259
Reference
260
10 Multimedia Applications 261
Burning CDs and DVDs in Fedora Core Linux
262

Creating CDs from the Command Line
263
Creating DVDs from the Command Line
265
Creating CDs and DVDs with Fedora’s Graphical Clients
267
Sound and Music
270
Sound Cards
271
Recording Sound
271
Sound Formats
271
Music Players
273
Streaming Audio
274
Viewing TV and Video
275
TV and Video Hardware
275
Video Formats
277
Viewing Video in Linux
278
Viewing Television with Linux
279
Personal Video Recorders
280

DVD and Video Players
281
Reference
283
11 Graphics Manipulation 285
Graphics Manipulation
285
The GNU Image Manipulation Program
285
Using Digital Cameras with Fedora
287
Webcams
287
Handheld Digital Cameras
288
Using F-Spot
290
Using Scanners in Fedora
292
Working with Graphics Formats
293
Capturing Screen Images
296
Reference
297
Red Hat Fedora Core 6 Unleashedxii
12 Printing with Fedora 299
Overview of Fedora Printing
299
Configuring and Managing Print Services

301
GUI-Based Printer Configuration Quickstart
302
Console-Based Printer Configuration Quickstart
303
Managing Printing Services
303
Creating and Configuring Local Printers
305
Creating the Print Queue
306
Editing Printer Settings
310
Reference
311
13 Games 313
Linux Gaming
313
Installing Proprietary Video Drivers
314
Installing DOOM 3
315
Installing Unreal Tournament 2004
317
Installing Quake 4
318
Installing Wolfenstein: Enemy Territory
319
Battle of Wesnoth
319

KDEedu
320
Playing Windows Games with Cedega
321
Reference
322
Part III System Administration
14 Managing Users 325
User Accounts
325
User IDs and Group IDs
327
File Permissions
327
Managing Groups
328
Group Management Tools
330
Managing Users
332
User Management Tools
332
Adding New Users
334
Monitoring User Activity on the System
335
Managing Passwords
336
System Password Policy
336

The Password File
336
Shadow Passwords
338
Managing Password Security for Users
340
Changing Passwords in a Batch
341
Contents xiii
Granting System Administrator Privileges to Regular Users 341
Temporarily Changing User Identity with the
su Command 341
Granting Root Privileges on Occasion—The
sudo Command 343
Control Via Restricted Shells
346
The User Login Process
346
Disk Quotas
348
Implementing Quotas
348
Manually Configuring Quotas
349
Reference
350
15 Automating Tasks 351
Running Services at Bootup
352
Beginning the Boot Loading Process

352
Loading the Linux Kernel
353
System Services and Runlevels
354
Runlevel Definitions
355
Booting into the Default Runlevel
356
Booting to a Nondefault Runlevel with GRUB
358
Understanding
init Scripts and the Final Stage
of Initialization
359
Controlling Services at Boot with Administrative Tools
360
Running Services Through
xinetd 363
Changing Runlevels
364
Troubleshooting Runlevel Problems
365
Starting and Stopping Services Manually
366
Scheduling Tasks
367
Using
at and batch to Schedule Tasks for Later 367
Using

cron to Run Jobs Repeatedly 369
Basic Shell Control
372
The Shell Command Line
373
Shell Pattern-Matching Support
374
Redirecting Input and Output
375
Piping Data
376
Background Processing
377
Writing and Executing a Shell Script
377
Running the New Shell Program
379
Storing Shell Scripts for Systemwide Access
380
Interpreting Shell Scripts Through Specific Shells
380
Using Variables in Shell Scripts
382
Assigning a Value to a Variable
382
Accessing Variable Values
383
Positional Parameters
383
Red Hat Fedora Core 6 Unleashedxiv

A Simple Example of a Positional Parameter 383
Using Positional Parameters to Access and Retrieve
Variables from the Command Line
384
Using a Simple Script to Automate Tasks
384
Built-in Variables
387
Special Characters
387
Use Double Quotes to Resolve Variables in Strings
with Embedded Spaces
388
Using Single Quotes to Maintain Unexpanded Variables
389
Using the Backslash As an Escape Character
390
Using the Backtick to Replace a String with Output
390
Comparison of Expressions in
pdksh and bash 390
Comparing Expressions with
tcsh 396
The
for Statement 400
The
while Statement 401
The
until Statement 403
The

repeat Statement (tcsh) 404
The
select Statement (pdksh) 404
The
shift Statement 405
The
if Statement 405
The
case Statement 407
The
break and exit Statements 408
Using Functions in Shell Scripts
409
Reference
410
16 System Resources 413
System-Monitoring Tools
413
Console-Based Monitoring
413
Using the
kill Command to Control Processes 415
Using Priority Scheduling and Control
416
Displaying Free and Used Memory with
free 418
Disk Quotas
418
Graphical Process- and System Management Tools
419

KDE Process- and System-Monitoring Tools
422
Reference
422
17 Backing Up, Restoring, and Recovery 423
Choosing a Backup Strategy
423
Why Data Loss Occurs
424
Assessing Your Backup Needs and Resources
425
Evaluating Backup Strategies
427
Making the Choice
429
Contents xv
Choosing Backup Hardware and Media 430
Removable Storage Media
430
Network Storage
431
Tape Drive Backup
432
Using Backup Software
432
tar: The Most Basic Backup Tool 433
The GNOME File Roller
435
The KDE Archiving Tools (KDE
ark and kdat) 435

Using the
dd Command for Archiving 437
Using the Amanda Backup Application
438
Alternative Backup Software
438
Copying Files
439
Copying Files Using
tar 439
Compressing, Encrypting, and Sending
tar Streams 440
Copying Files Using
cp 441
Copying Files Using
mc 441
Copying Files Using
scp 442
Copying Files Using
rsync 444
Undeleting Files
446
Reformatting with the
-S Option When Experiencing
Unrecoverable File System Errors
446
Undeleting Files Using
mc 446
System Rescue
447

The Fedora Rescue Disc
448
Backing Up and Restoring the Master Boot Record
448
Manually Restoring the Partition Table
448
Booting the System from the Rescue Disc
449
Booting the System from a Generic Boot Floppy Disk
450
Using a GRUB Boot Floppy Disk
450
Using the Recovery Facility from the Installation Disc
451
Reference
453
18 Network Connectivity 455
Laying the Foundation: The
localhost Interface 455
Checking for the Availability of the Loopback Interface
456
Configuring the Loopback Interface Manually
456
Networking with TCP/IP
457
TCP/IP Addressing
458
Using IP Masquerading in Fedora
460
Ports

461
Red Hat Fedora Core 6 Unleashedxvi
Network Organization 462
Subnetting
462
Subnet Masks
462
Unicast, Multicast, and Broadcast Addressing
463
Hardware Devices for Networking
463
Network Interface Cards
463
Network Cable
466
Hubs and Switches
467
Routers and Bridges
468
Initializing New Network Hardware
468
Using Network Configuration Tools
471
Command-Line Network Interface Configuration
472
Network Configuration Files
476
Using Graphical Configuration Tools
479
Dynamic Host Configuration Protocol

481
How DHCP Works
481
Activating DHCP at Installation and Boot Time
482
DHCP Software Installation and Configuration
483
Using DHCP to Configure Network Hosts
484
Other Uses for DHCP
487
Wireless Networking
487
Support for Wireless Networking in Fedora
487
Cellular Networking
488
Advantages of Wireless Networking
489
Choosing from Among Available Wireless Protocols
489
Beyond the Network and onto the Internet
490
Common Configuration Information
491
Configuring Digital Subscriber Line Access
492
Understanding Point-to-Point Protocol over Ethernet
493
Configuring a PPPoE Connection Manually

493
Configuring Dial-Up Internet Access
495
Configuring a Dial-Up Connection Manually
495
Using the Fedora Internet Configuration Wizard
498
Troubleshooting Connection Problems
501
Configuring a Dial-In PPP Server
502
Using Patches/Upgrades to Keep Your Network Secure
505
Reference
505
General
505
DHCP
505
Wireless
506
Books
506
Contents xvii
19 Remote Access with SSH and Telnet 507
Setting Up a Telnet Server
507
Telnet Versus SSH
508
Setting Up an SSH Server

508
The SSH Tools
509
Using
scp to Copy Individual Files Between Machines 510
Using
sftp to Copy Many Files Between Machines 510
Using
ssh-keygen to Enable Key-Based Logins 511
Remote X
512
XDMCP
513
VNC
514
Reference
514
20 Xen 515
Why Virtualization Is a Smart Idea
515
Virtualization Versus Paravirtualization
516
How Xen Works
517
Installing Xen
517
Setting Up Guest Operating Systems
518
Runtime Configuration
519

Reference
520
Part IV Fedora As a Server
21 Apache Web Server Management 523
About the Apache Web Server
523
Installing the Apache Server
525
Installing from the RPM
525
Building the Source Yourself
527
Starting and Stopping Apache
530
Starting the Apache Server Manually
530
Using
/etc/rc.d/init.d/httpd 531
Controlling Apache with Red Hat’s
service Command 533
Controlling Apache with Red Hat’s
chkconfig Command 533
Controlling Apache with Red Hat’s
system-config-services
Client 534
Runtime Server Configuration Settings
535
Runtime Configuration Directives
535
Editing

httpd.conf 536
Apache Multiprocessing Modules
538
Using
.htaccess Configuration Files 539
Red Hat Fedora Core 6 Unleashedxviii
File System Authentication and Access Control 541
Restricting Access with
allow and deny 541
Authentication
542
Final Words on Access Control
545
Apache Modules
545
mod_access 546
mod_alias 546
mod_asis 546
mod_auth 547
mod_auth_anon 547
mod_auth_dbm 547
mod_auth_digest 547
mod_autoindex 548
mod_cgi 548
mod_dir and mod_env 548
mod_expires 548
mod_headers 548
mod_include 549
mod_info and mod_log_config 549
mod_mime and mod_mime_magic 549

mod_negotiation 549
mod_proxy 549
mod_rewrite 549
mod_setenvif 550
mod_speling 550
mod_status 550
mod_ssl 550
mod_unique_id 550
mod_userdir 550
mod_usertrack 550
mod_vhost_alias 550
Virtual Hosting
551
Address-Based Virtual Hosts
551
Name-Based Virtual Hosts
552
Logging
553
Dynamic Content
555
CGI
555
SSI
556
Basic SSI Directives
557
Flow Control
561
Contents xix

Graphic Interface Configuration of Apache 561
Configuring Virtual Host Properties
562
Configuring the Server
563
Configuring Apache for Peak Performance
564
Other Web Servers for Use with Fedora
564
Sun Java System Web Server
564
Stronghold
565
Zope
565
Zeus Web Server
565
Reference
566
22 Administering Database Services 567
A Brief Review of Database Basics
568
How Relational Databases Work
569
Understanding SQL Basics
571
Creating Tables
571
Inserting Data into Tables
573

Retrieving Data from a Database
573
Choosing a Database: MySQL Versus PostgreSQL
575
Speed
576
Data Locking
576
ACID Compliance in Transaction Processing to Protect
Data Integrity
577
SQL Subqueries
577
Procedural Languages and Triggers
578
Configuring MySQL
578
Setting a Password for the MySQL Root User
579
Creating a Database in MySQL
579
Granting and Revoking Privileges in MySQL
580
Configuring PostgreSQL
581
Initializing the Data Directory in PostgreSQL
582
Creating a Database in PostgreSQL
583
Creating Database Users in PostgreSQL

584
Deleting Database Users in PostgreSQL
584
Granting and Revoking Privileges in PostgreSQL
585
Database Clients
586
SSH Access to a Database
586
Local GUI Client Access to a Database
587
Web Access to a Database
588
The MySQL Command-Line Client
588
Red Hat Fedora Core 6 Unleashedxx
The PostgreSQL Command-Line Client 590
Graphical Clients
591
Reference
592
23 File and Print 593
Using the Network File System
593
Installing and Starting or Stopping NFS
594
NFS Server Configuration
594
NFS Client Configuration
596

Putting Samba to Work
597
Manually Configuring Samba with
/etc/samba/smb.conf 598
Testing Samba with the
testparm Command 601
Starting the
smbd Daemon 601
Mounting Samba Shares
602
Configuring Samba Using SWAT
603
Network and Remote Printing with Fedora
608
Creating Network Printers
608
Enabling Network Printing on a LAN
608
Session Message Block Printing
611
Network-Attached Printer Configuration and Printing
612
Console Print Control
613
Console-Based Printer Configuration
613
Using Basic Print Commands
614
Managing Print Jobs
615

Using the Common UNIX Printing System GUI
616
Creating a CUPS Printer Entry
618
Avoiding Printer Support Problems
621
All-in-One (Print/Fax/Scan) Devices
621
Using USB and Legacy Printers
622
Reference
623
24 Remote File Serving with FTP 625
Using FTP Clients
625
The FTP Client Interface
626
Using the Text-Based FTP Client Interface
626
Using Graphical FTP Clients
633
FTP Servers
636
Choosing an Authenticated or Anonymous Server
637
Fedora FTP Server Packages
637
Other FTP Servers
637
Installing FTP Software

638
Contents xxi
The FTP User 639
xinetd Configuration for wu-ftpd 641
Configuring
xinetd for the wu-ftp Server 641
Starting the Very Secure FTP Server (
vsftpd) Package 642
Configuring the Very Secure FTP Server
643
Controlling Anonymous Access
643
Other
vsftpd Server Configuration Files 644
Configuring the
wu-ftpd Server 646
Using Commands in the
ftpaccess File to Configure wu-ftpd 647
Configure Access Control
647
Configure User Information
650
Configure System Logging
654
Configure Permission Control
655
Configure Commands Directed Toward the
cdpath 657
Structure of the
shutdown File 658

Configure FTP Server File-Conversion Actions
658
Strip Prefix
659
Strip Postfix
659
Add-On Prefix
659
Add-On Postfix
659
External Command
660
Types
660
Options
660
Description
660
An Example of Conversions in Action
660
Using Commands in the
ftphosts File to Allow or Deny
FTP Server Connection
661
Server Administration
662
Display Information About Connected Users
662
Count the Number of Connections
664

Use
/usr/sbin/ftpshut to Schedule FTP Server Downtime 664
Use
/var/log/xferlog to View a Log of Server Transactions 666
Reference
667
25 Handling Electronic Mail 669
How Email Is Sent and Received
669
The Mail Transport Agent
670
Choosing an MTA
672
The Mail Delivery Agent
673
The Mail User Agent
673
Red Hat Fedora Core 6 Unleashedxxii
Basic Sendmail Configuration and Operation 674
Configuring Masquerading
675
Using Smart Hosts
675
Setting Message Delivery Intervals
676
Building the
sendmail.cf File 676
Mail Relaying
677
Forwarding Email with Aliases

677
Rejecting Email from Specified Sites
678
Introducing Postfix
679
Making the Switch
679
Using Fetchmail to Retrieve Mail
680
Installing Fetchmail
681
Configuring Fetchmail
681
Choosing a Mail Delivery Agent
684
Procmail
685
Spamassassin
685
Squirrelmail
685
Virus Scanners
686
Special Mail Delivery Agents
686
Mail Daemons
686
Alternatives to Microsoft Exchange Server
687
Microsoft Exchange Server/Outlook Client

687
CommuniGate Pro
688
Oracle Collaboration Suite
688
Open Xchange
688
Conclusion
688
Reference
689
Web Resources
689
Books
690
26 Setting Up a Proxy Server 691
What Is a Proxy Server?
691
Installing Squid
692
Configuring Clients
692
Access Control Lists
693
Specifying Client IP Addresses
698
Sample Configurations
699
Reference
700

Contents xxiii
27 Managing DNS 701
Configuring DNS for Clients
702
Understanding the
/etc/host.conf File 703
Understanding the
/etc/nsswitch.conf File 703
Understanding the
/etc/hosts File 704
Understanding the
/etc/resolv.conf File 705
Understanding the Changes Made by DHCP
705
Essential DNS Concepts
706
How Nameservers Store DNS Structure Information
707
How DNS Provides Name Service Information to Users
707
Name Resolution in Practice
708
Using DNS Tools
708
dig 709
host 710
nslookup 710
whois 710
Configuring a Local Caching Nameserver
713

Your Own Domain Name and Third-Party DNS
714
Providing DNS for a Real Domain with BIND
715
rndc.conf 717
named.conf 717
Logging
722
Resolver Configuration
723
Running the
named Nameserver Daemon 724
Providing DNS for a Real Domain
725
Forward Zone
725
Reverse Zone
727
Registering the Domain
728
Troubleshooting DNS
728
Delegation Problems
729
Reverse Lookup Problems
729
Maintaining Accurate Serial Numbers
730
Troubleshooting Problems in Zone Files
730

Tools for Troubleshooting
731
Using Fedora’s BIND Configuration Tool
731
Managing DNS Security
733
UNIX Security Considerations
733
DNS Security Considerations
734
Using DNS Security Extensions
737
Using Split DNS
738
Reference
739
Red Hat Fedora Core 6 Unleashedxxiv
28 LDAP 741
Configuring the Server
742
Populating Your Directory
744
Configuring Clients
747
Evolution
747
Thunderbird
748
Administration
748

Reference
749
29 News Servers 751
Types of News Servers
751
Full Newsfeed Servers
752
Leaf Node Servers
752
Local News Servers
753
The INN Package and Configuration Files
753
Installing the INN Package
755
Configuring
innd 755
The
inn.conf File 755
The
incoming.conf File 757
The
storage.conf File 757
The
readers.conf File 758
The
active and newsgroups Files 760
The
history Files 761
Running

innd 762
Reference
763
Part V Programming Linux
30 Using Perl 767
Using Perl with Linux
767
Perl Versions
768
A Simple Perl Program
768
Perl Variables and Data Structures
770
Perl Variable Types
770
Special Variables
771
Operators
772
Comparison Operators
772
Compound Operators
773
Arithmetic Operators
773
Other Operators
773
Special String Constants
774

×