Debian GNU Linux Bible, Hungry Minds

Debian GNU Linux Bible
Debian GNU Linux Bible

About the Author
Steve Hunger has spent the last 10 years in the computer industry, the last four
supporting and integrating multiple platforms for a Fortune 500 Company. Having
been introduced to UNIX while attending Purdue University, he quickly latched onto
Linux as the primary platform for his startup Web hosting and development business
in 1996. He continues operating his Web business, consulting with local businesses,
and freelance writing. When not conquering the world with Linux, he has
co-written and contributed to several books for Macmillan USA and Brady Games,
including work on the line of Mandrake Linux products. His latest work has been for
AOL Press called Powering Up the Internet.

In his spare time he enjoys relaxing with his wife, riding bicycles, and tinkering with
an R/C model that is evolving into something that looks amazing like a plane. He is
also on the Board of Directors for the Central Indiana Linux Users Group
(www.cinlug.org). Steve can be reached at steve@rhinoworld.com.

Preface
As Linux becomes more and more popular, resources to learn and use Linux
become more important. These resources help to guide, direct, and inform an
individual to make the best use of the tools available, just as a stack of boards,
nails, and a hammer don’t make a house—it takes the skilled craftsmanship of a
carpenter to turn the parts into a whole house. Debian GNU/Linux Bible gives you
the skilled guidance to help you turn the individual parts into a system.


