SKIP THE SHIPPING
Use code NOSHIP during checkout to save 40% on eligible eBooks, now through January 5. Shop now.
Register your product to gain access to bonus material or receive a coupon.
Incorporating an advanced approach to presenting information about Ubuntu, Ubuntu Unleashed aims to provide the best and latest information that intermediate to advanced Linux users need to know about installation, configuration, system administration, server operations, and security. Written by renowned open source authors, Paul and Andrew Hudson, it includes detailed information on hot topics in Ubuntu Linux, such as wireless networks, and programming in PHP, Perl and others. It thoroughly covers all of Ubuntu's software packages, including up-to-date material on new applications, Web development, peripherals, and programming languages. It also includes updated discussion of the architecture of the Linux kernel 2.6, USB, KDE, GNOME, Broadband access issues, routing, gateways, firewalls, disk tuning, GCC, Perl, Python, printing services (CUPS), and security. The included DVD comes with a complete Ubuntu Linux distribution.
Introduction
What Is Linux?
What Is Ubuntu?
Roots of Ubuntu
Licensing
Why Use Linux?
Who This Book Is For
What This Book Contains
Conventions Used in This Book
Part I Installation and Configuration
1 Introducing Ubuntu
What Is Ubuntu?
Inside Ubuntu
Features of the Ubuntu Install
Ubuntu File System Features
Ubuntu for Business
Ubuntu in Your Home
64-Bit Ubuntu
Ubuntu on the PPC Platform
Ubuntu on Dual-Core Machines
Getting the Most from Ubuntu and Linux Documentation
Ubuntu Developers and Documentation
Reference
2 Preparing to Install Ubuntu
Planning Your Ubuntu Deployment
Business Considerations
System Considerations
User Considerations
A Predeployment Planning Checklist
Planning the Installation
Hardware Requirements
Meeting the Minimum Ubuntu Hardware Requirements
Using Legacy Hardware
Planning for Hard Drive Storage for Your Ubuntu Installation Class
Checking Hardware Compatibility
Preparing for Potential Hardware Problems
Preparing and Using a Hardware Inventory
Preparing for the Install Process
Preparing to Install from a CD-ROM
Partitioning Before and During Installation
Choosing a Partitioning Scheme
Hosting Parts of the Linux File System on Separate Partitions
Using Ubuntu’s kickstart Installation Method
Reference
3 Installing Ubuntu
Before You Begin the Installation
Research Your Hardware Specifications
Installation Options
Planning Partition Strategies
The Boot Loader
Installing from CD or DVD
Step-by-Step Installation
Starting the Install
First Update
Shutting Down
Reference
4 Post-Installation Configuration
Troubleshooting Post-Installation Configuration Problems
The sudo command
First Update
Configuring Software Repositories
Installing Graphics Drivers
Changing Ubuntu’s Look and Feel
Changing the Desktop Background
Changing Colors
Modifying System Fonts
Preferred Behaviors
Preferred Applications
Removable Drives and Media
Input Devices
Keyboard Shortcuts
Keyboard Layout
Mouse
Detecting and Configuring a Modem
Configuring a Serial-Port Modem
Configuring WinModems for Laptops
Configuring Power Management in Ubuntu
Resetting the Date and Time
Using the date Command
Using the hwclock Command
Changing the Time and Date
Managing PCMCIA
Using PCMCIA
Controlling PCMCIA Service
Configuring and Using CD, DVD, and CD-RW Drives
Checking Drive Assignment
Configuring Wireless Networks
Configuring Firestarter
Reference
5 First Steps with Ubuntu
Working with the Linux File System
Viewing the Linux File System
Use Essential Commands from the /bin and /sbin Directories
Store the Booted Kernel and View Stored Devices in the /boot and /dev Directories
Use and Edit Files in the /etc Directory
Protect the Contents of User Directories–/home
Use the Contents of the /proc Directory to Interact with the Kernel
Work with Shared Data in the /usr Directory
Temporary File Storage in the /tmp Directory
Access Variable Data Files in the /var Directory
Logging In to and Working with Linux
Text-based Console Login
Working with Virtual Consoles
Using Simple Keyboard and Mouse Techniques in a Linux Console Session
Logging Out
Logging In and Out from a Remote Computer
Changing Your User Information
Reading Documentation
Using man Pages
Finding and Reading Software Packages Documentation
Using the Shell
Using Environment Variables
Navigating and Searching with the Shell
Managing Files with the Shell
Compressing and Decompressing Files Through the Shell
Using the Text Editors
Working with vi
Working with emacs
Working with Permissions
Assigning Permissions
Directory Permissions
Understanding Set User ID and Set Group ID Permissions
Working As Root
Creating Users
Deleting Users
Shutting Down the System
Rebooting the System
Reference
6 The X Window System
Basic X Concepts
Using X11R7
Elements of the xorg.conf File
Configuring X
Starting X
Using a Display Manager
Starting X from the Console by Using startx
Selecting and Using Window Managers
The GNOME and KDE Desktop Environments
GNOME: The GNU Network Object Model Environment
KDE: The K Desktop Environment
Xfce: The Lightweight Alternative
Reference
7 Managing Software
Using Add/Remove Applications for Software Management
Using Synaptic for Software Management
Staying Up-to-Date
Working on the Command Line
Day-to-Day Usage
Finding Software
Compiling Software from Source
Reference
8 On the Internet: Surfing the Web, Writing Email, and Reading the News
Choosing a Web Browser
Mozilla Firefox
The Mozilla Suite
Epiphany
Konqueror
Choosing an Email Client
Evolution
Mozilla Thunderbird
Balsa
KMail
Mozilla Mail
The mail Application
mutt
Other Mail Clients
An Overview of Network News
Newsgroups
Selecting a Newsreader
The slrn News Client
The Pan News Client
The Mozilla News Client
The Thunderbird News Client
Internet Relay Chat
Internet Messaging with GAIM
Videoconferencing with Ekiga
Reference
9 Productivity Applications
Office Suites for Ubuntu
Working with OpenOffice.org
Working with OpenOffice.org Writer
Working with OpenOffice.org Calc
Working with GNOME Office
Working with KOffice
Productivity Applications Written for Microsoft Windows
Reference
10 Multimedia Applications
Burning CDs and DVDs in Ubuntu
Creating CDs from the Command Line
Creating DVDs from the Command Line
Creating CDs and DVDs with Ubuntu’s Graphical Clients
Sound and Music
Sound Cards
Recording Sound
Sound Formats
Ripping Music
Music Players
Streaming Audio
Viewing TV and Video
TV and Video Hardware
Video Formats
Viewing Video in Linux
Viewing Television with Linux
Personal Video Recorders
DVD and Video Players
Reference
11 Graphics Manipulation
The GNU Image Manipulation Program
Using Digital Cameras with Ubuntu
Webcams
Handheld Digital Cameras
Using F-Spot
Using Scanners in Ubuntu
Working with Graphics Formats
Capturing Screen Images
Reference
12 Printing with Ubuntu
Overview of Ubuntu Printing
Configuring and Managing Print Services
GUI-Based Printer Configuration Quickstart
Managing Printing Services
Creating and Configuring Local Printers
Creating the Print Queue
Editing Printer Settings
Reference
13 Games
Linux Gaming
Installing Proprietary Video Drivers
Installing DOOM 3
Installing Unreal Tournament 2004
Installing Quake 4
Installing Wolfenstein: Enemy Territory
Installing Battle for Wesnoth
Playing Windows Games with Cedega
Reference
Part II System Administration
14 Managing Users
User Accounts
User IDs and Group IDs
File Permissions
Managing Groups
Group Management Tools
Managing Users
User Management Tools
Adding New Users
Monitoring User Activity on the System
Managing Passwords
System Password Policy
The Password File
Shadow Passwords
Managing Password Security for Users
Changing Passwords in a Batch
Granting System Administrator Privileges to Regular Users
Temporarily Changing User Identity with the su Command
Granting Root Privileges on Occasion–The sudo Command
Control via Restricted Shells
The User Login Process
Disk Quotas
Implementing Quotas
Manually Configuring Quotas
Reference
15 Automating Tasks
Running Services at Bootup
Beginning the Boot Loading Process
Loading the Linux Kernel
System Services and Runlevels
Runlevel Definitions
Booting into the Default Runlevel
Booting to a Non-Default Runlevel with GRUB
Understanding init Scripts and the Final Stage of Initialization
Controlling Services at Boot with Administrative Tools
Changing Runlevels
Troubleshooting Runlevel Problems
Starting and Stopping Services Manually
Scheduling Tasks
Using at and batch to Schedule Tasks for Later
Using cron to Run Jobs Repeatedly
Basic Shell Control
The Shell Command Line
Shell Pattern-Matching Support
Redirecting Input and Output
Piping Data
Background Processing
Writing and Executing a Shell Script
Running the New Shell Program
Storing Shell Scripts for Systemwide Access
Interpreting Shell Scripts Through Specific Shells
Using Variables in Shell Scripts
Assigning a Value to a Variable
Accessing Variable Values
Positional Parameters
A Simple Example of a Positional Parameter
Using Positional Parameters to Access and Retrieve Variables from the Command Line
Using a Simple Script to Automate Tasks
Built-in Variables
Special Characters
Use Double Quotes to Resolve Variables in Strings with Embedded Spaces
Using Single Quotes to Maintain Unexpanded Variables
Using the Backslash As an Escape Character
Using the Backtick to Replace a String with Output
Comparison of Expressions in pdksh and bash
Comparing Expressions with tcsh
The for Statement
The while Statement
The until Statement
The repeat Statement (tcsh)
The select Statement (pdksh)
The shift Statement
The if Statement
The case Statement
The break and exit Statements
Using Functions in Shell Scripts
Reference
16 System Resources
System-Monitoring Tools
Console-Based Monitoring
Using the kill Command to Control Processes
Using Priority Scheduling and Control
Displaying Free and Used Memory with free
Disk Quotas
Graphical Process and System Management Tools
KDE Process- and System-Monitoring Tools
Reference
17 Backing Up, Restoring, and Recovery
Choosing a Backup Strategy
Why Data Loss Occurs
Assessing Your Backup Needs and Resources
Evaluating Backup Strategies
Making the Choice
Choosing Backup Hardware and Media
Removable Storage Media
Network Storage
Tape Drive Backup
Using Backup Software
tar: The Most Basic Backup Tool
The GNOME File Roller
The KDE Archiving Tools (KDE ark and kdat)
Using the dd Command for Archiving
Using the Amanda Backup Application
Alternative Backup Software
Copying Files
Copying Files Using tar
Compressing, Encrypting, and Sending tar Streams
Copying Files Using cp
Copying Files Using mc
Copying Files Using scp
Copying Files Using rsync
Undeleting Files
Reformatting with the -S Option When Experiencing Unrecoverable File System Errors
Undeleting Files Using mc
System Rescue
The Ubuntu Rescue Disc
Backing Up and Restoring the Master Boot Record
Booting the System from a Generic Boot Floppy
Using a GRUB Boot Floppy
Using the Recovery Facility
Reference
18 Network Connectivity
Laying the Foundation: The localhost Interface
Checking for the Availability of the Loopback Interface
Configuring the Loopback Interface Manually
Networking with TCP/IP
TCP/IP Addressing
Using IP Masquerading in Ubuntu
Ports
Network Organization
Subnetting
Subnet Masks
Broadcast, Unicast, and Multicast Addressing
Hardware Devices for Networking
Network Interface Cards
Network Cable
Hubs and Switches
Routers and Bridges
Initializing New Network Hardware
Using Network Configuration Tools
Command-Line Network Interface Configuration
Network Configuration Files
Using Graphical Configuration Tools
Dynamic Host Configuration Protocol
How DHCP Works
Activating DHCP at Installation and Boot Time
DHCP Software Installation and Configuration
Using DHCP to Configure Network Hosts
Other Uses for DHCP
Wireless Networking
Support for Wireless Networking in Ubuntu
Advantages of Wireless Networking
Choosing from Among Available Wireless Protocols
Beyond the Network and onto the Internet
Common Configuration Information
Configuring Digital Subscriber Line Access
Understanding Point-to-Point Protocol over Ethernet
Configuring a PPPoE Connection Manually
Configuring Dial-Up Internet Access
Configuring a Dial-Up Connection Manually
Troubleshooting Connection Problems
Using Patches/Upgrades to Keep Your Network Secure
Reference
General
DHCP
Wireless
Books
19 Remote Access with SSH and Telnet
Setting Up a Telnet Server
Telnet Versus SSH
Setting Up an SSH Server
The SSH Tools
Using scp to Copy Individual Files Between Machines
Using sftp to Copy Many Files Between Machines
Using ssh-keygen to Enable Key-based Logins
Remote X
XDMCP
VNC
Reference
Part III Ubuntu as a Server
20 Apache Web Server Management
About the Apache Web Server
Installing the Apache Server
Installing with APT
Building the Source Yourself
Starting and Stopping Apache
Starting the Apache Server Manually
Using /etc/init.d/apache2
Runtime Server Configuration Settings
Runtime Configuration Directives
Editing httpd.conf
Apache Multiprocessing Modules
Using .htaccess Configuration Files
File System Authentication and Access Control
Restricting Access with allow and deny
Authentication
Final Words on Access Control
Apache Modules
mod_access
mod_alias
mod_asis
mod_auth
mod_auth_anon
mod_auth_dbm
mod_auth_digest
mod_autoindex
mod_cgi
mod_dir and mod_env
mod_expires
mod_headers
mod_include
mod_info and mod_log_config
mod_mime and mod_mime_magic
mod_negotiation
mod_proxy
mod_rewrite
mod_setenvif
mod_speling
mod_status
mod_ssl
mod_unique_id
mod_userdir
mod_usertrack
mod_vhost_alias
Virtual Hosting
Address-Based Virtual Hosts
Name-Based Virtual Hosts
Logging
Dynamic Content
CGI
SSI
Basic SSI Directives
Flow Control
Other Web Servers for Use with Ubuntu
Sun ONE Web Server
Zope
Zeus Web Server
Reference
21 Administering Database Services
A Brief Review of Database Basics
How Relational Databases Work
Understanding SQL Basics
Creating Tables
Inserting Data into Tables
Retrieving Data from a Database
Choosing a Database: MySQL Versus PostgreSQL
Speed
Data Locking
ACID Compliance in Transaction Processing to Protect Data Integrity
SQL Subqueries
Procedural Languages and Triggers
Configuring MySQL
Setting a Password for the MySQL Root User
Creating a Database in MySQL
Granting and Revoking Privileges in MySQL
Configuring PostgreSQL
Initializing the Data Directory in PostgreSQL
Creating a Database in PostgreSQL
Creating Database Users in PostgreSQL
Deleting Database Users in PostgreSQL
Granting and Revoking Privileges in PostgreSQL
Database Clients
SSH Access to a Database
Local GUI Client Access to a Database
Web Access to a Database
The MySQL Command-Line Client
The PostgreSQL Command-Line Client
Graphical Clients
Reference
22 File and Print
Using the Network File System
Installing and Starting or Stopping NFS
NFS Server Configuration
NFS Client Configuration
Putting Samba to Work
Manually Configuring Samba with /etc/samba/smb.conf
Testing Samba with the testparm Command
Starting the smbd Daemon
Mounting Samba Shares
Configuring Samba Using SWAT
Network and Remote Printing with Ubuntu
Creating Network Printers
Enabling Network Printing on a LAN
Session Message Block Printing
Using the Common UNIX Printing System GUI
Creating a CUPS Printer Entry
Avoiding Printer Support Problems
All-in-One (Print/Fax/Scan) Devices
Using USB and Legacy Printers
Reference
23 Remote File Serving with FTP
Using FTP Clients
The FTP Client Interface
Using the Text-Based FTP Client Interface
Using Graphical FTP Clients
FTP Servers
Choosing an Authenticated or Anonymous Server
Ubuntu FTP Server Packages
Other FTP Servers
Installing FTP Software
The FTP User
inetd Configuration for wu-ftpd
Starting the Very Secure FTP Server (vsftpd) Package
Configuring the Very Secure FTP Server
Controlling Anonymous Access
Other vsftpd Server Configuration Files
Configuring the Wu-FTPd Server
Using Commands in the ftpaccess File to Configure wu-ftpd
Configure Access Control
Configure User Information
Configure System Logging
Configure Permission Control
Configure Commands Directed Toward the cdpath
Structure of the shutdown File
Configure FTP Server File-Conversion Actions
Strip Prefix
Strip Postfix
Add-On Prefix
Add-On Postfix
External Command
Types
Options
Description
An Example of Conversions in Action
Using Commands in the ftphosts File to Allow or Deny FTP Server Connection
Server Administration
Display Information About Connected Users
Count the Number of Connections
Use /usr/sbin/ftpshut to Schedule FTP Server Downtime
Use /var/log/xferlog to View a Log of Server Transactions
Reference
24 Handling Electronic Mail
How Email Is Sent and Received
The Mail Transport Agent
Choosing an MTA
The Mail Delivery Agent
The Mail User Agent
Basic Postfix Configuration and Operation
Configuring Masquerading
Using Smart Hosts
Setting Message Delivery Intervals
Mail Relaying
Forwarding Email with Aliases
Using Fetchmail to Retrieve Mail
Installing Fetchmail
Configuring Fetchmail
Choosing a Mail Delivery Agent
Procmail
Spamassassin
Squirrelmail
Virus Scanners
Mail Daemons
Alternatives to Microsoft Exchange Server
Microsoft Exchange Server/Outlook Client
CommuniGate Pro
Oracle Collaboration Suite
Bynari
Open-Xchange
phpgroupware
PHProjekt
Horde
Reference
Web Resources
Books
25 Proxying and Reverse Proxying
What Is a Proxy Server?
Installing Squid
Configuring Clients
Access Control Lists
Specifying Client IP Addresses
Example Configurations
Reference
26 LDAP
Configuring the Server
Populating Your Directory
Configuring Clients
Evolution
Thunderbird
Administration
Reference
Part IV Programming Linux
27 Using Perl
Using Perl with Linux
Perl Versions
A Simple Perl Program
Perl Variables and Data Structures
Perl Variable Types
Special Variables
Operators
Comparison Operators
Compound Operators
Arithmetic Operators
Other Operators
Special String Constants
Conditional Statements: if/else and unless
if
unless
Looping
for
foreach
while
until
last and next
do ... while and do ... until
Regular Expressions
Access to the Shell
Modules and CPAN
Code Examples
Sending Mail
Purging Logs
Posting to Usenet
One-Liners
Command-Line Processing
Reference
Books
Usenet
WWW
Other
28 Working with Python
Python on Linux
Getting Interactive
The Basics of Python
Numbers
More on Strings
Lists
Dictionaries
Conditionals and Looping
Functions
Object Orientation
Class and Object Variables
Constructors and Destructors
Class Inheritance
Multiple Inheritance
The Standard Library and the Vaults of Parnassus
Reference
29 Writing PHP Scripts
Introduction to PHP
Entering and Exiting PHP Mode
Variables
Arrays
Constants
References
Comments
Escape Sequences
Variable Substitution
Operators
Conditional Statements
Special Operators
Switching
Loops
Including Other Files
Basic Functions
Strings
Arrays
Files
Miscellaneous
Handling HTML Forms
Databases
Introduction to PEAR::DB
Reference
30 C/C++ Programming Tools for Ubuntu
Programming in C with Linux
Programming in C++
Getting Started with Linux C/C++ Programming
The Process of Programming
Elements of the C/C++ Language
Using the C Programming Project Management Tools Provided with Ubuntu
Building Programs with make
Using the autoconf Utility to Configure Code
Managing Software Projects with RCS and CVS
Debugging Tools
Using the GNU C Compiler
A Simple C Program
Graphical Development Tools
Using the KDevelop Client
Trolltech’s Qt Designer
The Glade Client for Developing in GNOME
Reference
Part V Ubuntu Housekeeping
31 Securing Your Machines
Understanding Computer Attacks
Assessing Your Vulnerability
Protecting Your Machine
Securing a Wireless Network
Passwords and Physical Security
Configuring and Using Tripwire
Devices
Viruses
Configuring Your Firewall
Forming a Disaster Recovery Plan
Keeping Up-to-Date on Linux Security Issues
Reference
32 Performance Tuning
Hard Disk
Using the BIOS and Kernel to Tune the Disk Drives
The hdparm Command
File System Tuning
The tune2fs Command
The e2fsck Command
The badblocks Command
Disabling File Access Time
Kernel
Apache
MySQL
Measuring Key Buffer Usage
Using the Query Cache
Miscellaneous Tweaks
Query Optimization
Reference
33 Command Line Masterclass
Why Use the Shell?
Basic Commands
Printing the Contents of a File with cat
Changing Directories with cd
Changing File Access Permissions with chmod
Copying Files with cp
Printing Disk Usage with du
Finding Files by Searching with find
Searches for a String in Input with grep
Paging Through Output with less
Creating Links Between Files with ln
Finding Files from an Index with locate
Listing Files in the Current Directory with ls
Reading Manual Pages with man
Making Directories with mkdir
Moving Files with mv
Listing Processes with ps
Deleting Files and Directories with rm
Printing the Last Lines of a File with tail
Printing Resource Usage with top
Printing the Location of a Command with which
Combining Commands Together
Multiple Terminals
Reference
Books
34 Advanced APT
Using Aptitude
The dpkg Back-End
Configuring APT
Reference
35 Kernel and Module Management
The Linux Kernel
The Linux Source Tree
Types of Kernels
Managing Modules
When to Recompile
Kernel Versions
Obtaining the Kernel Sources
Patching the Kernel
Compiling the Kernel
Using xconfig to Configure the Kernel
Creating an Initial RAM Disk Image
When Something Goes Wrong
Errors During Compile
Runtime Errors, Boot Loader Problems, and Kernel Oops
Reference
Part VI Appendix
A Ubuntu and Linux Internet Resources
Websites and Search Engines
Web Search Tips
Google Is Your Friend
Ubuntu Package Listings
Certification
Commercial Support
Documentation
Linux Guides
The Ubuntu Project
Mini-CD Linux Distributions
Floppy-Based Linux Distributions
Various Intel-Based Linux Distributions
PowerPC-Based Linux Distributions
Linux on Laptops and PDAs
The X Window System
Usenet Newsgroups
Mailing Lists
Ubuntu Project Mailing Lists
Internet Relay Chat
0672329093, TOC, 8/8/2006