Siêu thị PDFTải ngay đi em, trời tối mất

Thư viện tri thức trực tuyến

Kho tài liệu với 50,000+ tài liệu học thuật

© 2023 Siêu thị PDF - Kho tài liệu học thuật hàng đầu Việt Nam

Red hat Fedora Linux 2 all - in - one desk reference for dummies
PREMIUM
Số trang
891
Kích thước
17.3 MB
Định dạng
PDF
Lượt xem
1038

Red hat Fedora Linux 2 all - in - one desk reference for dummies

Nội dung xem thử

Mô tả chi tiết

by Naba Barkakati

Red Hat ®

Fedora™

Linux®

2

ALL-IN-ONE DESK REFERENCE

FOR

DUMmIES‰

by Naba Barkakati

Red Hat ®

Fedora™

Linux®

2

ALL-IN-ONE DESK REFERENCE

FOR

DUMmIES‰

Red Hat® Fedora™ Linux® 2 All-in-One Desk Reference For Dummies®

Published by

Wiley Publishing, Inc.

111 River Street

Hoboken, NJ 07030-5774

Copyright © 2004 by Wiley Publishing, Inc., Indianapolis, Indiana

Published by Wiley Publishing, Inc., Indianapolis, Indiana

Published simultaneously in Canada

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 permit￾ted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written

permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the

Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600.

Requests to the Publisher for permission should be addressed to the Legal Department, Wiley Publishing,

Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4355, e-mail:

[email protected].

Trademarks: Wiley, the Wiley Publishing logo, For Dummies, the Dummies Man logo, A Reference for the

Rest of Us!, The Dummies Way, Dummies Daily, The Fun and Easy Way, Dummies.com, 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. Red Hat and Fedora

are trademarks or registered trademarks of Red Hat, Inc. Linux is a registered trademark of Linus

Torvalds. All other trademarks are the property of their respective owners. Wiley Publishing, Inc., is not

associated with any product or vendor mentioned in this book.

LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND THE AUTHOR MAKE NO REPRESENTATIONS

OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF THE CONTENTS OF THIS WORK AND

SPECIFICALLY DISCLAIM ALL WARRANTIES, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A

PARTICULAR PURPOSE. NO WARRANTY MAY BE CREATED OR EXTENDED BY SALES OR PROMOTIONAL MATERI￾ALS. THE ADVICE AND STRATEGIES CONTAINED HEREIN MAY NOT BE SUITABLE FOR EVERY SITUATION. THIS

WORK IS SOLD WITH THE UNDERSTANDING THAT THE PUBLISHER IS NOT ENGAGED IN RENDERING LEGAL,

ACCOUNTING, OR OTHER PROFESSIONAL SERVICES. IF PROFESSIONAL ASSISTANCE IS REQUIRED, THE SERVICES

OF A COMPETENT PROFESSIONAL PERSON SHOULD BE SOUGHT. NEITHER THE PUBLISHER NOR THE AUTHOR

SHALL BE LIABLE FOR DAMAGES ARISING HEREFROM. THE FACT THAT AN ORGANIZATION OR WEBSITE IS

REFERRED TO IN THIS WORK AS A CITATION AND/OR A POTENTIAL SOURCE OF FURTHER INFORMATION DOES

NOT MEAN THAT THE AUTHOR OR THE PUBLISHER ENDORSES THE INFORMATION THE ORGANIZATION OR

WEBSITE MAY PROVIDE OR RECOMMENDATIONS IT MAY MAKE. FURTHER, READERS SHOULD BE AWARE THAT

INTERNET WEBSITES 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 or to obtain technical support, please con￾tact our Customer Care Department within the U.S. at 800-762-2974, outside the U.S. at 317-572-3993, or

fax 317-572-4002.

Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may

not be available in electronic books.

Library of Congress Control Number is available from the publisher.

ISBN: 0-7645-6793-4

Manufactured in the United States of America

10 9 8 7 6 5 4 3 2 1

1O/SR/QX/QU/IN

About the Author

Naba Barkakati is an electrical engineer and a successful computer-book

author who has experience in a wide variety of systems, ranging from MS-DOS

and Windows to UNIX and Linux. He bought his first personal computer — an

IBM PC-AT — in 1984 after graduating with a PhD in electrical engineering from

the University of Maryland at College Park. While pursuing a full-time career in

engineering, Naba dreamed of writing software for the emerging PC software

market. As luck would have it, instead of building a software empire like

Microsoft, he ended up writing successful computer books. Currently, Naba is

a Senior Level Technologist at the Center for Technology and Engineering in

the U.S. General Accounting Office.

