“As this book shows, Linux systems are just as functional, secure, and reliable as their proprietary counterparts. Thanks to the ongoing efforts of thousands of Linux developers, Linux is more ready than ever for deployment at the frontlines of the real world. The authors of this book know that terrain well, and I am happy to leave you in their most capable hands.”—Linus Torvalds“The most successful sysadmin book of all time—because it works!”—Rik Farrow, editor of ;login:“This book clearly explains current technology with the perspective of decades of experience in large-scale system administration. Unique and highly recommended.”—Jonathan Corbet, cofounder, LWN.net“Nemeth et al. is the overall winner for Linux administration: it’s intelligent, full of insights, and looks at the implementation of concepts.” —Peter Salus, editorial director, Matrix.netSince 2001, Linux Administration Handbook has been the definitive resource for every Linux® system administrator who must efficiently solve technical problems and maximize the reliability and performance of a production environment. Now, the authors have systematically updated this classic guide to address today’s most important Linux distributions and most powerful new administrative tools.The authors spell out detailed best practices for every facet of system administration, including storage management, network design and administration, web hosting, software configuration management, performance analysis, Windows interoperability, and much more. Sysadmins will especially appreciate the thorough and up-to-date discussions of such difficult topics such as DNS, LDAP, security, and the management of IT service organizations.Linux® Administration Handbook, Second Edition, reflects the current versions of these leading distributions:Red Hat® Enterprise Linux®FedoraTM CoreSUSE® Linux EnterpriseDebian® GNU/LinuxUbuntu® LinuxSharing their war stories and hard-won insights, the authors capture the behavior of Linux systems in the real world, not just in ideal environments. They explain complex tasks in detail and illustrate these tasks with examples drawn from their extensive hands-on experience.
Author(s): Evi Nemeth, Garth Snyder, Trent R. Hein
Edition: 2
Year: 2006
Language: English
Pages: 1040
CONTENTS......Page 4
FOREWORD TO THE FIRST EDITION......Page 34
PREFACE......Page 35
ACKNOWLEDGMENTS......Page 38
SECTION ONE: BASIC ADMINISTRATION......Page 40
CHAPTER 1 WHERE TO START......Page 42
Linux’s relationship to UNIX......Page 43
Linux in historical context......Page 44
Linux distributions......Page 45
Notation and typographical conventions......Page 48
Where to go for information......Page 50
How to find and install software......Page 53
Essential tasks of the system administrator......Page 55
System administration under duress......Page 57
Recommended reading......Page 58
Exercises......Page 59
Bootstrapping......Page 60
Booting PCs......Page 64
Using boot loaders: LILO and GRUB......Page 65
Booting single-user mode......Page 70
Working with startup scripts......Page 71
Rebooting and shutting down......Page 79
Exercises......Page 82
Ownership of files and processes......Page 83
The superuser......Page 85
Choosing a root password......Page 86
Becoming root......Page 87
Other pseudo-users......Page 90
Exercises......Page 91
Components of a process......Page 92
The life cycle of a process......Page 95
Signals......Page 96
Process states......Page 99
nice and renice: influence scheduling priority......Page 100
ps: monitor processes......Page 101
The /proc filesystem......Page 104
strace: trace signals and system calls......Page 105
Runaway processes......Page 106
Exercises......Page 108
CHAPTER 5 THE FILESYSTEM......Page 109
Pathnames......Page 111
Filesystem mounting and unmounting......Page 112
The organization of the file tree......Page 114
File types......Page 115
File attributes......Page 120
Access control lists......Page 127
Exercises......Page 131
The /etc/passwd file......Page 132
The /etc/shadow file......Page 138
The /etc/group file......Page 140
Adding users......Page 141
Removing users......Page 146
Managing accounts......Page 147
Exercises......Page 149
Disk interfaces......Page 150
Disk geometry......Page 158
Linux filesystems......Page 159
An overview of the disk installation procedure......Page 161
hdparm: set IDE interface parameters......Page 168
fsck: check and repair filesystems......Page 170
Adding a disk: a step-by-step guide......Page 172
Advanced disk management: RAID and LVM......Page 177
Mounting USB drives......Page 186
Exercises......Page 187
cron: schedule commands......Page 189
The format of crontab files......Page 190
Crontab management......Page 192
Some common uses for cron......Page 193
Other schedulers: anacron and fcron......Page 195
Exercises......Page 196
CHAPTER 9 BACKUPS......Page 197
Motherhood and apple pie......Page 198
Backup devices and media......Page 202
Setting up an incremental backup regime with dump......Page 208
Restoring from dumps with restore......Page 212
Dumping and restoring for upgrades......Page 215
Using other archiving programs......Page 216
Using multiple files on a single tape......Page 217
Bacula......Page 218
Commercial backup products......Page 236
Exercises......Page 237
Logging policies......Page 240
Linux log files......Page 243
logrotate: manage log files......Page 247
Syslog: the system event logger......Page 248
Condensing log files to useful information......Page 259
Exercises......Page 261
Basic Linux installation......Page 262
Diskless clients......Page 271
Package management......Page 273
High-level package management systems......Page 276
Revision control......Page 286
Localization and configuration......Page 294
Configuration management tools......Page 299
Sharing software over NFS......Page 302
Recommended software......Page 305
Exercises......Page 307
SECTION TWO: NETWORKING......Page 308
CHAPTER 12 TCP/IP NETWORKING......Page 310
TCP/IP and the Internet......Page 311
Networking road map......Page 314
Packets and encapsulation......Page 315
IP addresses: the gory details......Page 321
Routing......Page 332
ARP: the address resolution protocol......Page 335
Addition of a machine to a network......Page 336
Distribution-specific network configuration......Page 346
DHCP: the Dynamic Host Configuration Protocol......Page 350
Dynamic reconfiguration and tuning......Page 353
Security issues......Page 355
Linux NAT......Page 358
PPP: the Point-to-Point Protocol......Page 359
Linux networking quirks......Page 369
Recommended reading......Page 370
Exercises......Page 371
CHAPTER 13 ROUTING......Page 373
Packet forwarding: a closer look......Page 374
Routing daemons and routing protocols......Page 376
Protocols on parade......Page 380
routed: RIP yourself a new hole......Page 382
Routing strategy selection criteria......Page 383
Cisco routers......Page 385
Recommended reading......Page 387
Exercises......Page 388
CHAPTER 14 NETWORK HARDWARE......Page 389
Ethernet: the common LAN......Page 390
Wireless: nomad’s LAN......Page 398
FDDI: the disappointing, expensive, and outdated LAN......Page 400
ATM: the promised (but sorely defeated) LAN......Page 401
Frame relay: the sacrificial WAN......Page 402
DSL and cable modems: the people’s WAN......Page 403
Where is the network going?......Page 404
Building wiring......Page 405
Network design issues......Page 407
Management issues......Page 409
Recommended vendors......Page 410
Exercises......Page 411
CHAPTER 15 DNS: THE DOMAIN NAME SYSTEM......Page 412
DNS for the impatient: adding a new machine......Page 413
The history of DNS......Page 414
Who needs DNS?......Page 416
The DNS namespace......Page 417
How DNS works......Page 422
What’s new in DNS......Page 425
The DNS database......Page 428
The BIND software......Page 448
Designing your DNS environment......Page 454
BIND client issues......Page 457
BIND server configuration......Page 459
BIND configuration examples......Page 478
Starting named......Page 485
Updating zone files......Page 486
Security issues......Page 490
Testing and debugging......Page 505
Distribution specifics......Page 517
Recommended reading......Page 520
Exercises......Page 521
General information about NFS......Page 523
Server-side NFS......Page 528
Client-side NFS......Page 531
nfsstat: dump NFS statistics......Page 534
Dedicated NFS file servers......Page 535
Automatic mounting......Page 536
Recommended reading......Page 539
Exercises......Page 540
CHAPTER 17 SHARING SYSTEM FILES......Page 541
What to share......Page 542
nscd: cache the results of lookups......Page 543
Copying files around......Page 544
NIS: the Network Information Service......Page 550
LDAP: the Lightweight Directory Access Protocol......Page 559
Recommended reading......Page 565
Exercises......Page 566
CHAPTER 18 ELECTRONIC MAIL......Page 567
Mail systems......Page 569
The anatomy of a mail message......Page 573
Mail philosophy......Page 578
Mail aliases......Page 583
Mailing lists and list wrangling software......Page 590
sendmail: ringmaster of the electronic mail circus......Page 596
sendmail configuration......Page 604
Basic sendmail configuration primitives......Page 609
Fancier sendmail configuration primitives......Page 613
Spam-related features in sendmail......Page 627
Configuration file case study......Page 638
Security and sendmail......Page 642
sendmail performance......Page 650
sendmail statistics, testing, and debugging......Page 654
The Exim Mail System......Page 660
Postfix......Page 662
Recommended reading......Page 678
Exercises......Page 679
CHAPTER 19 NETWORK MANAGEMENT AND DEBUGGING......Page 682
Network troubleshooting......Page 683
ping: check to see if a host is alive......Page 684
traceroute: trace IP packets......Page 686
netstat: get network statistics......Page 688
sar: inspect live interface activity......Page 693
Packet sniffers......Page 694
Network management protocols......Page 696
SNMP: the Simple Network Management Protocol......Page 698
The NET-SMNP agent......Page 700
Network management applications......Page 701
Recommended reading......Page 706
Exercises......Page 707
CHAPTER 20 SECURITY......Page 708
Is Linux secure?......Page 709
How security is compromised......Page 710
Certifications and standards......Page 712
Security tips and philosophy......Page 715
Security problems in /etc/passwd and /etc/shadow......Page 717
Setuid programs......Page 722
Important file permissions......Page 723
Miscellaneous security issues......Page 724
Security power tools......Page 727
Cryptographic security tools......Page 733
Firewalls......Page 740
Linux firewall features: IP tables......Page 743
Virtual private networks (VPNs)......Page 747
What to do when your site has been attacked......Page 749
Sources of security information......Page 751
Recommended reading......Page 754
Exercises......Page 755
CHAPTER 21 WEB HOSTING AND INTERNET SERVERS......Page 758
Web hosting basics......Page 759
HTTP server installation......Page 763
Virtual interfaces......Page 766
The Secure Sockets Layer (SSL)......Page 769
Caching and proxy servers......Page 772
Anonymous FTP server setup......Page 773
Exercises......Page 775
SECTION THREE: BUNCH O' STUFF......Page 778
CHAPTER 22 THE X WINDOW SYSTEM......Page 780
The X display manager......Page 782
Running an X application......Page 783
X server configuration......Page 787
Troubleshooting and debugging......Page 793
A brief note on desktop environments......Page 796
Exercises......Page 798
CHAPTER 23 PRINTING......Page 800
Printers are complicated......Page 801
Printer languages......Page 802
CUPS architecture......Page 806
CUPS server administration......Page 811
Troubleshooting tips......Page 819
Printer practicalities......Page 821
Other printer advice......Page 823
Printing under KDE......Page 827
Exercises......Page 829
Hardware maintenance basics......Page 830
Maintenance contracts......Page 831
Electronics-handling lore......Page 832
Memory modules......Page 833
Preventive maintenance......Page 834
Environment......Page 835
Power......Page 837
Racks......Page 838
Recommended reading......Page 839
Exercises......Page 841
CHAPTER 25 PERFORMANCE ANALYSIS......Page 842
What you can do to improve performance......Page 843
Factors that affect performance......Page 845
System performance checkup......Page 846
Help! My system just got really slow!......Page 856
Exercises......Page 858
Logging in to a Linux system from Windows......Page 860
Accessing remote desktops......Page 861
Running Windows and Windows-like applications......Page 864
Using command-line tools with Windows......Page 865
Windows compliance with email and web standards......Page 866
Sharing files with Samba and CIFS......Page 867
Sharing printers with Samba......Page 875
Debugging Samba......Page 879
Recommended reading......Page 880
Exercises......Page 881
CHAPTER 27 SERIAL DEVICES......Page 882
The RS-232C standard......Page 883
Alternative connectors......Page 886
Hardware flow control......Page 891
Serial device files......Page 892
setserial: set serial port parameters......Page 893
Configuration of hardwired terminals......Page 894
Special characters and the terminal driver......Page 898
stty: set terminal options......Page 899
tset: set options automatically......Page 900
Modems......Page 901
Debugging a serial line......Page 903
Other common I/O ports......Page 904
Exercises......Page 905
CHAPTER 28 DRIVERS AND THE KERNEL......Page 907
Kernel adaptation......Page 908
Drivers and device files......Page 909
Why and how to configure the kernel......Page 912
Tuning Linux kernel parameters......Page 913
Building a Linux kernel......Page 915
Adding a Linux device driver......Page 917
Loadable kernel modules......Page 919
Hot-plugging......Page 921
Setting bootstrap options......Page 922
Exercises......Page 923
CHAPTER 29 DAEMONS......Page 924
init: the primordial process......Page 925
xinetd and inetd: manage daemons......Page 926
Kernel daemons......Page 932
Printing daemons......Page 933
File service daemons......Page 934
Administrative database daemons......Page 935
Electronic mail daemons......Page 936
Booting and configuration daemons......Page 937
Other network daemons......Page 939
ntpd: time synchronization daemon......Page 941
Exercises......Page 942
Make everyone happy......Page 943
Components of a functional IT organization......Page 945
The role of management......Page 946
The role of administration......Page 954
The role of development......Page 958
The role of operations......Page 963
The work of support......Page 966
Documentation......Page 969
Request-tracking and trouble-reporting systems......Page 973
Disaster recovery......Page 977
Written policy......Page 982
Legal Issues......Page 988
Software patents......Page 996
Standards......Page 997
Linux culture......Page 1000
Mainstream Linux......Page 1001
Organizations, conferences, and other resources......Page 1003
Recommended Reading......Page 1007
Exercises......Page 1009
A......Page 1012
B......Page 1013
C......Page 1014
D......Page 1015
E......Page 1017
F......Page 1018
G......Page 1019
I......Page 1020
K......Page 1021
L......Page 1022
M......Page 1023
N......Page 1024
P......Page 1026
R......Page 1028
S......Page 1030
T......Page 1034
U......Page 1035
W......Page 1036
Z......Page 1037
ABOUT THE CONTRIBUTORS......Page 1038
ABOUT THE AUTHORS......Page 1040