Contents at a Glance
Foreword
Preface 
Acknowledgments
Part I: Getting Started
Chapter 1: Introduction to Linux .. . 3
Chapter 2: Installing Debian . . 13
Chapter 3: First Steps as a Linux User  . . 41
Chapter 4: Choosing a GUI . . 63
Chapter 5: Networking . . . 91
Chapter 6: Setting Up for the Internet .  113
Part II: Working with Debian
Chapter 7: Applications. . 133
Chapter 8: Productivity Applications . . 157
Chapter 9: Essential Tools. . 179
Chapter 10: Multimedia .  . 203
Chapter 11: Games . . 217
Part III: Administering Linux
Chapter 12: System Administration .  . 237
Chapter 13: Scripting . . 265
Chapter 14: Shells . . 293
Chapter 15: Linux Kernel . .313
Part IV: Maintenance and Upgrade
Chapter 16: Finding Updated Files . .  337
Chapter 17: Hardware . . 347
Chapter 18: Backups . . 371
Part V: Linux Server 
Chapter 19: Security . . 397
Chapter 20: Firewall. . . 415
Chapter 21: Web Server . 431
Chapter 22: FTP Server .  . . 463
Chapter 23: Network Information System . . 485
Chapter 24: File Server .  . 495
Chapter 25: Mail
Appendix A: What’s On the CD-ROM  . 539
Appendix B: Linux Commands . . 543
Appendix C: Debian Packages  . . 557
Index   . 625
GNU General Public License . .   659
CD-ROM Installation Instructions .  . 664
++++++++++++++++
Contents
Foreword
Preface
Acknowledgments
Part I: Getting Started
Chapter 1: Introduction to Linux
Understanding the Role of the Operating System . . . . . . . . . . . . . . . . 3
History of GNU/Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Linux versus Other Operating Systems . . . . . . . . . . . . . . . . . . . . . . 6
The Word on Free Software and Open Source . . . . . . . . . . . . . . . . . . 8
What’s So Special about GNU/Linux? . . . . . . . . . . . . . . . . . . . . . . . 8
Understanding the Debian Distribution . . . . . . . . . . . . . . . . . . . . . 10
Chapter 2: Installing Debian
Preparing Your System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Basic Debian Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Booting off the CD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
The main menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Configuring the keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Partitioning a hard disk . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Initializing and activating a swap partition . . . . . . . . . . . . . . . . 18
Initializing a Linux partition . . . . . . . . . . . . . . . . . . . . . . . . 18
Initializing the operating system kernel and modules . . . . . . . . . 19
Configuring device driver modules . . . . . . . . . . . . . . . . . . . . 20
Configuring the network . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Installing the base system . . . . . . . . . . . . . . . . . . . . . . . . . 22
Configuring the base system . . . . . . . . . . . . . . . . . . . . . . . . 23
Booting Linux directly from the hard drive . . . . . . . . . . . . . . . 24
Making a boot floppy . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Rebooting the system . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Configuring the Debian system . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Apt configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Using the Debian Package-Management System . . . . . . . . . . . . . . . . 31
What are deb packages? . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Adding deb packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Changing the package archive source . . . . . . . . . . . . . . . . . . 35
Gnome-apt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Installing Non-Debian Software . . . . . . . . . . . . . . . . . . . . . . . . . . 37
RPM packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
tar packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Chapter 3: First Steps as a Linux User 
Logging In and Out of Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Basic Navigation with Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Finding special file locations . . . . . . . . . . . . . . . . . . . . . . . . 43
Finding ready-reference documentation . . . . . . . . . . . . . . . . . 45
Maneuvering through the files . . . . . . . . . . . . . . . . . . . . . . . 48
Stopping the System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Using the reboot, halt, and poweroff commands . . . . . . . . . . . . 56
Using the shutdown command . . . . . . . . . . . . . . . . . . . . . . . 57
Working with the Filesystem and Related Commands . . . . . . . . . . . . . 58
Mounting drives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Chapter 4: Choosing a GUI
Linux’s Graphical User Interface . . . . . . . . . . . . . . . . . . . . . . . . . 63
Deciding on a Graphical Interface . . . . . . . . . . . . . . . . . . . . . . . . 65
Installing and Configuring the X Environment . . . . . . . . . . . . . . . . . 66
X system requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Installing fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Installing the Display Manager . . . . . . . . . . . . . . . . . . . . . . . 69
XF86Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Starting the X server . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Starting X remotely . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Managing the X server . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Installing and Using Window Managers . . . . . . . . . . . . . . . . . . . . . 79
FVWM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Enlightenment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Window Maker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Installing and Using Desktop Environments . . . . . . . . . . . . . . . . . . 84
GNOME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
KDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Troubleshooting Your New Components . . . . . . . . . . . . . . . . . . . . 88
Chapter 5: Networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Components of the Linux Network . . . . . . . . . . . . . . . . . . . . . . . . 91
TCP/IP Network Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
IP addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Network classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Ports and services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Netmasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Understanding Host Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Understanding Domain Names and the DNS . . . . . . . . . . . . . . . . . . 97
Setting Up the Physical Network . . . . . . . . . . . . . . . . . . . . . . . . 100
Ethernet cards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Hubs and switches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Cables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Setting Up the Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Making Changes to the Network . . . . . . . . . . . . . . . . . . . . . . . . 104
Making manual changes . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Adding IP addresses to one Ethernet card . . . . . . . . . . . . . . . 105
Troubleshooting the Network . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Using dmesg to troubleshoot . . . . . . . . . . . . . . . . . . . . . . . 106
Using ifconfig to troubleshoot . . . . . . . . . . . . . . . . . . . . . . 106
Using ping to troubleshoot . . . . . . . . . . . . . . . . . . . . . . . . 108
Using traceroute to troubleshoot . . . . . . . . . . . . . . . . . . . . 109
Using route to troubleshoot . . . . . . . . . . . . . . . . . . . . . . . 110
Chapter 6: Setting Up for the Internet
Connecting to an ISP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Using wvdial to connect . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Using diald to connect . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Web Browsers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
E-Mail Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Balsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Netscape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
mutt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
mail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Mail utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
News Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
PAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Netscape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
tin newsreader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
FTP Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Telnet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Dial-in PPP Server Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Part II: Working with Debian
Chapter 7: Applications
Installing Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Using the Windows Application with Linux . . . . . . . . . . . . . . . . . . 134
DOSEMU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Wine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
VMware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Plex86 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Graphics Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Gimp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
ImageMagick . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Browsers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Lynx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Mozilla . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Opera . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Netscape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Chapter 8: Productivity Applications
StarOffice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
The StarOffice desktop . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Applixware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Navigating Applixware . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Alternatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
Gnome Office . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
Publishing documents with text files . . . . . . . . . . . . . . . . . . 174
TeX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Groff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
File Converters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Chapter 9: Essential Tools
Using Text Editors in Debian GNU . . . . . . . . . . . . . . . . . . . . . . . 179
Learning to use vi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Learning to use Emacs . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Using Commands and Programs . . . . . . . . . . . . . . . . . . . . . . . . 188
alias . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
grep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
find . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
locate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
cat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
top . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
The more program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
The less program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Automating Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
The at command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
The batch command . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
The cron command . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
The anacron command . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Chapter 10: Multimedia
Listening to Audio Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Audio file formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
Audio CDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
MP3 on Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
Recording CDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
Streaming audio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
Watching Videos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
MPEG videos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
DVD videos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Using Live Voice Chat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Chapter 11: Games
System Considerations for Gaming . . . . . . . . . . . . . . . . . . . . . . . 217
Graphical interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
Sound system requirements . . . . . . . . . . . . . . . . . . . . . . . 218
Other system demands . . . . . . . . . . . . . . . . . . . . . . . . . . 219
Playing Debian-Packaged Games . . . . . . . . . . . . . . . . . . . . . . . . 219
Adventure games . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Arcade games . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
Board games . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
Card games . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
Simulation games . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
Strategy games . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
Multi-player games . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
GNOME games . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
Playing Commercial Games . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
SimCity 3000 Unlimited . . . . . . . . . . . . . . . . . . . . . . . . . . 231
Unreal Tournament . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Part III: Administering Linux
Chapter 12: System Administration
The Roles of the System Administrator . . . . . . . . . . . . . . . . . . . . 237
The System Administrator and the Root Account . . . . . . . . . . . . . . 239
Using the su command . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Using the sudo command . . . . . . . . . . . . . . . . . . . . . . . . . 241
Administering and Setting up Accounts . . . . . . . . . . . . . . . . . . . . 242
The passwd file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
The purpose of shadow passwords . . . . . . . . . . . . . . . . . . . 243
The group file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
Employing adduser to add a user account . . . . . . . . . . . . . . . 244
The new user template—skel . . . . . . . . . . . . . . . . . . . . . . 245
Using userdel to remove a user . . . . . . . . . . . . . . . . . . . . . . 246
Restricting access to the root account . . . . . . . . . . . . . . . . . 246
Setting File and Directory Permissions . . . . . . . . . . . . . . . . . . . . . 246
Access with chmod . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
Changing user ownership with chown . . . . . . . . . . . . . . . . . . 249
Changing group membership with chgrp . . . . . . . . . . . . . . . . 250
Using Quotas for Accounts . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Installing quotas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Using edquota . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
Quota reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Using System Monitoring Tools . . . . . . . . . . . . . . . . . . . . . . . . . 255
Monitoring system log files . . . . . . . . . . . . . . . . . . . . . . . . 255
Disk monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
User monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
Automated monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . 263
Chapter 13: Scripting
Working with Perl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Finding documentation for Perl . . . . . . . . . . . . . . . . . . . . . 265
Using modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Using Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
Using Kaffe and the Sun JDK . . . . . . . . . . . . . . . . . . . . . . . 273
Using gcj . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
Finding documentation for Java . . . . . . . . . . . . . . . . . . . . . 274
Using Java libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
Using Tcl/Tk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
Finding documentation for Tcl/Tk . . . . . . . . . . . . . . . . . . . . 277
Adding Tcl/Tk libraries . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Programming With Python . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
Finding documentation for Python . . . . . . . . . . . . . . . . . . . . 278
Installing Python libraries . . . . . . . . . . . . . . . . . . . . . . . . . 279
Using C/C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Finding C/C++ documentation . . . . . . . . . . . . . . . . . . . . . . 284
Using C/C++ tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
Using C/C++ libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Chapter 14: Shells
What Is a Shell? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
Using the shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
The Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Standard input and output . . . . . . . . . . . . . . . . . . . . . . . . 295
Command substitution . . . . . . . . . . . . . . . . . . . . . . . . . . 298
Jobs and job control . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
Escaping—special characters . . . . . . . . . . . . . . . . . . . . . . 303
Shell variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
The Shell Variants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
Bourne shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
C shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
Korn shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
Special shell characters . . . . . . . . . . . . . . . . . . . . . . . . . . 310
Shell Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
Chapter 15: Linux Kernel
Configuring the Linux Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . 313
Kernel code and versions . . . . . . . . . . . . . . . . . . . . . . . . . 315
Kernel modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
Adding modules on the fly . . . . . . . . . . . . . . . . . . . . . . . . 317
Upgrading and updating the kernel . . . . . . . . . . . . . . . . . . . 318
Making changes to the kernel . . . . . . . . . . . . . . . . . . . . . . . 319
Compiling and installing a new kernel . . . . . . . . . . . . . . . . . . 322
Using the Linux Boot Loader . . . . . . . . . . . . . . . . . . . . . . . . . . 324
Configuring LILO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
Adding the new kernel to LILO . . . . . . . . . . . . . . . . . . . . . . 326
Booting to other operating systems . . . . . . . . . . . . . . . . . . . 327
Testing and installing a new LILO configuration . . . . . . . . . . . . 327
System Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
Run levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
Initialization scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
Adding and removing daemon programs . . . . . . . . . . . . . . . . 334
Part IV: Maintenance and Upgrade
Chapter 16: Finding Updated Files
Defining System Bugs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
Bugless software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
Stable versus secure . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
Bugs versus features . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
Getting help and reporting bugs . . . . . . . . . . . . . . . . . . . . . 340
Patches that fix bugs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
Updating Debian Files with the Package-Management System . . . . . . . 341
Upgrading from an older Debian version . . . . . . . . . . . . . . . . 343
Upgrading over the Internet . . . . . . . . . . . . . . . . . . . . . . . 343
Upgrading from installation CD-ROMs . . . . . . . . . . . . . . . . . . 345
Chapter 17: Hardware
Finding Linux-Compatible Hardware . . . . . . . . . . . . . . . . . . . . . . 347
Finding Linux-Compatible Laptops . . . . . . . . . . . . . . . . . . . . . . . 353
Adding Hardware to Your Linux System . . . . . . . . . . . . . . . . . . . . 356
Hard drives and CD-ROM drives . . . . . . . . . . . . . . . . . . . . . 357
Changing video cards . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
Adding and changing network cards . . . . . . . . . . . . . . . . . . . 359
Adding Peripheral Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
Iomega drives (Zip, Jaz, and so on) . . . . . . . . . . . . . . . . . . . 361
Scanners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
Printing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
Offline printing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
Setting up printer queues . . . . . . . . . . . . . . . . . . . . . . . . . 367
Apsfilter configuration tool . . . . . . . . . . . . . . . . . . . . . . . . 368
Chapter 18: Backups
Planning for Failure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
Choosing a Backup Technique . . . . . . . . . . . . . . . . . . . . . . . . . 372
Knowing what to back up . . . . . . . . . . . . . . . . . . . . . . . . . 373
Knowing what to back up with caution . . . . . . . . . . . . . . . . . 374
Choosing adequate media . . . . . . . . . . . . . . . . . . . . . . . . . 375
Choosing a backup method . . . . . . . . . . . . . . . . . . . . . . . . 377
Selecting Your Backup and Restore Tools . . . . . . . . . . . . . . . . . . . 378
amanda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379
dump/restore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
KBackup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
mirrordir . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
Taper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
tar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
Creating a backup using a CD-ROM . . . . . . . . . . . . . . . . . . . 390
Recovering from a Crashed System . . . . . . . . . . . . . . . . . . . . . . 392
Rescue disk boot options . . . . . . . . . . . . . . . . . . . . . . . . . 393
Fixing disk problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
Part V: Linux Server
Chapter 19: Security
Understanding the Need for Security . . . . . . . . . . . . . . . . . . . . . . 397
Avoiding crackers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
Tools of the Trade . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
Authentication tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
Network monitoring tools . . . . . . . . . . . . . . . . . . . . . . . . . 401
Service and integrity tools . . . . . . . . . . . . . . . . . . . . . . . . 402
Diagnostic tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
Other helpful tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404
Limiting the Available Services . . . . . . . . . . . . . . . . . . . . . . . . . 405
Viruses, worms, and other creepy things . . . . . . . . . . . . . . . . 407
Setting secure permissions . . . . . . . . . . . . . . . . . . . . . . . . 407
A word about passwords . . . . . . . . . . . . . . . . . . . . . . . . . 408
Tips for Securing Your System . . . . . . . . . . . . . . . . . . . . . . . . . 409
The compromised system . . . . . . . . . . . . . . . . . . . . . . . . . 412
Sources for additional information . . . . . . . . . . . . . . . . . . . . 413
Chapter 20: Firewall 
Protecting a Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
Hardware Requirements and Preparations . . . . . . . . . . . . . . . . . . 416
Adding a Second Network Card . . . . . . . . . . . . . . . . . . . . . . . . . 417
Using ipchains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419
Masquerading a Private Network . . . . . . . . . . . . . . . . . . . . . . . . 422
Configuring a Firewall with PMFirewall . . . . . . . . . . . . . . . . . . . . 423
Locking Down the Firewall . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
Squid Proxy Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426
Accessing the Internet through a Firewall/Proxy . . . . . . . . . . . . . . . 428
Chapter 21: Web Server
Introduction to Apache Web Server . . . . . . . . . . . . . . . . . . . . . . 431
Installing the Apache Server . . . . . . . . . . . . . . . . . . . . . . . . . . . 432
Configuration files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434
The httpd.conf configuration file . . . . . . . . . . . . . . . . . . . . . 434
The srm.conf configuration file . . . . . . . . . . . . . . . . . . . . . . 444
The access.conf configuration file . . . . . . . . . . . . . . . . . . . . 453
Controlling the daemon . . . . . . . . . . . . . . . . . . . . . . . . . . 456
Monitoring the Web server . . . . . . . . . . . . . . . . . . . . . . . . 456
Setting Controls for Web Pages . . . . . . . . . . . . . . . . . . . . . . . . . 457
.htaccess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458
htpasswd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
Enabling Virtual Hosting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460
Chapter 22: FTP Server
All About FTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
Anonymous FTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464
Installing and Configuring an FTP Server . . . . . . . . . . . . . . . . . . . 465
The ftpd server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465
The wu-ftpd server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466
The proftpd server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472
Administering an FTP Server . . . . . . . . . . . . . . . . . . . . . . . . . . 475
Using FTP Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
The ftp client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
The ncftp client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478
The xftp client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481
gftp clients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482
Browsers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483
Chapter 23: Network Information System
The Network Information System . . . . . . . . . . . . . . . . . . . . . . . . 485
An overview of NIS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486
Configuring a Master NIS Server . . . . . . . . . . . . . . . . . . . . . . . . 487
Configuring a NIS Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489
Configuring a NIS Slave Server . . . . . . . . . . . . . . . . . . . . . . . . . 490
Using NIS Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491
Administering NIS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492
Chapter 24: File Server
Using the Network File System . . . . . . . . . . . . . . . . . . . . . . . . . 496
Installing and running NFS . . . . . . . . . . . . . . . . . . . . . . . . 496
Setting up the NFS shares in /etc/exports . . . . . . . . . . . . . . . . 497
Mounting an NFS share automatically . . . . . . . . . . . . . . . . . . 499
Mounting an NFS file system manually . . . . . . . . . . . . . . . . . 501
Unmounting an NFS filesystem . . . . . . . . . . . . . . . . . . . . . . 502
Sharing Files Using Samba . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502
Installing Samba . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503
Configuring Samba . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503
Testing the Samba server . . . . . . . . . . . . . . . . . . . . . . . . . 511
Configuring Samba with SWAT . . . . . . . . . . . . . . . . . . . . . . 512
Configuring Samba with gnosamba . . . . . . . . . . . . . . . . . . . 513
Checking the network with smb-nat . . . . . . . . . . . . . . . . . . . 514
Connecting to a Samba server from Linux . . . . . . . . . . . . . . . 514
Connecting to a Samba server from Windows . . . . . . . . . . . . . 515
Sharing files between Linux and Windows machines . . . . . . . . . 515
Chapter 25: Mail
Understanding Internet E-Mail Protocols and Standards . . . . . . . . . . 517
exim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519
Using Sendmail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 525
Questions during installation . . . . . . . . . . . . . . . . . . . . . . . 525
Alternatively configuring sendmail . . . . . . . . . . . . . . . . . . . 528
Testing and using sendmail . . . . . . . . . . . . . . . . . . . . . . . . 529
General Mail Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . 530
E-mail aliases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530
Forwarding your mail . . . . . . . . . . . . . . . . . . . . . . . . . . . 531
Virtual mail server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532
DNS and Internet mail . . . . . . . . . . . . . . . . . . . . . . . . . . . 533
Using mailing lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534
Setting Up POP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534
Installing and configuring POP . . . . . . . . . . . . . . . . . . . . . . 534
Testing POP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535
Setting Up IMAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536
Installation and configuration . . . . . . . . . . . . . . . . . . . . . . 536
Testing IMAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536
Getting Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537
Appendix A: What’s On the CD-ROM
Using the CD with Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539
What’s On the CD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539
Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540
Source code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540
Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541
Appendix B: Linux Commands
Linux Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543
bin commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544
sbin commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545
usr commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547
Appendix C: Debian Packages
Administration utilities . . . . . . . . . . . . . . . . . . . . . . . . . . 557
Base utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 562
Communication programs . . . . . . . . . . . . . . . . . . . . . . . . 565
Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 566
Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571
Mail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577
Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 582
Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588
Newsgroups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599
Other OS’s and file systems . . . . . . . . . . . . . . . . . . . . . . . . 600
Shells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 603
Sound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 603
Utilities for I/O and storage . . . . . . . . . . . . . . . . . . . . . . . . 609
Web software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625
GNU General Public License
CD-ROM Installation Instructions

Whom This Book Is For
This book covers the many aspects of the Debian GNU/Linux system, from the initial
install of this reputable operating system to the more advanced functions like
Web servers or file servers. You do not need to have any special programming experience
to use this book. You may just want to learn how to use Debian as a workstation environment.

This book does assume some level of general computer knowledge, even though
not specifically related to Linux or UNIX. Many people get introduced to Linux after
becoming familiar with another operating system. You may be someone who wants
to learn something new, someone who wants to know what all the buzz is about
Linux, or someone who just likes the idea that the software and upgrades are free.

Whatever the reason you are reading this book, I’m sure that you will find assistance
in the pages of this book. You will find everything from installation to administration
to server setup. This book will give you the boost needed to set up a home
or office network and to maintain that network of computers.

 Screenshot 

Debian GNU Linux Bible, Hungry Minds

Purchase Now !
Just with Paypal



Product details
 Price
 File Size
 6,798 KB
 Pages
 677 p
 File Type
 PDF format
 ISBN
 0-7645-4710-0
 Copyright
 2001 Hungry Minds, Inc  
●▬▬▬▬▬❂❂❂▬▬▬▬▬●
●▬▬❂❂▬▬●
●▬❂▬●


═════ ═════

Previous Post Next Post