Over the past 15 years, Naba has written over 25 computer books on a number

of topics ranging from Windows programming with C++ to Linux. He has

authored several bestselling titles, such as The Waite Group’s Turbo C++ Bible,

Object-Oriented Programming in C++, X Window System Programming, Visual

C++ Developer’s Guide, Borland C++ 4 Developer’s Guide, and Linux Secrets. His

books have been translated into many languages, including Spanish, French,

Polish, Greek, Italian, Chinese, Japanese, and Korean. Naba’s most recent book

is Red Hat Linux 9 Professional Secrets, also published by Wiley.

Naba lives in North Potomac, Maryland, with his wife Leha, and their chil￾dren, Ivy, Emily, and Ashley.

Dedication

I would like to dedicate this book to my wife Leha, and daughters Ivy, Emily,

and Ashley.

Author’s Acknowledgments

I am grateful to Terri Varveris for getting me started on this book — a set of

nine quick reference guides on all aspects of Red Hat Linux. As the project

editor, Linda Morris guided me through the manuscript-submission process

and kept everything moving. I appreciate the guidance and support that Terri

and Linda gave me during this project.

I would like to thank Jason Luster for reviewing the manuscript for technical

accuracy and providing many useful suggestions for improving the book’s

content.

Thanks to everyone at Wiley Publishing for transforming my raw manuscript

into this well-edited and beautifully packaged book.

Of course, there would be no reason for this book if it were not for Linux. For

this, we have Linus Torvalds and the legions of Linux developers around the

world to thank. Thanks to Red Hat for providing beta copies of Red Hat Linux

and the publisher’s edition CDs that are bundled with this book.

Finally, and as always, my greatest thanks go to my wife, Leha, and our

daughters, Ivy, Emily, and Ashley — it is their love and support that keeps me

going. Thanks for being there!

Publisher’s Acknowledgments

We’re proud of this book; please send us your comments through our online registration form

located at www.dummies.com/register/.

Some of the people who helped bring this book to market include the following:

Acquisitions, Editorial, and

Media Development

Project Editor: Linda Morris

Acquisitions Editor: Terri Varveris

Copy Editor: Rebecca Senninger

Technical Editor: Jason Luster

Editorial Manager: Leah Cameron

Permissions Editor: Laura Moss

Media Development Specialist: Travis Silvers

Media Development Manager:

Laura VanWinkle

Media Development Supervisor:

Richard Graves

Editorial Assistant: Amanda Foxworth

Cartoons: Rich Tennant, www.the5thwave.com

Composition

Project Coordinator: Courtney MacIntyre

Layout and Graphics: Amanda Carter,

Andrea Dahl, Lauren Goddard,

Denny Hager, Joyce Haughey,

Stephanie D. Jumper, Michael Kruzil,

Jacque Schneider

Proofreaders: Carl William Pierce,

Sossity Smith, Brian H. Walls

Indexer: Lynnzee Elze

Publishing and Editorial for Technology Dummies

Richard Swadley, Vice President and Executive Group Publisher

Andy Cummings, Vice President and Publisher

Mary C. Corder, Editorial Director

Publishing for Consumer Dummies

Diane Graves Steele, Vice President and Publisher

Joyce Pepple, Acquisitions Director

Composition Services

Gerry Fahey, Vice President of Production Services

Debbie Stailey, Director of Composition Services

Contents at a Glance

Introduction ................................................................1

Book I: Fedora Basics ...................................................7

Chapter 1: Introducing Fedora Core ...............................................................................9

Chapter 2: Installing Fedora Core ..................................................................................31

Chapter 3: Troubleshooting and Configuring Fedora Core ........................................57

Chapter 4: Trying Out Fedora Core ...............................................................................75

Chapter 5: Cool Fedora Core Install Projects ...............................................................99

Book II: Workstations and Applications .....................109

Chapter 1: Exploring the GUI Desktops ......................................................................111

Chapter 2: Learning the Shell .......................................................................................135

Chapter 3: Navigating the Linux File System .............................................................153

Chapter 4: Exploring Fedora Core Applications ........................................................169

Chapter 5: Using Text Editors ......................................................................................199

Book III: OpenOffice.org ..........................................211

Chapter 1: Writing with OpenOffice.org Writer .........................................................213

Chapter 2: Preparing Spreadsheets with OpenOffice.org Calc ................................237

Chapter 3: Making Presentations with OpenOffice.org Impress .............................249

Chapter 4: Drawing with OpenOffice.org Draw .........................................................261

Book IV: Networking ................................................269

Chapter 1: Connecting to the Internet ........................................................................271

