Logout succeed
Logout succeed. See you again!

Fedora 7 unleashed PDF
Preview Fedora 7 unleashed
Andrew Hudson and Paul Hudson Fedora 7 ™ U N L E A S H E D 800 East 96th Street,Indianapolis,Indiana 46240 USA Fedora™ 7 Unleashed Acquisitions Editor Copyright © 2008 by Sams Publishing Damon Jordan All rights reserved. No part of this book shall be reproduced,stored in a retrieval system,or transmitted by any means,electronic,mechanical,photocopying,recording, Development Editor or otherwise,without written permission from the publisher. No patent liability is Michael Thurston assumed with respect to the use of the information contained herein. Although every precaution has been taken in the preparation of this book,the publisher and author Managing Editor assume no responsibility for errors or omissions. Nor is any liability assumed for Gina Kanouse damages resulting from the use of the information contained herein. ISBN-13: 978-0-672-32942-5 Project Editor ISBN-10: 0-672-32942-5 George E. Nedeff Copy Editor Library of Congress Cataloging-in-Publication Data Margo Catts Hudson,Andrew,1978- Indexer Fedora 7 unleashed / Andrew Hudson,Paul Hudson. Brad Herriman p. cm. ISBN 978-0-672-32942-5 (pbk. w/dvd) Proofreader 1. Linux. 2. Operating systems (Computers) I. Hudson,Paul,1979- II. Title. Heather Waye Arle Technical Editor QA76.76.O63H794 2007 Dallas Releford 005.4’32—dc22 2007030725 Publishing Coordinator Printed in the United States on America Vanessa Evans First Printing: August 2007 Multimedia Developer Trademarks Dan Scherf All terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized. Sams Publishing cannot attest to the accuracy of Book Designer this information. Use of a term in this book should not be regarded as affecting the Gary Adair validity of any trademark or service mark. Warning and Disclaimer Composition Every effort has been made to make this book as complete and as accurate as possi- Nonie Ratcliff ble,but no warranty or fitness is implied. The information provided is on an “as is” basis. The author(s) and the publisher shall have neither liability nor responsibility to any person or entity with respect to any loss or damages arising from the information contained in this book or from the use of the DVD or programs accompanying it. Bulk Sales Sams Publishing offers excellent discounts on this book when ordered in quantity for bulk purchases or special sales. For more information,please contact U.S. Corporate and Government Sales 1-800-382-3419 [email protected] For sales outside of the U.S.,please contact International Sales [email protected] Contents at a Glance Introduction.................................................................................. 1 Part I Installation and Configuration 1 Installing Fedora............................................................................. 9 2 Fedora Quick Start......................................................................... 41 3 Working with GNOME................................................................... 53 4 Command Line Quickstart.............................................................. 77 Part II Desktop Fedora 5 On the Internet........................................................................... 111 6 Productivity Applications.............................................................. 129 7 Multimedia................................................................................ 149 8 Printing with Fedora.................................................................... 179 9 Games....................................................................................... 193 Part III System Administration 10 Managing Users.......................................................................... 205 11 Automating Tasks........................................................................ 233 12 System-Monitoring Tools.............................................................. 261 13 Backing Up ................................................................................ 271 14 Networking................................................................................ 297 15 Remote Access with SSH............................................................... 335 16 Xen........................................................................................... 345 Part IV Fedora As a Server 17 Apache Web Server Management................................................... 353 18 Administering Database Services.................................................... 389 19 File and Print.............................................................................. 415 20 Remote File Serving with FTP........................................................ 445 21 Handling Electronic Mail.............................................................. 479 22 Setting Up a Proxy Server ............................................................. 501 23 Managing DNS............................................................................ 511 24 LDAP........................................................................................ 551 iv Fedora 7 Unleashed Part V Programming Linux 25 Using Perl.................................................................................. 563 26 Working with Python .................................................................. 579 27 Writing PHP Scripts..................................................................... 599 28 C/C++ Programming Tools for Fedora............................................. 629 29 Mono........................................................................................ 641 Part VI Fedora Housekeeping 30 Securing Your Machines............................................................... 655 31 Performance Tuning.................................................................... 669 32 Command Line Masterclass........................................................... 683 33 Writing and Executing a Shell Script............................................... 711 34 Advanced Software Management................................................... 737 35 Managing the File System ............................................................ 757 36 Kernel and Module Management................................................... 787 Part VII Appendices A The History of Red Hat and Fedora ................................................ 813 B Installation Resources................................................................... 821 C Fedora and Linux Internet Resources ............................................. 847 Table of Contents Introduction 1 Changes from Previous Editions........................................................ 2 Licensing....................................................................................... 2 Who This Book Is For...................................................................... 3 What This Book Contains................................................................ 3 Conventions Used in This Book........................................................ 5 Part I Installation and Configuration 1 Installing Fedora 9 Before You Begin the Installation....................................................... 9 Planning Partition Strategies................................................... 10 Choosing How to Install Fedora...................................................... 14 Installing from CD or DVD..................................................... 14 Installing Using a Network...................................................... 15 Step-by-Step Installation................................................................. 16 Starting the Install................................................................. 17 Partitioning Your Hard Drive................................................... 22 Choosing, Configuring, and Installing the Boot Loader............... 25 Network Configuration.......................................................... 27 Setting the Time Zone............................................................ 28 Creating a Root Password and User Accounts............................. 29 Software Selection and Installation........................................... 30 Finishing the Install............................................................... 32 Firstboot Configuration.......................................................... 34 Logging In and Shutting Down....................................................... 38 Reference..................................................................................... 39 2 Fedora Quick Start 41 The Fedora Desktop....................................................................... 41 Getting Around Fedora.................................................................. 43 The Menu Options................................................................ 43 Window Selector................................................................... 44 The Computer Icon............................................................... 44 The Home Icon..................................................................... 44 Accessing the Command Line................................................. 45 vi Fedora 7 Unleashed Available Applications.................................................................... 46 Office Suite.......................................................................... 46 Internet Workstation ............................................................. 46 Multimedia.......................................................................... 47 Games................................................................................. 47 Keeping Your Software Up To Date................................................... 47 Configuring Wireless Networks........................................................ 49 3 Working with GNOME 53 The GNOME Desktop Environment................................................. 54 AIGLX—Eye Candy for the Masses................................................... 56 Basic X Concepts.......................................................................... 57 Using X....................................................................................... 58 Elements of the xorg.confFile................................................ 59 Configuring X...................................................................... 64 Starting X.................................................................................... 67 Using a Display Manager........................................................ 68 Starting X from the Console by Using startx............................ 71 Using Fedora’s switchdeskClient............................................. 72 KDE—The Other Environment........................................................ 73 XFce........................................................................................... 74 Reference..................................................................................... 75 4 Command Line Quickstart 77 Understanding the Command Line.................................................. 77 Navigating Through the File System......................................... 80 Managing Files with the Shell.................................................. 82 Working with Compressed Files............................................... 83 Use Essential Commands from the /binand/sbinDirectories...... 84 Use and Edit Files in the /etcDirectory.................................... 84 Protect the Contents of User Directories—/home......................... 86 Use the Contents of the /procDirectory to Interact with the Kernel................................................................... 86 Work with Shared Data in the /usrDirectory ............................ 88 Temporary File Storage in the /tmpDirectory............................. 88 Access Variable Data Files in the /varDirectory.......................... 88 Logging In to and Working with Linux............................................. 88 Text-based Console Login....................................................... 89 Logging Out......................................................................... 89 Logging In and Out from a Remote Computer........................... 89 Using Environment Variables.................................................. 90 Contents vii Using the Text Editors.................................................................... 93 Working with vi................................................................... 94 Working with emacs............................................................... 95 Working with Permissions.............................................................. 96 Assigning Permissions............................................................ 97 Directory Permissions............................................................ 98 Understanding Set User ID and Set Group ID Permissions.......... 100 Working as Root.......................................................................... 102 Creating Users..................................................................... 103 Deleting Users..................................................................... 104 Shutting Down the System.................................................... 104 Rebooting the System........................................................... 105 Reading Documentation............................................................... 105 Using Man Pages................................................................. 106 Reference................................................................................... 107 Part II Desktop Fedora 5 On the Internet 111 Browsing the Internet.................................................................. 111 Mozilla Firefox.................................................................... 112 Konqueror.......................................................................... 113 Choosing an Email Client............................................................. 114 Evolution........................................................................... 114 Mozilla Thunderbird............................................................ 117 KMail................................................................................ 118 Other Mail Clients............................................................... 118 RSS Readers................................................................................ 119 Firefox............................................................................... 119 Liferea............................................................................... 119 Instant Messaging with Pidgin....................................................... 121 Internet Relay Chat..................................................................... 122 Usenet Network Newsgroups......................................................... 124 The Pan News Client Newsreader................................................... 125 Videoconferencing with Ekiga....................................................... 127 Reference................................................................................... 128 6 Productivity Applications 129 What Is in OpenOffice.org?........................................................... 130 Working with OpenOffice.org Writer...................................... 133 Working with OpenOffice.org Calc......................................... 136 viii Fedora 7 Unleashed Office Suites for Fedora................................................................. 141 Working with Gnome Office................................................. 142 Working with KOffice........................................................... 144 Productivity Applications Written for Microsoft Windows.................. 147 Reference................................................................................... 148 7 Multimedia 149 Listening to Music....................................................................... 149 Streaming Audio.................................................................. 152 Graphics Manipulation................................................................ 152 The GNU Image Manipulation Program.................................. 152 Using Scanners in Fedora...................................................... 153 Working with Graphics Formats............................................. 155 Capturing Screen Images....................................................... 157 Using Digital Cameras with Fedora................................................. 157 Handheld Digital Cameras.................................................... 157 Using F-Spot....................................................................... 159 Burning CDs and DVDs in Fedora.................................................. 161 Creating CDs and DVDs with Fedora’s Graphical Clients............ 162 Creating CDs from the Command Line................................... 164 Creating DVDs from the Command Line................................. 166 Sound and Music........................................................................ 168 Sound Cards....................................................................... 169 Adjusting Volume................................................................ 169 Sound Formats.................................................................... 170 Viewing Video............................................................................ 171 TV and Video Hardware........................................................ 171 Video Formats..................................................................... 174 Viewing Video in Linux........................................................ 175 Personal Video Recorders...................................................... 175 DVD and Video Players......................................................... 176 Reference................................................................................... 177 8 Printing with Fedora 179 Overview of Fedora Printing.......................................................... 179 Configuring and Managing Print Services........................................ 181 GUI-Based Printer Configuration Quickstart............................. 182 Managing Printing Services................................................... 183 Creating and Configuring Local Printers.......................................... 185 Creating the Print Queue...................................................... 185 Editing Printer Settings......................................................... 189 Reference................................................................................... 191 Contents ix 9 Games 193 Linux Gaming............................................................................ 193 Installing Proprietary Video Drivers........................................ 194 Installing Popular Games in Fedora................................................ 195 DOOM 3............................................................................ 195 Unreal Tournament 2004...................................................... 197 Quake 4............................................................................. 198 Wolfenstein: Enemy Territory................................................ 199 Battle for Wesnoth............................................................... 199 KDEedu..................................................................................... 200 Playing Windows Games with Cedega............................................ 201 Reference................................................................................... 202 Part III System Administration 10 Managing Users 205 User Accounts............................................................................. 205 Adding New Users............................................................... 207 User IDs and Group IDs........................................................ 209 Managing Groups........................................................................ 210 Group Management Tools..................................................... 211 Managing Users.......................................................................... 212 User Management Tools........................................................ 213 Monitoring User Activity on the System.................................. 214 Managing Permissions.................................................................. 215 Assigning Permissions.......................................................... 216 Directory Permissions........................................................... 217 Understanding Set User ID and Set Group ID Permissions.......... 219 Managing Passwords.................................................................... 220 The Password File................................................................ 221 Shadow Passwords............................................................... 222 Managing Password Security for Users..................................... 224 Changing Passwords in a Batch.............................................. 225 Granting System Administrator Privileges to Regular Users................. 225 Temporarily Changing User Identity with the suCommand....... 225 Granting Root Privileges on Occasion—The sudoCommand....... 227 Disk Quotas................................................................................ 229 Implementing Quotas.......................................................... 230 Manually Configuring Quotas................................................ 230 Reference................................................................................... 232 x Fedora 7 Unleashed 11 Automating Tasks 233 Running Services at Bootup........................................................... 234 Beginning the Boot Loading Process....................................... 234 Loading the Linux Kernel...................................................... 235 System Services and Runlevels............................................... 236 Runlevel Definitions............................................................ 236 Booting into the Default Runlevel.......................................... 237 Booting to a Nondefault Runlevel with GRUB.......................... 240 UnderstandinginitScripts and the Final Stage of Initialization.. 241 Controlling Services at Boot with Administrative Tools.............. 242 Running Services Through xinetd.......................................... 245 Changing Runlevels............................................................. 246 Troubleshooting Runlevel Problems................................................ 247 Starting and Stopping Services Manually......................................... 248 Scheduling Tasks......................................................................... 249 Usingatandbatchto Schedule Tasks for Later......................... 249 Usingcronto Run Jobs Repeatedly......................................... 251 Basic Shell Control...................................................................... 254 The Shell Command Line..................................................... 255 Shell Pattern-Matching Support............................................. 256 Piping Data........................................................................ 257 Background Processing......................................................... 258 Reference................................................................................... 259 12 System-Monitoring Tools 261 Console-Based Monitoring............................................................ 261 Using the killCommand to Control Processes................................ 263 Using Priority Scheduling and Control............................................ 264 Displaying Free and Used Memory with free................................... 266 Disk Quotas........................................................................ 267 Graphical Process and System Management Tools............................. 267 KDE Process- and System-Monitoring Tools...................................... 270 Reference................................................................................... 270 13 Backing Up 271 Choosing a Backup Strategy.......................................................... 271 Why Data Loss Occurs.......................................................... 272 Assessing Your Backup Needs and Resources............................. 273 Evaluating Backup Strategies.................................................. 274 Making the Choice.............................................................. 277