My Account
View Cart
Home
Community
Books & Videos
Safari Books Online
Conferences
Training
School of Technology
About
Complete List
Bestsellers
New Releases
Rough Cuts
Upcoming Titles
Ebooks
By Publisher
By Series
Out of Print
Order Info
Search
Search Tips
Tell a friend
Linux Cookbook
By
Carla Schroder
November 2004
Pages: 580
|
Table of Contents
|
Index
|
Sample Chapter
|
Colophon
Table of Contents
Chapter 1
Finding Documentation
Introduction
Understanding man Pages
Finding Appropriate man Pages
Finding Lost man Pages
Reading man Pages Without a man Viewer
Configuring Your manpath
Using info Pages
Printing man Pages
Printing info Pages
Printing Selected man or info Pages
Finding All of the Documentation for a Program
Chapter 2
Installing and Managing Software on RPM-Based Systems
Introduction
Installing RPMs
Upgrading RPMs
Removing RPMs
Collecting Information on Installed RPMs
Collecting Information from RPMs That Are Not Installed
Finding Recently Installed RPMs
Rebuilding the RPM Database
Tracking Source-Built Libraries on an RPM-Based System
Fixing RPM Installation Problems
Installing Source RPMs
Customizing Build Options in a Source RPM
Installing Yum
Configuring Yum
Installing and Upgrading Packages with Yum
Removing Packages with Yum
Getting Information on Installed Packages with Yum
Maintaining Yum
Chapter 3
Installing and Managing Software on Debian-Based Systems
Introduction
Getting Software for a Debian System
Installing Debian Packages from CD-ROM
Installing Packages on Debian-Based Systems
Removing Packages from a Debian System
Installing from Sources on a Debian System
Upgrading Packages on Debian
Upgrading a Debian System
Upgrading to a Newer Debian Release
Running a Mixed Debian System
Finding Out What Is Installed on a Debian System
Maintaining the Debian Package Cache
Resolving Debian Dependency Conflicts
Building a Local Debian Repository
Selecting Package Mirrors for apt-proxy.conf
Adding Your Existing Package Cache to apt-proxy.conf
Chapter 4
Installing Programs from Source Code
Introduction
Preparing Your System for Compiling Programs from Sources
Generating a List of Files from a Source Install for Easy Uninstalls
Installing Programs from Source Code
Using CheckInstall to Create Packages from Sources
Chapter 5
Discovering Hardware from Outside the Box
Introduction
Detecting Hardware with lspci
Using dmesg to Collect Hardware Information
Getting Live Hardware Snapshots with /proc
Viewing Drive Partitions with fdisk
Calculating Hard Drive Capacity
Chapter 6
Editing Text Files with JOE and Vim
Introduction
Finding JOE Commands
Customizing JOE
Organizing JOE's Preferences in a Separate File
Copying Between Two Files in JOE
Searching and Replacing in JOE
Selecting Text Vertically in JOE
Finding and Opening Files in JOE
Learning Vim Quickly
Creating Autotext with Vim's Abbreviations
Mapping Commands to Keystrokes
Customizing Vim
Navigating Quickly in Vim with Marks
Picking Up Where You Left Off: Using Vim's Sessions
Setting Your Default Editor
Discovering Vim's Compile-Time Options
Chapter 7
Starting and Stopping Linux
Introduction
Changing Runlevels After Bootup
Changing the Default Runlevel
Starting and Stopping X
Managing Debian's Runlevels
Creating Both Text and Graphical Login Runlevels on Debian
Managing Red Hat's Runlevels
Manually Configuring Startup Services
Manually Starting and Stopping Services
Shutting Down or Rebooting Linux
Disabling or Limiting Access to Ctrl-Alt-Delete
Shutting Down Automatically
Chapter 8
Managing Users and Groups
Introduction
Sorting Human Users from System Users
Finding a User's UID and GID
Adding Users with useradd
Adding Users with adduser
Modifying User Accounts
Deleting a User
Killing User Processes the Easy, Fun Way
Disabling Accounts
Managing Passwords
Adding Groups with groupadd
Deleting Groups with groupdel
Creating a System User
Creating System Groups with addgroup
Adding and Deleting Group Members
Checking Password File Integrity
Adding New Users in Batches
Changing Masses of Passwords
Adding Batches of Users to Groups
Using su to Be Root Temporarily
Granting Limited Rootly Powers with sudo
Using Disk Quotas
Chapter 9
Managing Files and Partitions
Introduction
Setting File and Directory Permissions with chmod's Numeric Notation
Doing Batch Operations with chmod
Setting File and Directory Permissions with chmod's Symbolic Notation
Setting File Ownership with chown
Doing Batch Operations with chown
Setting Up a Shared Directory with setgid and the Sticky Bit
Setting Permissions Defaults with umask
Mounting and Unmounting Removable Disks
Configuring Filesystem Mounts with /etc/fstab
Mounting and Unmounting Filesystems on Hard Drives
Finding Device Names for mount and fstab
Creating Files and Directories
Deleting Files and Directories
Copying, Moving, and Renaming Files and Directories
Creating Linux Disk Partitions with fdisk
Creating a Filesystem on a New Partition
Chapter 10
Patching, Customizing, and Upgrading Kernels
Introduction
Adding New Features to the 2.4 Kernel
Slimming a Stock 2.4 Kernel
Upgrading to the Latest Stable Version of the 2.4 Kernel
Building the 2.6 Kernel
Adding New Features to the 2.6 Kernel
Adding a New Loadable Kernel Module
Patching a Kernel
Removing a Kernel Patch
Creating an initrd Image
Creating a Boot Disk on Debian
Creating a Boot Disk on Red Hat
Chapter 11
CD and DVD Recording
Introduction
Finding the SCSI Address for CD and DVD Writers
Enabling SCSI Emulation for IDE/Atapi CD and DVD Writers
Making a Data CD for General Distribution
Building File Trees on a Data CD
Copying a CD or DVD
Erasing a CD-RW
Recording a Multisession Data CD
Creating a Bootable CD
Spanning a Large File over Several CDs
Recording Data DVDs
Recording an Audio CD for Standard CD Players
Chapter 12
Managing the Bootloader and Multi-Booting
Introduction
Migrating from LILO to GRUB
Installing GRUB Without a Floppy Disk
Installing GRUB with grub-install
Preparing a System for Multibooting Linux
Adding More Linuxes to a Multiboot System
Discovering Boot Parameters from the GRUB Command Shell
Configuring the Boot Partition
Creating the GRUB Boot Menu
Customizing menu.lst
Adding Windows 95/98/ME to a Linux System
Adding Windows NT/2000/XP to a Multiboot System
Restoring GRUB to the MBR with a Knoppix CD
Protecting System Files with a GRUB Password
Locking Out Users from Individual GRUB Menu Entries
Creating a GRUB Splash Image
Booting Linux with LILO
Multibooting Linuxes with LILO
Multibooting Windows and Linux with LILO
Creating a LILO Boot Diskette
Password-Protecting LILO
Backing Up the MBR
Chapter 13
System Rescue and Recovery with Knoppix
Introduction
Booting Knoppix
Creating a Knoppix Boot Diskette
Saving Your Knoppix Configuration on a USB Memory Stick
Creating a Persistent, Encrypted Knoppix Home Directory
Copying Files to Another Linux PC
Copying Files to a Samba Share
Copying Files to a CD-R/RW
Editing Configuration Files from Knoppix
Installing Software from Knoppix
Repairing a Lost Root Password
Installing Knoppix to a Hard Disk
Virus-Scanning Windows PCs with Knoppix
Chapter 14
Printing with CUPS
Introduction
Installing a Printer on a Standalone Linux PC
Serving Linux Clients
Sharing a Printer Without Using Name Resolution
Serving Windows Clients Without Samba
Sharing Printers on a Mixed LAN with Samba
Building a Dedicated CUPS Printer Server
Distributed Printing with Classes
Restricting Users from Printers and Classes
Troubleshooting
Chapter 15
Configuring Video and Managing X Windows
Introduction
Using Both X Windows and Consoles
Installing a New Video Adapter
Editing XF86Config
Enabling 3D Hardware Acceleration with XFree86/DRI
Troubleshooting 3D Acceleration Problems
Configuring a Multihead Display
Choosing Different ServerLayouts at Startup
Setting a Default ServerLayout
Configuring startx
Changing Your Login Display Manager
Running Different Window Managers Simultaneously with Xnest
Chapter 16
Backup and Recovery
Introduction
Using rsync for Local File Transfers and Synchronization
Making Secure Transfers with rsync and ssh
Building an rsync Backup Server
Securing rsync Modules
Building an Anonymous Public rsync Server
Launching the rsync Daemon at Startup
Fine-Tuning File Selection
Automating rsync over ssh Backups
Limiting rsync's Bandwidth Requirements
Customizing Filepaths in rsync
Installing rsync on Windows Clients
Creating a Message of the Day for rsync
Creating a Bootable System Restore CD with Mondo Rescue
Verifying the Mondo Backup
Creating a Bootable System Restore DVD with Mondo Rescue
Using Mondo Rescue to Clone Linux Systems
Using the mindi-kernel for a "Sane" Backup
Restoring a System from a Mondo Rescue Disk
Restoring Selected Files from a Mondo Disk
Chapter 17
Remote Access
Introduction
Setting Up OpenSSH the First Time
Generating New Host Keys
Authenticating Via Public Keys
Using Multiple Key Pairs
Passwordless Logins with ssh-agent
Better Passwordless Logins with keychain
Passwordless Logins for cron Jobs
Shutting Down ssh-agent Automatically at Logout
Customizing the Bash Prompt for ssh
Tunneling X over SSH
Connecting from a Windows PC
Setting File Permissions on ssh Files
Chapter 18
Version Control
Introduction
Building a Simple Local RCS Repository
Retrieving Older File Revisions from RCS
Comparing File Versions in RCS
Managing System Configuration Files with RCS
Using CVS for a Single-User Local Repository
Adding New Files to a CVS Repository
Deleting Files from a CVS Repository
Creating a Shared CVS Repository
Sharing a Single Repository Between Several Groups
Accessing a Remote CVS Repository
Updating Your Working Files in CVS
Retrieving Specific Older Revisions from CVS
Building an Anonymous Read-Only CVS Repository with Pserver
Mirroring a CVS Repository
Storing Binary Files in CVS
Creating Release Snapshots with Tags
Creating Stable and Development Branches for a Project
Customizing Your CVS Environment
Calculating Storage Size for a CVS Repository
Chapter 19
Keeping Time with NTP
Introduction
Building a Local Time Server
Connecting to a Local Time Server
Adding Access Controls
Deciding Which NTP Pools to Use
Connecting to a Time Server from an Intermittent Connection
Setting Up Multiple Local Time Servers
Using NTP Keys for Authentication
Chapter 20
Building a Postfix Mail Server
Introduction
Building a POP3 Mail Server
Building a POP3 Mail Server on Debian
Testing the SMTP/POP3 Mail Server
Sending Internet Mail
Receiving Internet Mail
Installing Cyrus-SASL for SMTP Authorization
Installing Cyrus-SASL on Debian
Setting Up smtp-auth to Authenticate Users
Using smtp-auth to Authenticate Postfix to Another Server
Configuring a Fully Qualified Domain Name
Building an IMAP Mail Server
Connecting Your Users
Sharing IMAP Folders
Using Postfix's Virtual Mailbox Domains
Creating a Mail List with couriermlm
Administering a couriermlm List
Squirreling Around with Webmail
Table of SMTP Response Codes and SMTP Commands
Chapter 21
Managing Spam and Malware
Introduction
Basic Checklist: Preparing to Build Spam Malware Defenses
Safely Testing New UBE Controls in Postfix
Basic UBE Configurations for Postfix
Creating Whitelists
Using DNS Blackhole Lists
Rejecting Messages with Attachments
Setting Up Clam Anti-Virus on a Postfix Server
Setting Up SpamAssassin on Postfix with Amavisd-new
Setting Up SpamAssassin Without Amavisd-new
Chapter 22
Running an Apache Web Server
Introduction
Installing Apache 2.0 from Sources
Adding New Modules After Installation
Setting Apache File Permissions and Ownership
Accessing the Apache User's Manual Locally
Setting Up a Simple Public Web Server
Redirecting URLs to a New Directory
Giving Users Individual Web Directories
Starting Apache at Boot
Hosting Multiple Domains with Apache
Using Individual Log Files for Virtual Hosts
Keeping LAN Web Sites Off the Internet
Password-Protecting Individual Directories
Using robots.txt to Control Web Crawlers
Blocking Obnoxious Visitors
Making Custom Error Pages
Customizing Apache's Default Error Pages
Making Full-Length Directory Indexes
Using Content Negotiation to Deliver Pages in Different Languages
Using Favicons
Viewing Apache Access Logs with Webalizer
Chapter 23
File and Printer Sharing, and Domain Authentication with Samba
Introduction
Building a Simple Anonymous Samba File Server for Windows
Building a Windows/Linux Peer Network
Enabling File Sharing on Windows PCs
Adding Authentication to a Samba Server
Batch-Converting System Users to Samba Users
Managing Samba Logins from Windows 95/98/ME
Dealing with Windows Encrypted Password Confusion
Controlling Share Access with Access Control Lists
Creating Public Shares for Users
Accessing Users' Home Directories in Samba
Building a Primary Domain Controller with Samba
Connecting Windows 95/98/ME to a Samba Domain
Connecting Windows NT/2000 Clients to a Samba Domain
Connecting Windows XP Clients to a Samba Domain
Enabling Roaming Profiles
Connecting Linux Clients to a Samba File Server or Peer Network
Connecting Linux Clients to Samba Workgroups with Command-Line Tools
Connecting Linux Clients to a Samba Domain with GUI LAN Browsers
Connecting Linux Clients to a Samba Domain with Command-Line Tools
Keeping Samba and Linux Passwords in Sync
Sharing Linux Printers with Windows
Sharing Windows Printers with Linux
Running Windows Applications on Linux with CrossOver Office
Chapter 24
Managing Name Resolution
Introduction
Enabling Local Name Resolution with hosts Files
Setting Up a DHCP Server
Configuring dhcp Clients
Adding Static Hosts to dhcp
Running a Public DNS Server
Installing djbdns
Moving tinydns's and dnscache's Logfiles
Running a Local Caching Name Server with djbdns
Configuring Linux and Windows Clients to Use Your Caching DNS Server
Building a Public DNS Server with tinydns
Building a Private tinydns Server
Enabling Simple Load Balancing with tinydns
Synchronizing with a Second tinydns Server
Running a Local Caching Name Server with BIND
Running a Private BIND DNS Server
Checking Syntax
Configuring a Public BIND DNS Server
Building a BIND Secondary Server
Simple Load Balancing with BIND
Testing Your tinydns Server
Testing and Querying DNS Servers with dig and dnstrace
Appendix A
Finding Linux Documentation
Linux Documentation on the Web
Books and Magazines
Appendix B
Online References
Hardware Web Sites
Usenet
Appendix C
Microsoft File Types
Appendix D
Init Script for CVSD
Colophon
Return to
Linux Cookbook