Chapter 2: Setting Up a Local Area Network ..............................................................295

Chapter 3: Adding a Wireless Ethernet LAN ..............................................................307

Chapter 4: Managing the Network ...............................................................................319

Chapter 5: Cool Networking Projects ..........................................................................329

Book V: Internet ......................................................335

Chapter 1: Exchanging E-Mail and Instant Messages ................................................337

Chapter 2: Using the Web .............................................................................................351

Chapter 3: Reading Newsgroups .................................................................................371

Chapter 4: Transferring Files with FTP .......................................................................383

Book VI: Administration ...........................................391

Chapter 1: Performing Basic System Administration ...............................................393

Chapter 2: Managing Users ..........................................................................................425

Chapter 3: Managing the File System ..........................................................................437

Chapter 4: Managing Applications ..............................................................................461

Chapter 5: Managing Devices and Printers ................................................................479

Chapter 6: Upgrading and Customizing the Kernel ...................................................493

Book VII: Security ...................................................519

Chapter 1: Understanding Network and Host Security ............................................521

Chapter 2: Securing the Host .......................................................................................535

Chapter 3: Securing the Network ................................................................................557

Chapter 4: Performing Security Audits .......................................................................577

Book VIII: Internet Servers .......................................595

Chapter 1: Managing the Servers ................................................................................597

Chapter 2: Running the Apache Web Server ..............................................................615

Chapter 3: Setting Up the FTP Server .........................................................................639

Chapter 4: Serving Up Mail and News .........................................................................647

Chapter 5: Setting Up DNS ............................................................................................675

Chapter 6: Running Samba and NFS ............................................................................695

Book IX: Programming .............................................707

Chapter 1: Fedora Core Programming Essentials ......................................................709

Chapter 2: Programming in C .......................................................................................735

Chapter 3: Writing Shell Scripts ...................................................................................767

Chapter 4: Programming in Perl ..................................................................................779

Appendix: About the DVD .........................................807

Index .......................................................................811

Table of Contents

Introduction .................................................................1

About This Book ..............................................................................................1

Conventions Used in This Book ....................................................................2

What You Don’t Have to Read .......................................................................2

Who Are You? ..................................................................................................3

How This Book Is Organized ..........................................................................3

What’s on the DVD? ........................................................................................4

Icons Used in This Book .................................................................................5

Where to Go from Here ...................................................................................5

Book I: Fedora Basics ....................................................7

Chapter 1: Introducing Fedora Core . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9

What Is Fedora Core? ......................................................................................9

Operating systems and Linux ..............................................................9

Linux distributions ..............................................................................11

Transitioning to the Fedora Project ..................................................11

Making sense of version numbers .....................................................12

Under the hood in Linux kernel 2.6 ...................................................13

What Fedora Core Includes ..........................................................................16

GNU software .......................................................................................16

GUIs and applications .........................................................................19

Networks ..............................................................................................20

Internet servers ...................................................................................21

Software development ........................................................................22

Online documentation ........................................................................23

What Fedora Core Helps You Manage ........................................................25

Disks, CD-ROMs, and DVD-ROMs ......................................................25

Peripheral devices ...............................................................................26

File systems and sharing ....................................................................27

Network ................................................................................................27

How Do I Get Started? ...................................................................................28

Install .....................................................................................................28

Configure ..............................................................................................28

Explore ..................................................................................................29

Learn .....................................................................................................29

x Red Hat Fedora Linux 2 All-in-One Desk Reference For Dummies

Chapter 2: Installing Fedora Core . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31

Following the Installation Steps ..................................................................31

Checking Your PC’s Hardware .....................................................................33

Setting Aside Space for Fedora Core ..........................................................34

Defragmenting your hard disk ...........................................................34

Resizing your hard disk partition ......................................................36

Starting the Fedora Core Installation .........................................................39

Selecting Keyboard, Mouse, and Installation Type ...................................40

Partitioning the Disk for Fedora Core .........................................................43

Setting Up Key System Parameters .............................................................47

Installing the boot loader ...................................................................47

Configuring the network .....................................................................48

Configuring the firewall and SELinux ................................................50

Selecting languages to support .........................................................51

Setting the time zone ..........................................................................51

Setting the root password ..................................................................52

Selecting and Installing the Package Groups .............................................53

Chapter 3: Troubleshooting and Configuring Fedora Core . . . . . . . . .57

Using Text Mode Installation .......................................................................58

Using the linux noprobe Command ............................................................58

Troubleshooting X ........................................................................................59

Resolving Other Installation Problems .......................................................61

The fatal signal 11 error ......................................................................61

Using kernel boot commands ............................................................62

