christopher negus - download.e-bookshelf.de · linux ® bible 2008 edition boot up to ubuntu®,...
Post on 23-Jul-2020
4 Views
Preview:
TRANSCRIPT
-
Linux® Bible2008 Edition
Boot Up to Ubuntu®, Fedora®, KNOPPIX, Debian®, openSUSE®, and 11 Other Distributions
Christopher Negus
Wiley Publishing, Inc.
30190ffirs.qxd:Layout 1 12/20/07 5:08 PM Page iii
File AttachmentC1.jpg
-
30190ffirs.qxd:Layout 1 12/20/07 5:08 PM Page ii
-
Linux® Bible2008 Edition
30190ffirs.qxd:Layout 1 12/20/07 5:08 PM Page i
-
30190ffirs.qxd:Layout 1 12/20/07 5:08 PM Page ii
-
Linux® Bible2008 Edition
Boot Up to Ubuntu®, Fedora®, KNOPPIX, Debian®, openSUSE®, and 11 Other Distributions
Christopher Negus
Wiley Publishing, Inc.
30190ffirs.qxd:Layout 1 12/20/07 5:08 PM Page iii
-
Linux® Bible 2008 Edition: Boot Up to Ubuntu®, Fedora®, KNOPPIX, Debian®, openSUSE®, and 11 Other Distributions
Published byWiley Publishing, Inc.10475 Crosspoint BoulevardIndianapolis, IN 46256www.wiley.com
Copyright © 2008 by Wiley Publishing, Inc., Indianapolis, Indiana
Published simultaneously in Canada
ISBN: 978-0-470-23019-0
Manufactured in the United States of America
10 9 8 7 6 5 4 3 2 1
Library of Congress Cataloging-in-Publication Data is available from the publisher.
No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means,electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorizationthrough payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the LegalDepartment, Wiley Publishing, Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4355, or online at http://www.wiley.com/go/permissions.
Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respectto the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including withoutlimitation warranties of fitness for a particular purpose. No warranty may be created or extended by sales or promotionalmaterials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with theunderstanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professionalassistance is required, the services of a competent professional person should be sought. Neither the publisher nor the authorshall be liable for damages arising herefrom. The fact that an organization or Website is referred to in this work as a citationand/or a potential source of further information does not mean that the author or the publisher endorses the informationthe organization or Website may provide or recommendations it may make. Further, readers should be aware that InternetWebsites listed in this work may have changed or disappeared between when this work was written and when it is read.
For general information on our other products and services please contact our Customer Care Department within theUnited States at (800) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002.
Trademarks: Wiley, the Wiley logo, and related trade dress are trademarks or registered trademarks of John Wiley & Sons,Inc. and/or its affiliates, in the United States and other countries, and may not be used without written permission. Linuxis a registered trademark of Linus Torvalds. Fedora is a registered trademark of Red Hat, Inc. Debian is a registered trademarkof Software in the Public Interest, Inc. openSUSE is a registered trademark of Novell, Inc. Ubuntu is a registered trademarkof Canonical Limited Company. All other trademarks are the property of their respective owners. Wiley Publishing, Inc. isnot associated with any product or vendor mentioned in this book.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be availablein electronic books.
30190ffirs.qxd:Layout 1 12/20/07 5:08 PM Page iv
www.wiley.com
-
As always, I dedicate this book to my wife, Sheree.
30190ffirs.qxd:Layout 1 12/20/07 5:08 PM Page v
-
30190ffirs.qxd:Layout 1 12/20/07 5:08 PM Page vi
-
About the AuthorsChris Negus has written or co-written dozens of books on Linux and UNIX, including Red HatLinux Bible (all editions), Fedora and Red Hat Enterprise Linux Bible, Linux Troubleshooting Bible, LinuxToys, and Linux Toys II. In late 2007, Chris co-authored three books for the new Linux Toolbox seriesfor power users: Fedora Linux Toolbox, SUSE Linux Toolbox, and Ubuntu Linux Toolbox. For eightyears, he worked with the organization at AT&T that developed UNIX before moving to Utah tocontribute to Novell’s short-lived UnixWare project in the early 1990s. When not writing aboutLinux, Chris enjoys playing soccer and just hanging out with his family.
Emmett Dulaney is the author of several books on operating systems, networking, and certification.An assistant professor at Anderson University, he is also a columnist for CertCities and a frequentcontributor to a number of other magazines.
30190ffirs.qxd:Layout 1 12/20/07 5:08 PM Page vii
-
CreditsAcquisitions EditorJenny Watson
Development EditorSara Shlaer
Technical EditorEmmett Dulaney
Copy EditorNancy Rapoport
Editorial ManagerMary Beth Wakefield
Production ManagerTim Tate
Vice President and Executive Group PublisherRichard Swadley
Vice President and Executive PublisherJoseph B. Wikert
Project Coordinator, CoverLynsey Stanford
Media Associate Project ManagerLaura Atkinson
Media Assistant ProducerJosh Frank
Media Quality ControlKit Malone
CompositorKate Kaminski, Happenstance Type-O-Rama
ProofreaderKathryn Duggan
IndexerJohnna VanHoose Dinse
30190ffirs.qxd:Layout 1 12/20/07 5:08 PM Page viii
-
I consider anyone who has contributed to the free and open source software community to be acontributor to the book you are holding. The backbone of any Linux distribution is formed bythe organizations that produce the distributions, the major projects included in Linux, and thethousands of people who give their time and code to support Linux. So, thanks to you all!
For Linux Bible 2008 Edition, Emmett Dulaney did most of the heavy lifting. Emmett’s thoroughtechnical edit of the entire book and updates to several critical sections made it possible for us tobring the book to market on schedule.
I’d like to acknowledge several contributors for their participation in previous editions. WayneTucker wrote and then updated the chapters on Debian, LAMP servers, and mail servers. Bill vonHagen contributed updates to the SUSE, Yellow Dog, and Ubuntu chapters. Jaldhar Vyas updatedthe Linspire chapter.
Thanks to the folks at Wiley for helping me press through the project. Jenny Watson did a wonder-ful job putting together the personnel needed to complete this book, in the face of my having fivebooks scheduled to complete within a two-month period. Sara Shlaer did her usual great job keep-ing the project moving under a very challenging schedule. Thanks to Margot Maley Hutchison andMaureen Maloney from Waterside Productions for contracting the book for me with Wiley.
And finally, special thanks to my wife, Sheree. There’s no way I could do the work I do withoutthe solid support I get on the home front. I love you, and thanks for taking such good care of Seth,Caleb, and me.
ix
30190ffirs.qxd:Layout 1 12/20/07 5:08 PM Page ix
-
Introduction ............................................................................................................................xxxiii
Part I: Linux First StepsChapter 1: Starting with Linux........................................................................................................3Chapter 2: Running Commands from the Shell ............................................................................35Chapter 3: Getting into the Desktop ............................................................................................81
Part II: Running the ShowChapter 4: Learning Basic Administration ..................................................................................131Chapter 5: Getting on the Internet ..............................................................................................179Chapter 6: Securing Linux ..........................................................................................................203
Part III: Choosing and Installing a Linux DistributionChapter 7: Installing Linux ........................................................................................................253Chapter 8: Running Fedora and Red Hat Enterprise Linux..........................................................283Chapter 9: Running Debian GNU/Linux ....................................................................................303Chapter 10: Running SUSE and openSUSE Linux ......................................................................327Chapter 11: Running KNOPPIX..................................................................................................343Chapter 12: Running Yellow Dog Linux ......................................................................................365Chapter 13: Running Gentoo Linux ............................................................................................383Chapter 14: Running Slackware Linux ........................................................................................403Chapter 15: Running Linspire and Freespire ..............................................................................419Chapter 16: Running Mandriva ..................................................................................................435Chapter 17: Running Ubuntu Linux ..........................................................................................449Chapter 18: Running a Linux Firewall/Router ............................................................................467Chapter 19: Running Bootable Linux Distributions ....................................................................493
Part IV: Running ApplicationsChapter 20: Playing Music and Video ........................................................................................513Chapter 21: Working with Words and Images ............................................................................549Chapter 22: E-Mailing and Web Browsing ..................................................................................589Chapter 23: Gaming with Linux..................................................................................................623
x
30190ffirs.qxd:Layout 1 12/20/07 5:08 PM Page x
-
Part V: Running ServersChapter 24: Running a Linux, Apache, MySQL, and PHP (LAMP) Server ..................................649Chapter 25: Running a Mail Server ............................................................................................671Chapter 26: Running a Print Server ............................................................................................689Chapter 27: Running a File Server ..............................................................................................713
Part VI: Programming in LinuxChapter 28: Programming Environments and Interfaces ............................................................749Chapter 29: Programming Tools and Utilities..............................................................................779
Appendix A: Media ....................................................................................................................809Appendix B: Entering the Linux Community ..............................................................................819
Index ..........................................................................................................................................825
30190ffirs.qxd:Layout 1 12/20/07 5:51 PM Page xi
-
30190ffirs.qxd:Layout 1 12/20/07 5:08 PM Page xii
-
xiii
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxiii
Part I: Linux First Steps
Chapter 1: Starting with Linux . . . . . . . . . . . . . . . . . . . . . . . . 3Taking Your First Step ..................................................................................................4Starting Right Now......................................................................................................6Understanding Linux ..................................................................................................6Exploring Linux History ..............................................................................................8
From a Free-Flowing UNIX Culture at Bell Labs..........................................................9To a Commercialized UNIX ......................................................................................11
BSD Arrives ....................................................................................................11UNIX Laboratory and Commercialization ........................................................11
To a GNU Free-Flowing (not) UNIX..........................................................................13BSD Loses Some Steam..............................................................................................14Linus Builds the Missing Piece ..................................................................................14
What’s So Great About Linux? ..................................................................................15Features in Linux ......................................................................................................16OSI Open Source Definition ......................................................................................17Vibrant Communities ................................................................................................18Major Software Projects ............................................................................................19
Linux in the Real World ............................................................................................20Linux in Schools........................................................................................................20Linux in Small Business ............................................................................................21Linux in the Enterprise ..............................................................................................22
Linux Myths, Legends, and FUD................................................................................23Can You Stop Worrying About Viruses? ....................................................................23Will You Be Sued for Using Linux? ............................................................................24
Microsoft Versus Linux ....................................................................................24The SCO Lawsuits ..........................................................................................25Software Patents ..............................................................................................26Other Potentially Litigious Issues ....................................................................27
Can Linux Really Run on Everything from Handhelds to Supercomputers? ..............27Will Microsoft Crush Linux?......................................................................................27Are You on Your Own If You Use Linux? ..................................................................29Is Linux Only for Geeks? ..........................................................................................29
30190ftoc.qxd:Layout 1 12/20/07 5:10 PM Page xiii
-
xiv
Contents
How Do Companies Make Money with Linux? ..........................................................29How Different Are Linux Distributions from One Another? ......................................30Is the Linux Mascot Really a Penguin? ......................................................................31
Getting Started with Linux ........................................................................................32Summary ..................................................................................................................33
Chapter 2: Running Commands from the Shell . . . . . . . . . . . . . . . 35Starting a Shell ..........................................................................................................36
Using the Shell Prompt..............................................................................................36Using a Terminal Window ........................................................................................37Using Virtual Terminals ............................................................................................38
Choosing Your Shell ..................................................................................................38Using bash (and Earlier sh) Shells..............................................................................39Using tcsh (and Earlier csh) Shells ............................................................................39Using ash ..................................................................................................................40Using ksh ..................................................................................................................40Using zsh ..................................................................................................................40
Exploring the Shell ....................................................................................................40Checking Your Login Session ....................................................................................41Checking Directories and Permissions ......................................................................41Checking System Activity ..........................................................................................43Exiting the Shell ........................................................................................................44
Using the Shell in Linux ............................................................................................45Locating Commands..................................................................................................46Rerunning Commands ..............................................................................................48
Command-Line Editing ..................................................................................49Command-Line Completion ............................................................................51Command-Line Recall ....................................................................................52
Connecting and Expanding Commands ....................................................................54Piping Commands ..........................................................................................54Sequential Commands ....................................................................................54Background Commands ..................................................................................55Expanding Commands ....................................................................................55Expanding Arithmetic Expressions ..................................................................56Expanding Environment Variables ..................................................................56
Creating Your Shell Environment ..............................................................................56Configuring Your Shell ..............................................................................................56
Setting Your Prompt ........................................................................................57Adding Environment Variables ........................................................................59Adding Aliases ................................................................................................60
Using Shell Environment Variables ............................................................................60Common Shell Environment Variables ............................................................60Setting Your Own Environment Variables ........................................................62
30190ftoc.qxd:Layout 1 12/20/07 5:10 PM Page xiv
-
Managing Background and Foreground Processes......................................................63Starting Background Processes ........................................................................64Using Foreground and Background Commands ..............................................64
Working with the Linux File System ..........................................................................65Creating Files and Directories ....................................................................................68
Using Metacharacters and Operators................................................................69Using File-Matching Metacharacters ................................................................70Using File-Redirection Metacharacters ............................................................71Understanding File Permissions ......................................................................71
Moving, Copying, and Deleting Files ........................................................................74Using the vi Text Editor ............................................................................................74
Starting with vi ..........................................................................................................76Moving Around the File ............................................................................................78Searching for Text......................................................................................................78Using Numbers with Commands ..............................................................................79
Summary ..................................................................................................................79
Chapter 3: Getting into the Desktop. . . . . . . . . . . . . . . . . . . . . 81Understanding Your Desktop ....................................................................................81Starting the Desktop ................................................................................................82
Boot to the Desktop ..................................................................................................82Boot to a Graphical Login ..........................................................................................83Boot to a Text Prompt................................................................................................85
K Desktop Environment ............................................................................................85Using the KDE Desktop ............................................................................................86Managing Files with the Konqueror File Manager......................................................90
Working with Files ..........................................................................................91Searching for Files ..........................................................................................92Creating New Files and Folders ......................................................................93Using Other Browser Features..........................................................................95
Configuring Konqueror Options................................................................................95Managing Windows ..................................................................................................97
Using the Taskbar ............................................................................................97Uncluttering the Desktop ................................................................................99Moving Windows ............................................................................................99Resizing Windows ..........................................................................................99Pinning Windows on the Top or Bottom..........................................................99Using Virtual Desktops ..................................................................................100
Configuring the Desktop ........................................................................................100Changing the Display ....................................................................................101Changing Panel Attributes ............................................................................102
Adding Application Launchers and MIME Types ....................................................102Adding Applications to the Panel ..................................................................103Adding Applications to the Desktop ..............................................................103
xv
Contents
30190ftoc.qxd:Layout 1 12/20/07 5:10 PM Page xv
-
The GNOME Desktop ............................................................................................103Using the Metacity Window Manager ......................................................................105Using the GNOME Panels........................................................................................107
Using the Applications, Places, and System Menus ........................................108Adding an Applet ..........................................................................................109Adding Another Panel....................................................................................109Adding an Application Launcher ..................................................................110Adding a Drawer............................................................................................111Changing Panel Properties ............................................................................111
Using the Nautilus File Manager..............................................................................1123D Effects with AIGLX ............................................................................................114Changing GNOME Preferences................................................................................116Exiting GNOME ......................................................................................................117
Configuring a GNOME Online Desktop..................................................................118Configuring Your Own Desktop ..............................................................................120
Configuring X..........................................................................................................120Creating a Working X Configuration File ......................................................121Getting New X Drivers ..................................................................................122Tuning Up Your X Configuration File ............................................................122
Choosing a Window Manager..................................................................................124Choosing Your Personal Window Manager ..............................................................126
Getting More Information ......................................................................................126Summary ................................................................................................................127
Part II: Running the Show
Chapter 4: Learning Basic Administration . . . . . . . . . . . . . . . . . 131Graphical Administration Tools ..............................................................................132
Using Web-Based Administration ............................................................................132Open Source Projects Offering Web Administration ......................................132The Webmin Administration Tool ..................................................................133
Graphical Administration with Different Distributions ............................................133Red Hat Config Tools ....................................................................................134SUSE YaST Tools............................................................................................136
Using the root Login ..............................................................................................137Becoming Root from the Shell (su Command) ........................................................138Allowing Limited Administrative Access ..................................................................139
Exploring Administrative Commands, Configuration Files, and Log Files ................140Administrative Commands ......................................................................................140Administrative Configuration Files ..........................................................................141Administrative Log Files ..........................................................................................145
Using sudo and Other Administrative Logins ........................................................146Administering Your Linux System ............................................................................148
xvi
Contents
30190ftoc.qxd:Layout 1 12/20/07 5:10 PM Page xvi
-
Creating User Accounts ..........................................................................................149Adding Users with useradd......................................................................................149Setting User Defaults ..............................................................................................152Modifying Users with usermod................................................................................154Deleting Users with userdel ....................................................................................155
Configuring Hardware ............................................................................................155Managing Removable Hardware ..............................................................................156
Removable Media on a GNOME Desktop ......................................................157Removable Media on a SUSE KDE Desktop ..................................................159
Working with Loadable Modules ............................................................................160Listing Loaded Modules ................................................................................160Loading Modules ..........................................................................................161Removing Modules ........................................................................................162
Managing File Systems and Disk Space ..................................................................162Mounting File Systems ............................................................................................165
Supported File Systems..................................................................................165Using the fstab File to Define Mountable File Systems ..................................167Using the mount Command to Mount File Systems ......................................169Using the umount Command ......................................................................171
Using the mkfs Command to Create a File System ..................................................172Adding a Hard Disk ................................................................................................173Checking System Space ..........................................................................................175
Displaying System Space with df....................................................................175Checking Disk Usage with du........................................................................176Finding Disk Consumption with find ............................................................176
Monitoring System Performance ............................................................................177Summary ................................................................................................................178
Chapter 5: Getting on the Internet . . . . . . . . . . . . . . . . . . . . . 179Connecting to the Network ....................................................................................180
Connecting via Dial-Up Service ..............................................................................180Connecting a Single Computer to Broadband ..........................................................181Connecting Multiple Computers to Broadband........................................................182Connecting Servers..................................................................................................184Connecting Other Equipment..................................................................................185
Using Ethernet Connections to the Internet ............................................................186Configuring Ethernet During Installation ................................................................186Configuring Ethernet from the Desktop ..................................................................187Using Network Configuration GUI in Fedora ..........................................................188Identifying Other Computers (Hosts and DNS) ......................................................190Using the Network Settings GUI in Ubuntu ............................................................191Understanding Your Internet Connection ................................................................193
Using Dial-Up Connections to the Internet ............................................................195Getting Information ................................................................................................195Setting Up Dial-Up PPP ..........................................................................................196
xvii
Contents
30190ftoc.qxd:Layout 1 12/20/07 5:10 PM Page xvii
-
Creating a Dial-Up Connection with the Internet Configuration Wizard..................197Launching Your PPP Connection ............................................................................199Launching Your PPP Connection on Demand..........................................................199Checking Your PPP Connection ..............................................................................200Checking That Your Modem Was Detected..............................................................200
Connecting to the Internet with Wireless................................................................201Summary ................................................................................................................202
Chapter 6: Securing Linux . . . . . . . . . . . . . . . . . . . . . . . . . 203Linux Security Checklist ..........................................................................................204
Finding Distribution-Specific Security Resources ....................................................207Finding General Security Resources ........................................................................208
Using Linux Securely ..............................................................................................209Using Password Protection ......................................................................................209Choosing Good Passwords ......................................................................................210Using a Shadow Password File ................................................................................211
Breaking Encrypted Passwords ......................................................................212Checking for the Shadow Password File ........................................................212
Using Log Files ........................................................................................................213The Role of syslogd..................................................................................................216Redirecting Logs to a Loghost with syslogd..............................................................216Understanding the messages Log File ......................................................................217
Using Secure Shell Tools..........................................................................................218Starting the ssh Service ............................................................................................218Using the ssh, sftp, and scp Commands ..................................................................219Using ssh, scp, and sftp Without Passwords ............................................................220
Securing Linux Servers ............................................................................................222Controlling Access to Services with TCP Wrappers..................................................222Understanding Attack Techniques ..........................................................................225Protecting Against Denial of Service Attacks ............................................................226
Mailbombing ................................................................................................226Spam Relaying ..............................................................................................228Smurf Amplification Attack............................................................................228
Protecting Against Distributed DOS Attacks ............................................................229Protecting Against Intrusion Attacks ........................................................................233
Evaluating Access to Network Services ..........................................................233Disabling Network Services ..........................................................................235
Securing Servers with SELinux ................................................................................236Protecting Web Servers with Certificates and Encryption ........................................237
Symmetric Cryptography ..............................................................................237Asymmetric Cryptography ............................................................................238Secure Sockets Layer ....................................................................................238
Using Linux Live CD Security Tools ........................................................................247Advantages of Security Live CDs..............................................................................247Using INSERT to Check for rootkits ........................................................................247
Summary ................................................................................................................248
xviii
Contents
30190ftoc.qxd:Layout 1 12/20/07 5:10 PM Page xviii
-
Part III: Choosing and Installing a Linux Distribution
Chapter 7: Installing Linux . . . . . . . . . . . . . . . . . . . . . . . . . 253Choosing a Linux Distribution ................................................................................254
Linux at Work ........................................................................................................254Other Distributions ................................................................................................255
Getting Your Own Linux Distribution ....................................................................255Finding Another Linux Distribution ........................................................................256Understanding What You Need ..............................................................................256Downloading the Distribution ................................................................................257Burning the Distribution to CD ..............................................................................258
Exploring Common Installation Topics ....................................................................259Knowing Your Computer Hardware ........................................................................259Upgrading or Installing from Scratch ......................................................................261Dual Booting with Windows or Just Linux? ............................................................261Using Installation Boot Options ..............................................................................263Partitioning Hard Drives ..........................................................................................263
Partitioning with Disk Druid During Installation ..........................................264Partitioning with fdisk ..................................................................................267Tips for Creating Partitions ............................................................................269
Using LILO or GRUB Boot Loaders..........................................................................271Booting Your Computer with GRUB ..............................................................271Booting with GRUB ......................................................................................272Temporarily Changing Boot Options..............................................................272Permanently Changing Boot Options ............................................................273Adding a New GRUB Boot Image ..................................................................275Booting Your Computer with LILO ................................................................275Changing Your Boot Loader ..........................................................................279
Configuring Networking..........................................................................................280Configuring Other Administrative Features ............................................................281
Installing from the Linux Bible CD or DVD ............................................................281Summary ................................................................................................................282
Chapter 8: Running Fedora and Red Hat Enterprise Linux . . . . . . . . . 283Digging into Features ..............................................................................................285
Red Hat Installer (Anaconda) ..................................................................................285RPM Package Management ......................................................................................286Kudzu Hardware Detection ....................................................................................286Red Hat Desktop Look-and-Feel..............................................................................287System Configuration Tools ....................................................................................288
Going Forward with Fedora ....................................................................................288Growing Community Support for Fedora ................................................................288Forums and Mailing Lists ........................................................................................289
xix
Contents
30190ftoc.qxd:Layout 1 12/20/07 5:10 PM Page xix
-
Fedora Comes of Age ..............................................................................................289Installing Fedora......................................................................................................291
Choosing Computer Hardware ................................................................................291Choosing an Installation Method ............................................................................292
Installing on Multiple Computers ..................................................................293Installation Guides ........................................................................................293
Choosing to Install or Upgrade................................................................................293Beginning the Installation ........................................................................................294Running the Fedora Setup Agent ............................................................................301
Summary ................................................................................................................302
Chapter 9: Running Debian GNU/Linux . . . . . . . . . . . . . . . . . . 303Inside Debian GNU/Linux ......................................................................................304
Debian Packages ......................................................................................................304Debian Package Management Tools ........................................................................305Debian Releases ......................................................................................................307
Getting Help with Debian ......................................................................................307Installing Debian GNU/Linux ................................................................................308
Hardware Requirements and Installation Planning ..................................................308Workstations..................................................................................................309Servers ..........................................................................................................309
Running the Installer ..............................................................................................309Managing Your Debian System................................................................................314
Configuring Network Connections ..........................................................................314IP Networks: Ethernet and Wireless ..............................................................315Dial-Up PPP Connections ..............................................................................316PPPoE Connections ......................................................................................317
Package Management Using APT ............................................................................317Managing the List of Package Repositories ....................................................318Updating the APT Package Database..............................................................318Finding and Installing Packages ....................................................................319Removing Packages........................................................................................320Upgrading Your System ................................................................................320
Package Management Using dpkg............................................................................321Installing and Removing Packages ................................................................321Querying the Package Database ....................................................................321Examining a Package File ..............................................................................322
Installing Package Sets (Tasks) with Tasksel ............................................................323Alternatives, Diversions, and Stat Overrides ............................................................323Managing Package Configuration with debconf ......................................................325
Summary ................................................................................................................325
xx
Contents
30190ftoc.qxd:Layout 1 12/20/07 5:10 PM Page xx
-
Chapter 10: Running SUSE and openSUSE Linux . . . . . . . . . . . . . . 327Understanding SUSE and openSUSE ......................................................................328What’s in SUSE........................................................................................................329
Installation and Configuration with YaST ................................................................330RPM Package Management ......................................................................................332Automated Software Updates ..................................................................................334Managing Software with zypper ..............................................................................334
Getting Support for SUSE and openSUSE................................................................334Installing openSUSE ................................................................................................335
Before You Begin......................................................................................................335Starting Installation ................................................................................................336
Installation Settings........................................................................................337Configuration Settings ..................................................................................339
Starting with openSUSE ..........................................................................................341Summary ................................................................................................................341
Chapter 11: Running KNOPPIX . . . . . . . . . . . . . . . . . . . . . . 343KNOPPIX Features ..................................................................................................343Understanding KNOPPIX ........................................................................................344
KNOPPIX News ......................................................................................................344Looking Inside KNOPPIX........................................................................................344What’s Cool About KNOPPIX..................................................................................346Examining Challenges with KNOPPIX ....................................................................347Seeing Where KNOPPIX Comes From ....................................................................348Exploring Uses for KNOPPIX ..................................................................................349
Starting KNOPPIX ..................................................................................................350Getting a Computer ................................................................................................350Booting KNOPPIX ..................................................................................................351Correcting Boot Problems........................................................................................351
Customizing KNOPPIX..................................................................................354Special Features and Workarounds ................................................................355
Using KNOPPIX ......................................................................................................356Getting on the Network ..........................................................................................357Installing Software in KNOPPIX ..............................................................................358Saving Files in KNOPPIX ........................................................................................359
Writing to Hard Disk ....................................................................................359Creating a Persistent Home Directory ............................................................360
Keeping Your KNOPPIX Configuration....................................................................361Restarting KNOPPIX................................................................................................362
Summary ................................................................................................................363
xxi
Contents
30190ftoc.qxd:Layout 1 12/20/07 5:10 PM Page xxi
-
Chapter 12: Running Yellow Dog Linux . . . . . . . . . . . . . . . . . . 365Understanding Yellow Dog Linux ..........................................................................365Going Forward with Yellow Dog ............................................................................367Digging into Yellow Dog..........................................................................................368Installing Yellow Dog Linux ....................................................................................369
Hardware Support ..................................................................................................370Planning Your Installation........................................................................................371
Installing Mac OS X and Yellow Dog Linux on One Hard Drive ....................372Installing Mac OS 9 or Earlier and Yellow Dog Linux on One Hard Drive......372Installing Mac OS 9 or Earlier, Mac OS X, and Yellow Dog Linux
on Multiple Hard Drives ..........................................................................373Yellow Dog Linux 3.0.1 Special Considerations ............................................373
Beginning the Installation ........................................................................................373Rebooting Your Linux Mac ......................................................................................379
Updating Yellow Dog Linux ....................................................................................379Running Mac Applications with Mac-on-Linux........................................................381Support Options......................................................................................................381Summary ................................................................................................................382
Chapter 13: Running Gentoo Linux . . . . . . . . . . . . . . . . . . . . 383Understanding Gentoo............................................................................................383
Gentoo’s Open Source Spirit ....................................................................................384The Gentoo Community..........................................................................................385Building, Tuning, and Tweaking Linux ....................................................................385Where Gentoo Is Used ............................................................................................386
What’s in Gentoo ....................................................................................................387Managing Software with Portage..............................................................................388Finding Software Packages ......................................................................................388New Gentoo Features ............................................................................................389
Installing Gentoo ....................................................................................................389Getting Gentoo........................................................................................................389
Live CD Install ..............................................................................................390Minimal/Universal Install CD ........................................................................390
Starting Gentoo Installation from a Live CD ............................................................391Starting Gentoo Installation from a Minimal CD......................................................393Getting Software with emerge ..................................................................................401
Summary ................................................................................................................402
Chapter 14: Running Slackware Linux . . . . . . . . . . . . . . . . . . . 403Getting into Slackware............................................................................................403Characterizing the Slackware Community ..............................................................405
The Slackware Creator ............................................................................................405
xxii
Contents
30190ftoc.qxd:Layout 1 12/20/07 5:10 PM Page xxii
-
Slackware Users ......................................................................................................406Slackware Internet Sites ..........................................................................................407
Challenges of Using Slackware................................................................................407Using Slackware as a Development Platform ..........................................................408Installing Slackware ................................................................................................409
Getting Slackware....................................................................................................409New Features in Slackware 12.0 ..............................................................................409Hardware Requirements ..........................................................................................410Starting Installation ................................................................................................410
Starting with Slackware ..........................................................................................415Summary ................................................................................................................417
Chapter 15: Running Linspire and Freespire . . . . . . . . . . . . . . . . 419Overview of Linspire ..............................................................................................419Which Version Is Right for You? ..............................................................................421
Installing Software with Click-N-Run ......................................................................423Other Installation Options ......................................................................................424
Linspire and Freespire Support ..............................................................................425Forums and Information ........................................................................................425Audio Assistant........................................................................................................425
Installing Linspire or Freespire ................................................................................426Hardware Requirements ..........................................................................................426Installing Linspire or Freespire ................................................................................427
Securing Linspire and Freespire ..............................................................................431Summary ................................................................................................................432
Chapter 16: Running Mandriva. . . . . . . . . . . . . . . . . . . . . . . 435Mandriva Features ..................................................................................................435Exploring Mandriva ................................................................................................437
Mandriva Installer (DrakX)......................................................................................438RPM Package Management with RPMDrake ............................................................439Mandriva Linux Control Center ..............................................................................440
The Mandriva Community ......................................................................................441RPM Repository on Mandriva Club ........................................................................442Mandriva Forums ....................................................................................................442
Installing Mandriva Limited Edition ........................................................................442The Right Hardware for Mandriva ..........................................................................443Installing Mandriva with the DrakX Installer ..........................................................444
Summary ................................................................................................................447
Chapter 17: Running Ubuntu Linux . . . . . . . . . . . . . . . . . . . . 449Overview of Ubuntu ..............................................................................................450
Ubuntu Releases ......................................................................................................450Ubuntu Installer ......................................................................................................451Ubuntu as a Desktop ..............................................................................................451
xxiii
Contents
30190ftoc.qxd:Layout 1 12/20/07 5:10 PM Page xxiii
-
Ubuntu as a Server ..................................................................................................452Ubuntu Spin-Offs ....................................................................................................454Challenges Facing Ubuntu ......................................................................................454
Installing Ubuntu ....................................................................................................455Starting with Ubuntu ..............................................................................................460
Trying Out the Desktop ..........................................................................................461Adding More Software ............................................................................................462
Getting More Information About Ubuntu ..............................................................465Summary ................................................................................................................466
Chapter 18: Running a Linux Firewall/Router . . . . . . . . . . . . . . . 467Understanding Firewalls..........................................................................................468Protecting Desktops with Firewalls ........................................................................469
Starting Your Firewall in Fedora ..............................................................................469Configuring a Firewall in Mandriva ........................................................................470
Using Firewalls with iptables ..................................................................................472Starting with iptables ..............................................................................................472
Setting Some Rules ........................................................................................472Saving Firewall Settings ................................................................................476Checking Your Firewall..................................................................................476
Using iptables to Do SNAT or IP Masquerading ......................................................477Adding Modules with iptables ................................................................................478Using iptables as a Transparent Proxy ......................................................................479Using iptables for Port Forwarding ..........................................................................479
Getting iptables Scripts ..................................................................................480Finding Out More About iptables ..................................................................480
Making a Coyote Linux Bootable Floppy Firewall....................................................480Creating a Coyote Linux Firewall ............................................................................481Building the Coyote Linux Floppy ..........................................................................482Running the Coyote Linux Floppy Firewall ............................................................488Managing the Coyote Linux Floppy Firewall ..........................................................488
Using a Web Interface ....................................................................................488Using a Remote Login....................................................................................488
Using Other Firewall Distributions ........................................................................490Summary ................................................................................................................491
Chapter 19: Running Bootable Linux Distributions. . . . . . . . . . . . . 493Overview of Bootable Linux Distributions ..............................................................493Choosing a Bootable Linux......................................................................................494
Security and Rescue Bootables ................................................................................495BackTrack Network Security Suite ................................................................496SystemRescueCd............................................................................................497KNOPPIX Security Tools Distribution............................................................498The Inside Security Rescue Toolkit ................................................................498
Demonstration Bootables ........................................................................................500
xxiv
Contents
30190ftoc.qxd:Layout 1 12/20/07 5:10 PM Page xxiv
-
Multimedia Bootables ..............................................................................................500MoviX............................................................................................................501GeeXboX ......................................................................................................502KnoppMyth ..................................................................................................502Dyne:bolic ....................................................................................................503
Tiny Desktops ........................................................................................................503Damn Small Linux ........................................................................................503Puppy Linux..................................................................................................505
Special-Purpose Bootables ......................................................................................506Customizing a Bootable Linux ................................................................................508Summary ................................................................................................................510
Part IV: Running Applications
Chapter 20: Playing Music and Video . . . . . . . . . . . . . . . . . . . 513Playing Digital Media and Obeying the Law ..........................................................514
Copyright Protection Issues ....................................................................................514Exploring Codecs ....................................................................................................516
Playing Music ..........................................................................................................518Setting Up Audio Cards ..........................................................................................518Choosing an Audio CD Player ................................................................................520
Playing CDs with gnome-cd ..........................................................................520Playing Music with the Rhythmbox Audio Player ..........................................522Playing Music with the XMMS Multimedia Player..........................................524
Using MIDI Audio Players ......................................................................................528Performing Audio File Conversion and Compression ..............................................528
Converting Audio Files with SoX ..................................................................528Compressing Music Files with oggenc ..........................................................531
Recording and Ripping Music ................................................................................531Creating an Audio CD with cdrecord ......................................................................532Ripping CDs with Grip............................................................................................533Creating CD Labels with cdlabelgen ........................................................................535
Working with TV, Video, and Digital Imaging ..........................................................536Watching TV with tvtime ........................................................................................536
Getting a Supported TV Card ........................................................................536Running tvtime..............................................................................................537
Video Conferencing with Ekiga ..............................................................................538Getting a Supported Webcam ........................................................................538Opening Your Firewall for Ekiga ....................................................................539Running Ekiga ..............................................................................................539
Watching Movies and Video ....................................................................................540Watching Video with xine........................................................................................540
Using xine ....................................................................................................542Creating Playlists with xine............................................................................542xine Tips........................................................................................................543
Using Helix Player and RealPlayer 10 ......................................................................544
xxv
Contents
30190ftoc.qxd:Layout 1 12/20/07 5:10 PM Page xxv
-
Using a Digital Camera with gtkam and gPhoto2....................................................545Downloading Digital Photos with gtkam ................................................................545Using Your Camera as a Storage Device ..................................................................546
Summary ................................................................................................................547
Chapter 21: Working with Words and Images . . . . . . . . . . . . . . . 549Using OpenOffice.org ............................................................................................550Other Word Processors ..........................................................................................552
Using StarOffice ......................................................................................................553Using AbiWord........................................................................................................554Using KOffice ..........................................................................................................554Getting Away from Windows ..................................................................................555
Using Traditional Linux Publishing Tools..................................................................557Creating Documents in Groff or LaTeX ..................................................................558
Text Processing with Groff ......................................................................................560Formatting and Printing Documents with Groff ............................................561Creating a Man Page with Groff ....................................................................561Creating a Letter, Memo, or White Paper with Groff ......................................564Adding Equations, Tables, and Pictures ........................................................566
Text Processing with TeX/LaTeX ..............................................................................570Creating and Formatting a LaTeX Document ................................................570Using the LyX LaTeX Editor ..........................................................................571Printing LaTeX Files ......................................................................................572
Converting Documents............................................................................................573Building Structured Documents ..............................................................................574
Understanding SGML and XML ....................................................................574Understanding DocBook................................................................................575
Printing Documents in Linux ..................................................................................578Printing to the Default Printer..................................................................................579Printing from the Shell ............................................................................................579Checking the Print Queues......................................................................................580Removing Print Jobs ................................................................................................580Checking Printer Status ..........................................................................................581
Displaying Documents with ghostscript and Acrobat..............................................581Using the ghostscript and gv Commands ................................................................581Using Adobe Acrobat Reader ..................................................................................582
Working with Graphics ..........................................................................................583Manipulating Images with GIMP ............................................................................583Acquiring Screen Captures ......................................................................................585Modifying Images with KPaint ................................................................................585
Using Scanners Driven by SANE ............................................................................586Summary ................................................................................................................587
Chapter 22: E-Mailing and Web Browsing . . . . . . . . . . . . . . . . . 589Using E-Mail............................................................................................................589
Choosing an E-Mail Client ......................................................................................589
xxvi
Contents
30190ftoc.qxd:Layout 1 12/20/07 5:10 PM Page xxvi
-
Getting Here from Windows....................................................................................591Getting Started with E-Mail ....................................................................................592Tuning Up E-Mail ....................................................................................................593Reading E-Mail with Thunderbird ..........................................................................594
Connecting to the Mail Server........................................................................599Managing Incoming Mail ..............................................................................599Composing and Sending E-Mail ....................................................................600Filtering E-Mail and Catching Spam ..............................................................601
Managing E-Mail in Evolution ................................................................................602Receiving, Composing, and Sending E-Mail ..................................................604Managing E-Mail with Search Folders ............................................................604Filtering E-Mail Messages ..............................................................................605
Reading E-Mail with Mozilla Mail ............................................................................606Working with Text-Based E-Mail Readers ................................................................606
Mutt Mail Reader ..........................................................................................606Pine Mail Reader............................................................................................607Mail Reader....................................................................................................607
Choosing a Web Browser ........................................................................................607Exploring the Mozilla Suite ....................................................................................608Using Firefox ..........................................................................................................609
Setting Up Firefox ..................................................................................................610Setting Firefox Preferences ............................................................................610Adding Plug-ins ............................................................................................612Changing Firefox Themes ..............................................................................613
Securing Firefox ......................................................................................................614Tips for Using Firefox..............................................................................................616Using Firefox Controls ............................................................................................616Improving Firefox Browsing ....................................................................................617
Adding a Preferences Toolbar ........................................................................617Adding Java Support......................................................................................618
Doing Cool Things with Firefox ..............................................................................618Blocking Pop-ups ..........................................................................................618Using Tabbed Browsing ................................................................................619Using the DOM Inspector ..............................................................................619Resizing the Web Page ..................................................................................619
Using Text-Based Web Browsers..............................................................................620Summary ................................................................................................................621
Chapter 23: Gaming with Linux . . . . . . . . . . . . . . . . . . . . . . 623Overview of Linux Gaming ....................................................................................623Basic Linux Gaming Information ............................................................................624
Where to Get Information about Linux Gaming ......................................................624Choosing a Video Card for Gaming ........................................................................626
Binary-Only Video Card Drivers ....................................................................626Open Source Video Drivers............................................................................627
xxvii
Contents
30190ftoc.qxd:Layout 1 12/20/07 5:10 PM Page xxvii
-
Running Open Source Linux Games........................................................................628GNOME Games ......................................................................................................628KDE Games ............................................................................................................629Games in Fedora ....................................................................................................631
Freeciv ..........................................................................................................632PlanetPenguin Racer (TuxRacer) ....................................................................637
Commercial Linux Games ......................................................................................638Getting Started with Commercial Games in Linux ..................................................638Playing Commercial Linux Games ..........................................................................639id Software Games ..................................................................................................640
Quake III Arena ............................................................................................640Return to Castle Wolfenstein..........................................................................641
Playing TransGaming and Cedega Games ................................................................641Loki Software Game Demos ....................................................................................643
Civilization: Call to Power ............................................................................644Myth II: Soulblighter ....................................................................................645Heretic II ......................................................................................................645Neverwinter Nights........................................................................................646
Summary ................................................................................................................646
Part V: Running Servers
Chapter 24: Running a Linux, Apache, MySQL, and PHP (LAMP) Server. . 649Components of a LAMP Server................................................................................649
Apache ....................................................................................................................650MySQL ....................................................................................................................650PHP ........................................................................................................................651
Setting Up Your LAMP Server..................................................................................651Installing Apache ....................................................................................................652Installing PHP..........................................................................................................652Installing MySQL ....................................................................................................654
Operating Your LAMP Server ..................................................................................655Editing Your Apache Configuration Files ................................................................655Adding a Virtual Host to Apache ............................................................................658User Content and the userdir Setting ......................................................................659Installing a Web Application: Coppermine Photo Gallery ........................................659
Troubleshooting ......................................................................................................662Configuration Errors................................................................................................662Access Forbidden and Server Internal Errors ..........................................................664
Securing Your Web Traffic with SSL/TLS ..................................................................665Generating Your Keys ..............................................................................................667Configuring Apache to Support SSL/TLS ................................................................668
Summary ................................................................................................................670
xxviii
Contents
30190ftoc.qxd:Layout 1 12/20/07 5:10 PM Page xxviii
top related