Setting Up Printers ........................................................................................64

Turning On Sound .........................................................................................68

Adding User Accounts ..................................................................................69

Managing DVDs and CD-ROMs ....................................................................71

Installing RPM Packages ...............................................................................72

Chapter 4: Trying Out Fedora Core . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .75

Booting Fedora Core .....................................................................................75

Exploring GUI Desktops ................................................................................81

GNOME .................................................................................................81

KDE ........................................................................................................88

Playing with the Shell ...................................................................................94

Starting the Bash shell ........................................................................95

Understanding shell commands ........................................................95

Trying a few Linux commands ...........................................................96

Shutting Down ...............................................................................................98

Chapter 5: Cool Fedora Core Install Projects . . . . . . . . . . . . . . . . . . . .99

Joining the BitTorrent ...................................................................................99

Things you need ................................................................................100

Steps to follow ...................................................................................100

Table of Contents xi

Burning Fedora Core CDs ...........................................................................103

Things you need ................................................................................103

Steps to follow ...................................................................................103

Preparing a Fedora Core DVD ....................................................................104

Things you need ................................................................................104

Steps to follow ...................................................................................105

Doing an FTP Install ....................................................................................107

Things you need ................................................................................107

Steps to follow ...................................................................................107

Book II: Workstations and Applications .....................109

Chapter 1: Exploring the GUI Desktops . . . . . . . . . . . . . . . . . . . . . . . .111

Learning the Common Features of the GUIs ............................................111

Desktop pop-up menus .....................................................................112

Icon pop-up menus ............................................................................113

The panel ............................................................................................114

The Main Menu ..................................................................................116

Exploring GNOME .......................................................................................119

Using the Nautilus shell ....................................................................120

Configuring GNOME ..........................................................................124

Exploring KDE ..............................................................................................127

Using Konqueror ................................................................................128

Configuring KDE ................................................................................132

Chapter 2: Learning the Shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .135

Opening Terminal Windows and Virtual Consoles .................................135

Using the Bash Shell ...................................................................................136

Learning the syntax of shell commands .........................................136

Combining shell commands .............................................................138

Controlling command input and output .........................................138

Typing less with automatic command completion .......................140

Going wild with asterisks and question marks ..............................140

Repeating previously typed commands .........................................142

Learning Linux Commands ........................................................................142

Becoming root (superuser) ..............................................................146

Managing processes ..........................................................................147

Working with date and time .............................................................147

Processing files ..................................................................................148

Writing Shell Scripts ...................................................................................151

Chapter 3: Navigating the Linux File System . . . . . . . . . . . . . . . . . . . .153

Understanding the Linux File System .......................................................153

Navigating the File System with Linux Commands .................................157

Commands for directory navigation ...............................................158

Commands for directory listings and permissions .......................159

xii Red Hat Fedora Linux 2 All-in-One Desk Reference For Dummies

Commands for changing permissions and ownerships ...............162

Commands for working with files ....................................................163

Commands for working with directories ........................................164

Commands for finding files ..............................................................165

Commands for mounting and unmounting ....................................166

Commands for checking disk-space usage ....................................167

Chapter 4: Exploring Fedora Core Applications . . . . . . . . . . . . . . . . .169

Taking Stock of the Fedora Core Applications ........................................169

Office Applications and Tools ...................................................................171

Calculators .........................................................................................172

Commercially available office applications for Linux ...................173

aspell spelling checker .....................................................................175

Databases .....................................................................................................176

Adding a database user ....................................................................177

Reviewing the steps to build the database ....................................178

Designing the database .....................................................................179

Creating an empty database ............................................................180

Using the PostgreSQL interactive terminal ....................................180

Defining a table ..................................................................................181

Inserting records into a table ...........................................................182

Querying the database .....................................................................182

Multimedia Applications ............................................................................183

Using a digital camera .......................................................................183

Playing audio CDs ..............................................................................186

Playing sound files ............................................................................187

Burning a CD ......................................................................................188

Graphics and Imaging .................................................................................193

The GIMP ............................................................................................194

Gnome Ghostview .............................................................................196

Chapter 5: Using Text Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .199

Using GUI Text Editors ................................................................................199

Text Editing with ed and vi ........................................................................200

Using ed ..............................................................................................201

Using vi ...............................................................................................204

Book III: OpenOffice.org ...........................................211

Chapter 1: Writing with OpenOffice.org Writer . . . . . . . . . . . . . . . . .213

Getting Documents from Others ...............................................................214

Taking Stock of OpenOffice.org Writer .....................................................215

Tải ngay đi em, còn do dự, trời tối mất!