1. Trang chủ
  2. » Công Nghệ Thông Tin

Fedora 10 and Red Hat Enterprise Linux Bible potx

1,1K 2K 1
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Fedora 10 and Red Hat Enterprise Linux Bible
Tác giả Christopher Negus, Eric Foster-Johnson
Trường học Wiley
Chuyên ngành Operating Systems / Linux
Thể loại Book
Định dạng
Số trang 1.132
Dung lượng 16,49 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

• Over 4GB of official Fedora software • Installable Fedora 10 desktop system Value-Packed DVD and CD-ROM Official Fedora 10 install DVD Official Fedora 10 KDE desktop live/install CD Sy

Trang 1

Christopher Negus and Eric Foster-Johnson

Publish Web pages

and documents

Launch file, printer,

Web, and login services

Play music, video,

and games

Negus Foster-Johnson

The book you need to succeed!

• Over 4GB of official Fedora software • Installable Fedora 10 desktop system

Value-Packed DVD and CD-ROM

Official Fedora 10 install DVD Official Fedora 10 KDE desktop live/install CD

System Requirements: Please see the Preface and Appendix A for details and complete system requirements.

New in Fedora 10:

• Improved printing support

• New, faster graphical startup

• Time-based PulseAudio sound system features

• Major RPM package management upgrade

• One Laptop Per Child (Sugar) desktop option

• Enhanced Webcam support

Shelving Category:

COMPUTERS/Operating Systems/

Linux Reader Level:

When the free software world improves its offerings, you

can be among the first to try them using Fedora As

the basis for the popular enterprise-quality Red Hat

Enterprise Linux, Fedora can be your stepping stone

to a lucrative career with Linux Install, configure, and

use Fedora as anything from a desktop to an Internet

server Use this book as a guide to installing and running

Fedora from the included DVD and live CD.

Play games on the desktop or against others on the Internet

Create documents to publish

in hard copy or on theWeb

Configure and start services

to run your own Web server

Set up Fedora or Red Hat Enterprise Linux to:

• Try new or improved features such as FirstAidKit, ext4 file systems,

fast start-up, and connection sharing

• Navigate your computer with GNOME®, KDE®, Xfce, or Online Desktops

• Manage and use documents, spreadsheets, presentations, music, and images

• Connect easily to your network with NetworkManager

• Draw from massive online Fedora and third-party software repositories

• Build an Internet server with e-mail, Web, DNS, FTP, and database services

Trang 2

Follow these steps to install Fedora 10 from the CD or DVD included with this book (See Chapter 2.) For non-x86 PCs, download PPC or x86_64 Fedora software from http://fedoraproject.org/get-fedora.html.

1 Get Media: Insert the Fedora 10 CD or DVD into your computer’s drive.

3 Start Install: To start the install:

• For the DVD, press Enter to begin the installation.

• For the live CD, press Enter to boot the live CD

After the desktop appears, select the install icon from the desktop

The complete CD installs to hard disk.

4 Media Check: For the DVD, select media check to be sure it is not damaged or corrupted.

5 Language Selection: Choose the installation language (you can add other languages later).

6 Keyboard Configuration: Choose your keyboard type.

7 Install or Upgrade: With an earlier Fedora version installed, you can choose Upgrade (upgrade

your system without losing data) Otherwise, continue with a new installation.

8 Network Configuration: Set up your LAN connection (not dial-up) You typically select DHCP to have

your network addresses assigned automatically Or, you can manually enter your computer’s address information.

9 Time Zone Selection: Identify the time zone in which you are located.

10 Set Root Password: Add the root user account password.

11 Disk Partitioning Setup: Choose to install Fedora on existing Linux partitions, existing free space, or

the entire hard disk (erasing everything) See Chapter 5 before proceeding,

if you are not sure which option to choose.

12 Boot Loader Configuration: Add the GRUB boot manager to control the boot process Install the boot

loader to your hard disk’s master boot record if no other operating system

is installed.

13 Choose Software: Select one or more of the preset install classes, including Office and Productivity,

Software Development, and Web Server Select “Customize now” to go through the software packages in more detail Add other software repositories to install packages outside Fedora.

14 Installation Categories: If you selected “Customize now,” go through each category to select install

groups Then select the Optional packages button to add or subtract ages from each group.

15 About to Install: To this point, you can quit the install process without having written anything

to disk When you select Next, the disk is formatted (as you chose) and selected packages are installed

When installation is done, remove the Fedora DVD or CD and click Exit to reboot your computer During the first boot, the Fedora Setup Agent runs to configure some basic settings After that, log in and begin using Fedora!

Fedora 10 Linux from CD or DVD

Using the DVD and CD that come with this book, you have a range of options for

starting out with Fedora 10 Linux Everything you need to install 4GB of Fedora 10

software is included on the DVD Use the CD to try out a live version of Fedora before

installing it Then install the contents of that CD to your hard drive when you are ready.

Fedora 10 Software Repository on DVD!

This DVD contains the Fedora 10 installer and software repository, with about 4GB of compressed software.

Fedora Live CD!

The Fedora 10 KDE Live CD included with this book lets you:

• Try a Fedora 10 desktop system before installing it Insert the CD, reboot, and press Enter

From the full-featured Fedora KDE desktop, you can try games, office applications, system tools, and other features.

• Install a Fedora 10 desktop system to hard disk The contents of the live CD can be installed

to your hard disk to give you a permanent Fedora installation.

Huge set of software development tools!

Dozens of server and admin packages too!

Authoring &

Publishing

Editors

Create and layout documents

Edit code and text files

Interactive learning games

Math and science apps

Card, shooter, and thinking games Email, browser and messaging

Image, animation and camera apps

Document, spreadsheet and drawing apps

Music, video

Text-based Web, email, and file xfer

Text-based Internet

Graphical Internet

Choose the software you want from these application groups

www.it-ebooks.info

Trang 3

of ten fun and useful things to do with Fedora

1 Set Up a Personal Online Desktop: Use the GNOME Online Desktop to connect your

desktop to your friends, multimedia content, and online applications from Google, Facebook, Yahoo!, and others Click right on the desktop to immediately get you all your favorite content (See Chapter 3.)

2 Launch the new KDE 4 Plasma Desktop: The next generation KDE desktop lets you

add widgets, called plasmoids, to multiple places on your desktop Find files, Web pages

or other items quickly with new search tools (See Chapter 3.)

3 Play Commercial Audio/Video: Licensing restrictions keep many popular codecs from

inclusion with Fedora Using third-party repositories with Fedora, you grab the codecs you need to play Windows Media (Audio, Video and MMS), MP3 audio, MPEG-2 and MPEG-4 video decoding, and others (See Chapter 8.)

4 Manage music collections: Launch Rhythmbox to gather, organize, and play music from

your hard disk, CDs, or network file systems You can even select from thousands of free songs from Magnatune and Jamendo online music services (See Chapter 8.)

5 Publish your ideas::Choose from dozens of publishing tools to create documents

(OpenOffice.org Writer), presentations (OpenOffice.org Impress) hard-copy page layouts (Scribus), and vector graphics (Inkscape) Then publish your work on paper or the Web (See Chapter 6.)

6 Share an Internet connection: Fedora can be set up as a router and a firewall With a

home or small office LAN set-up, you can use Fedora to share an Internet connection among multiple Linux, Windows, or Mac systems Then set up a firewall in Fedora to protect your LAN from intruders (See Chapters 14, 15, and 16.)

7 Play free games: As always, Fedora includes dozens of simple card games and board

games The Fedora repository, includes a ton of games, including fun first-person shooter games such as Doom, strategy games such as fantasy game Wesnoth, and online battle games such as BZFlag (See Chapter 7.)

8 Run Windows applications: By adding the wine software packages, you can run many

Windows applications right from a Fedora desktop (See Chapter 5.)

9 Create an Internet server: Learn to configure a Web server (Chapter 21), FTP server

(Chapter 20) and a mail server (Chapter 19) Then gather that knowledge to create your own public Internet server (Chapter 25) Your server can run from your home Internet connection

10 Share over the Internet: Share your personal videos, software, or other content with

friends over the Internet, using Bittorrent swarming network transfer software While you’re at it, instant message your thoughts using Pidgin, video-conference your looks (Ekiga), and e-mail your party invitations (Evolution) (See Chapter 7.)

Trang 4

www.it-ebooks.info

Trang 5

Fedora 10

and Red Hat ® Enterprise Linux ®

Bible

Trang 6

www.it-ebooks.info

Trang 7

Fedora 10

and Red Hat ® Enterprise Linux ®

Bible

Christopher Negus Eric Foster-Johnson

Wiley Publishing, Inc

Trang 8

Wiley Publishing, Inc

10475 Crosspoint Boulevard

Indianapolis, IN 46256

www.wiley.com

Copyright © 2009 by Wiley Publishing, Inc All rights reserved

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 permitted 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) 750-4744 Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-

6008, 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

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 materials 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 contact our Customer Care Department within the U.S at (877) 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

Trademarks: Wiley, the Wiley Publishing 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 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 is not associated with any product or vendor mentioned in this book

Library of Congress Cataloging in Publication Data available upon request

ISBN: 978-0-470-41339-5

Printed in the United States of America

10 9 8 7 6 5 4 3 2 1

www.it-ebooks.info

Trang 9

–Christopher Negus

To Katya and Nalana

–Eric Foster-Johnson

Trang 11

Christopher Negus has been working with UNIX systems, the Internet, and (most recently)

Linux systems for more than two decades During that time, Chris worked at AT&T Bell Laboratories, UNIX System Laboratories, and Novell, helping to develop the UNIX operating system Features from many of the UNIX projects Chris worked on at AT&T have found their way into Red Hat Enterprise Linux, Fedora, and other Linux systems

Chris is the author of all editions of what started out as Red Hat Linux Bible, which because of

the name changes of Red Hat’s Linux projects has evolved into the book you are holding

Most recently, Chris co-authored four books in the Linux Toolbox series: Fedora Linux

Toolbox, Ubuntu Linux Toolbox, SUSE Linux Toolbox, and BSD UNIX Toolbox (Wiley

Publishing) Before that, Chris authored Linux Bible 2008 Edition and co-wrote Linux

Troubleshooting Bible and Linux Toys II for Wiley Publishing For Prentice Hall, Chris

authored Live Linux CDs and co-authored the Official Damn Small Linux Book, as part of the

Negus Live Linux Series

Today, Chris works as a Linux instructor for Red Hat, Inc and has achieved certification as a Red Hat Certified Engineer (RHCE)

At home, Chris enjoys spending time with his wife, Sheree, and his boys, Caleb and Seth His hobbies include soccer, singing, and exercising with Sheree

Eric Foster-Johnson is a veteran programmer who works daily with Linux, Unix, and

Windows and other operating systems By day, he writes enterprise Java software for

ObjectPartners, a Minnesota consulting firm He has authored and co-authored a number of Linux and Unix titles including Red Hat RPM Guide, Teach Yourself Linux, Teach Yourself Unix and Perl Modules

Trang 13

Mary Beth Wakefield

Vice President and

Johnna VanHoose Dinse

Media Development Project Manager

Trang 15

Project In particular, Paul Frields (Fedora Project leader), Max Spevack (outgoing Fedora Project leader) and Greg DeKoenigsberg (Fedora Community leader) deserve praise for their leadership in producing a consistently high-quality Linux distribution Special thanks to Pete Hnath (my new boss at Red Hat) for allowing me to complete my work on this book after hiring me to be an instructor at Red Hat

Eric Foster-Johnson came in while this edition was already underway and did the majority of the new content it includes I feel very fortunate that someone as skillful as Eric is now a major contributor to this book that I have put so much effort into in the past decade

At Wiley, I’d like to thank Jenny Watson, Colleen Hauser, and Laura Moss-Hollister for helping work out issues related to the publicity, media, and covers for this book Thanks to Sara Shlaer for her continued great editing and production work on this book, and for keeping

me on schedule so we could bring this book to you on time

Thanks to Daniel Scribner for shepherding the book through the final stages of production Thomas Blader and John Kennedy provided a thorough technical editing pass Thanks also to Margot Maley Hutchison and the others at Waterside Productions for bringing me this project Thanks, as always, to my dear family for helping me through this project

Finally, a special thanks goes to those of you who bought this and earlier editions of Red Hat

Linux Bible Go out and become a force for Linux in your work, home, and community If you

feel like expanding your Linux horizons, try some of these other books I’ve written:

• Linux Bible 2009 Edition — Contains 18 different bootable and installable Linux

distributions on DVD and CD, along with descriptions characterizing those and other popular and interesting Linux distributions

• Fedora Linux Toolbox with François Caen — Includes 1000+ command lines to help

Fedora, RHEL, and CentOS power users get the most out of Linux To try other similar

distributions, check out Ubuntu Linux Toolbox, SUSE Linux Toolbox and BSD UNIX

Toolbox by the same authors

• Linux Troubleshooting Bible with Thomas Weeks — Goes beyond this book to help

you safely deploy and troubleshoot Linux systems

• Linux Toys II — If you’re looking for something fun to do with Linux, this book

contains nine fun projects you can build with a PC and open source software

Chris Negus

Trang 17

Contents

Part I: Getting Started in Fedora and RHEL

Chapter 1: An Overview of Fedora and Red Hat Enterprise Linux 3

Introducing Fedora 10 and Red Hat Enterprise Linux 4

What Is Linux? 5

Linux’s Roots in UNIX 6

What Is an Operating System? 7

Common Linux Features 8

Primary Advantages of Linux 10

What Are Red Hat Enterprise Linux and Fedora? 11

Red Hat forms the Fedora Project 11

Red Hat shifts to Red Hat Enterprise Linux 14

Choosing between Fedora and Enterprise 14

Why Choose Fedora or Red Hat Enterprise Linux? 15

New Features in Fedora 10 17

Better Printing 17

FirstAidKit 18

OpenOffice.org 3 18

Faster Boot Times 18

K Desktop Environment (KDE) 4 18

PackageKit Software Management 18

Firefox 3 Web browser 19

Preupgrade 19

Ext4 file systems 19

Encrypted file systems 19

Identity management with freeIPA 19

NetworkManager 20

Getting custom Fedora spins 20

Creating your own spins 21

Firewall Configuration 21

The Culture of Free Software 21

Summary 22

Chapter 2: Installing Fedora 23

Understanding Fedora Installation Media 24

Using the Fedora 10 Live CD 24

Quick Installation 26

Detailed Installation Instructions 28

Installing Fedora 10 28

Choosing an installation method 29

Trang 18

Install or upgrade? 29

From DVD, network, or hard disk? 31

Choosing computer hardware 32

Installing Fedora on a Laptop 33

Preparing for installation using the live CD 34

Display hardware information 34

Test your hardware 36

Beginning the installation 37

Choosing Different Install Modes 39

Running Fedora Firstboot 44

Enabling Authentication 45

Going forward after installation 46

Special Installation Procedures 47

Alternatives for starting installation 47

Booting installation from hard disk 47

Booting installation from a USB device 49

Booting installation using PXE 49

Installing from other media 50

Beginning installation 50

Setting up an HTTP, FTP, or NFS install server 51

Starting a VNC install 53

Performing a kickstart installation 54

Creating the kickstart file 54

Installing the kickstart file 59

Booting a kickstart installation 59

Special Installation Topics 60

Setting up to dual-boot Linux and Windows 60

Resizing your Windows partitions 60

Using Windows partitions from Linux 64

Partitioning your disks 66

Partitioning with Disk Setup during installation 67

Partitioning with fdisk 70

Tips for creating partitions 72

Using the GRUB boot loader 74

Temporarily changing boot options 75

Permanently changing boot options 77

Adding a new GRUB boot image 78

Troubleshooting Installation 79

Spinning Your Own Fedora Install or Live Media 81

Summary 82

Chapter 3: Getting Started with the Desktop 83

Logging in to Fedora or RHEL 84

Why Do I Need a User Login? 86

Getting Familiar with the Desktop 86

www.it-ebooks.info

Trang 19

Touring your desktop 87

Tips for configuring your desktop 94

Using the GNOME Desktop 95

Using the Metacity window manager 97

Using the GNOME panels 99

Use the Applications and System menus 100

Adding an applet 101

Adding another panel 102

Adding an application launcher 102

Adding a drawer 103

Changing panel properties 103

Using the Nautilus file manager 104

Changing GNOME preferences 107

Managing removable media 108

Trying other GNOME applications 109

Taking notes with Tomboy 109

Checking Your Network from GNOME 110

Switching to another user 110

Exiting GNOME 111

Setting Up an Online Desktop 112

Switching Desktop Environments 115

Using the KDE Desktop 116

New Features in KDE 4.1 116

Starting with KDE 117

KDE desktop basics 118

Getting around the desktop 119

Managing files with Dolphin and Konqueror File Managers 120

Working with files 122

Searching for files with Dolphin and kfind 123

Creating new files and folders 124

Using the Konqueror browser features 125

Configuring Konqueror and Dolphin options 126

Managing windows 128

Using the taskbar 129

Moving windows 129

Resizing windows 129

Pinning windows on top or bottom 130

Using virtual desktops 130

Configuring the desktop 130

Adding widgets 131

Adding widgets to the panel 132

Adding widgets to the desktop 132

Running 3D Accelerated Desktop Effects 132

Using the Xfce Desktop Environment 135

Troubleshooting Your Desktop 136

Trang 20

GUI doesn’t work at start-up 137

What Happens During Desktop Startup? 137

Tuning your video card and monitor 138

Running the Display Settings window 138

Understanding the xorg.conf file 139

Configuring video cards for gaming 140

Getting more information 140

Summary 141

Chapter 4: Using Linux Commands 143

The Shell Interface 143

Checking your login session 144

Checking directories and permissions 145

Checking system activity 147

Exiting the shell 148

Understanding the Shell 148

Using the Shell in Linux 149

Locating commands 150

Getting Help with Using the Shell 151

Rerunning commands 153

Command-line editing 153

Command-line completion 155

Command-line recall 156

Connecting and expanding commands 158

Piping commands 158

Sequential commands 159

Background commands 159

Expanding commands 159

Expanding arithmetic expressions 160

Expanding variables 160

Using shell environment variables 160

Common shell environment variables 161

Setting your own environment variables 162

Managing background and foreground processes 164

Starting background processes 164

Moving commands to the foreground and background 165

Configuring your shell 166

Setting your prompt 167

Adding environment variables 168

Adding aliases 169

Working with the Linux File System 169

Linux File Systems Versus Windows-Based File Systems 171

Creating files and directories 172

Identifying Directories 173

Using metacharacters and operators 173

www.it-ebooks.info

Trang 21

Using file-matching metacharacters 173

Using file-redirection metacharacters 175

Understanding file permissions 175

Moving, copying, and deleting files 177

Using the vi Text Editor 178

Starting with vi 178

Exploring Other Text Editors 179

Moving around the file 181

Searching for text 182

Using numbers with commands 183

Summary 183

Part II: Using Fedora and RHEL Chapter 5: Accessing and Running Applications 187

Getting and Installing Software Packages 188

Downloading and installing applications with yum 190

Configuring yum (/etc/yum.conf) 191

Adding yum repositories (/etc/yum.repos.d/) 192

Running yum to download and install RPMs 194

Using yum to install packages locally 195

Using yum for listing packages 196

Using yum-utils package 197

Getting Fedora and RHEL software updates 197

Getting alerted to available updates 198

Getting manual updates with yum 198

Managing RPM Packages 199

Using the PackageKit Add/Remove window 199

Using the rpm command 200

Verifying rpm package integrity 201

Installing with rpm 202

Upgrading packages with rpm 205

Freshening packages with rpm 205

Removing packages with rpm 206

Querying packages with rpm 207

Verifying installed packages with rpm 210

Using Software in Different Formats 211

Understanding software package names and formats 211

Using Binary RPMs versus Building from Source 212

Using different archive and document formats 213

Building and installing from source code 215

Installing software in SRPM format 216

Installing software in tar.gz or tar.bz2 formats 216

Using Fedora or RHEL to Run Applications 218

Finding common desktop applications in Linux 219

Trang 22

Investigating your desktop 221Starting applications from a menu 222Starting applications from a Run Application window 222Starting applications from a Terminal window 223Running remote X applications 225Traditional method to run remote X applications 225Launching a remote X application 226Using SSH to run remote X applications 228Running Microsoft Windows, DOS, and Macintosh Applications 229Running DOS applications 231Using mtools 231Using DOSBox 233Running Microsoft Windows applications in Linux 233Running Windows Applications in WINE 235Assigning drive letters 236Installing applications in WINE 237Launching applications 237Tuning and configuring WINE 237Finding more Windows applications for WINE 238Running Applications in Virtual Environments 239Running applications virtually with Xen 239Before installing Xen 240Installing Xen 240Installing a guest operating system 241Running applications virtually with KVM and QEMU 244Summary 245

Chapter 6: Publishing with Fedora and RHEL 247

Desktop Publishing in Linux 248Using Text Editors and Notepads 248Using Word Processors 248Using OpenOffice.org 249Other Word Processors 252Using Traditional Linux Publishing Tools 255Creating Documents in Groff or LaTeX 256Text processing with Groff 256Formatting and printing documents with Groff 257Creating a man page with Groff 258Text processing with TeX/LaTeX 259Creating and formatting a LaTeX document 260Converting documents 261Creating DocBook documents 263Understanding SGML and XML 263Understanding DocBook 263Creating DocBook documents 264

www.it-ebooks.info

Trang 23

Converting DocBook documents 266Displaying PDF Files with Adobe Acrobat Reader 266Doing Page Layout with Scribus 268Working with Graphics 270Manipulating images with GIMP 270Taking screen captures 271Creating vector graphic images with Inkscape 272Using Scanners Driven by SANE 274Web Publishing 275Summary 276

Chapter 7: Gaming in Fedora and RHEL 277

Jumping into Linux Gaming 278Basic Linux Gaming Information 280Where to get information on Linux gaming 280Choosing a video card for gaming 281Running Open Source Linux Games 283GNOME games 284KDE games 284Adding more games from Fedora repository 286Chess games 289Freeciv 290Extreme Tuxracer 295Commercial Linux Games 296Getting Started with commercial games in Linux 297Playing commercial Linux games 297

id Software Games 298Quake III Arena 298Return to Castle Wolfenstein 299Gaming with Cedega 300Loki Software game demos 302Civilization: Call to Power 303Myth II: Soulblighter 304Heretic II 305Neverwinter Nights 305Summary 305

Chapter 8: Music, Video, and Images in Linux 307

Understanding Multimedia and Legal Issues in Linux 307Extending Freedom to Codecs 308Listening to Music in Linux 309Configuring a sound card 311Sound card features 311Detecting your sound card driver 313

Trang 24

Adjusting sound levels 314Setting your sound card to record 317Choosing audio players 317Automatically playing CDs 318Troubleshooting Your CD-ROM 319Playing and managing music with Rhythmbox 319Playing music with XMMS Audio Player 322Using the Equalizer 324Using the Playlist Editor 325Using ogg123, mpg321, and play command-line players 326Using MIDI audio players 326Converting audio files with SoX 327Extracting and encoding music 329Extracting music CDs with Sound Juicer 330Extracting and encoding music CDs from commands 331Creating your own music CDs 332Creating audio CDs with cdrecord 332Creating audio and data CDs with K3b 333Creating CD labels with cdlabelgen 336Viewing TV and Webcams 337Watching TV with TVtime 337Getting a supported TV card 337Starting Tvtime 339Selecting channels in TVtime 339Video conferencing and VOIP with Ekiga 340Getting a supported Webcam 340Running Ekiga 342Taking Webcam videos and snapshots with Cheese 343Playing Video 344Examining laws affecting video and Linux 345Understanding video content types 346Converting Video to Theora 347Watching video with Xine 347Using Xine 349Creating playlists with Xine 350Xine tips 350Using Totem movie player 352Using a Digital Camera 353Displaying images in gThumb 353Using your camera as a storage device 355Summary 356

Chapter 9: Using the Internet and the Web 357

Overview of Internet Applications and Commands 357Browsing the Web 360

www.it-ebooks.info

Trang 25

Understanding Web browsing 361Uniform Resource Locators 361Web pages 363Browsing the Web with Firefox 365Setting up Firefox 369Setting Navigator preferences 369Extending Firefox 371Changing Firefox themes 375Securing Firefox 375Tips for using Firefox 376Using text-based Web browsers 377Communicating with E-mail 378E-mail basics 380Using Evolution e-mail 381Setting Evolution preferences 382Receiving, composing, and sending e-mail 383Thunderbird mail client 384Text-based mail programs 385Mail readers and managers 386Mutt mail reader 386Pine mail reader 386Mail reader 387Participating in Newsgroups 387Instant Messaging with Pidgin 388Sharing Files with BitTorrent 389Using Remote Login, Copy, and Execution 390Using telnet for remote login 391Copying files with FTP 392Using the ftp command 392Using the ncftp command 395Using the gFTP window 397Getting files with wget 399Downloading a single file 399Downloading a file with user name and password 400Downloading a whole Web site 400Continuing a download 401Using ssh for remote login/remote execution 402Using scp for remote file copy 402Using the “r” commands: rlogin, rcp, and rsh 403Summary 403

Part III: Administering Fedora and RHEL

Chapter 10: Understanding System Administration 407

Using the root user account 408

Trang 26

Becoming Super User (The su Command) 408Learning about Administrative GUI Tools, Commands, Configuration Files, and Log Files 410Using graphical administration tools 410Becoming Super User in X 411Administrative commands 415Administrative configuration files 416Administrative log files 420Using other administrative logins 420Understanding administrative logins 421Using sudo for assigning administrative privilege 421Administering Your Linux System 423Configuring Hardware 423Checking your hardware 424Managing Hardware with HAL 424Reconfiguring hardware with kudzu 425Configuring modules 426Listing loaded modules 427Loading modules 428Removing modules 428Managing File Systems and Disk Space 429Mounting file systems 432Supported file systems 432Using the fstab file to define mountable file systems 435Using the mount command to mount file systems 437Using the umount command to unmount a file system 439Using the mkfs command to create a file system 440Adding a hard disk 441Using RAID disks 443Checking system space 446Checking Disk Space with Disk Usage Analyzer 446Displaying system space with df 446Checking disk usage with du 447Finding disk consumption with find 448Monitoring System Performance 448Watch computer usage with System Monitor 448Monitoring CPU usage with top 450Monitoring power usage on laptop computers 450Using the Power Manager applet 451Using apm to enter suspend mode 452Using acpi_listen to monitor ACPI events 452Fixing Your System with the FirstAidKit 453Choosing Software Alternatives 453Selecting Java alternatives 453Selecting mail and printing alternatives 454Using mail alternatives 455

www.it-ebooks.info

Trang 27

Using Security Enhanced Linux 455Understanding Security Enhanced Linux 456Types and roles in SELinux 456Users in SELinux 457Policies in SELinux 457Tools in SELinux 458Using SELinux in Fedora and RHEL 458Getting SELinux 459Checking whether SELinux is on 459Checking SELinux status 460Learning More about SELinux 462Summary 462

Chapter 11: Setting Up and Supporting Users 463

Creating User Accounts 463Adding users with useradd 464Adding users with User Manager 468Setting User Defaults 471Supplying initial login scripts 473Supplying initial bashrc and bash_profile files 474Supplying an initial tcshrc file 475Configuring system-wide shell options 475Configuring system-wide bash options 475Configuring system-wide tcsh options 476Setting system profiles 476Adding user accounts to servers 477Creating Portable Desktops 478Providing Support to Users 479Creating a technical support mailbox 480Resetting a user’s password 480Modifying Accounts 481Modifying user accounts with usermod 481Modifying user accounts with User Manager 483Deleting User Accounts 484Deleting user accounts with userdel 484Deleting user accounts with User Manager 486Checking Disk Quotas 486Using quota to check disk usage 486Editing the /etc/fstab file 487Creating quota files 487Creating a quota startup script 488Turn on the quota startup script 489Creating quota rules 489Updating quota settings 490Checking quotas 490

Trang 28

Using du to check disk use 491Removing temp files automatically 491Sending Mail to All Users 492Summary 493

Chapter 12: Automating System Tasks 495

Understanding Shell Scripts 495Executing and debugging shell scripts 496Understanding shell variables 497Special shell variables 498Parameter expansion in bash 498Performing arithmetic in shell scripts 500Using programming constructs in shell scripts 500The “if…then” statements 500The case command 503The “for do” loop 504The “while do” and “until do” loops 505Some useful external programs 506The general regular expression parser (grep) 506Remove sections of lines of text (cut) 506Translate or delete characters (tr) 506The Stream Editor (sed) 507Trying some simple shell scripts 507

A simple telephone list 508

A simple backup script 509System Initialization 509Starting init 510The inittab file 510System Startup and Shutdown 514Starting run-level scripts 515Understanding run-level scripts 515Understanding what startup scripts do 518Changing run-level script behavior 520Reorganizing or removing run-level scripts 521Adding run-level scripts 523Managing xinetd services 524Manipulating run levels 525Determining the current run level 525Changing to a shutdown run level 526Scheduling System Tasks 526Using at.allow and at.deny 526Specifying when jobs are run 526Submitting scheduled jobs 527Viewing scheduled jobs 528Deleting scheduled jobs 528

www.it-ebooks.info

Trang 29

Using the batch command 529Using the cron facility 529Modifying scheduled tasks with crontab 531Understanding cron files 532Summary 533

Chapter 13: Backing Up and Restoring Files 535

Making a Simple Backup Archive 536Doing a Simple Backup with rsync 537Backing up files locally 538Backing up files remotely 539Choosing Backup Tools 540Selecting a Backup Strategy 541Full backup 541Incremental backup 541Disk mirroring 541Network backup 542Selecting a Backup Medium 542Magnetic tape 543Using ftape tools for magnetic tape 544Testing the magnetic tape drive 545Writable CD drives 545Getting cdrecord for writable CDs 545Writing to CDs 545Writable DVD drives 549Writing CD or DVDs with growisofs 551Backing Up to a Hard Drive 551Backing Up Files with dump 552Creating a backup with dump 553Understanding dump levels 555Automating Backups with cron 556Restoring Backed-Up Files 558Restoring an entire file system 559Recovering individual files 560Configuring Amanda for Network Backups 562Creating Amanda directories 563Creating the amanda.conf file 564Creating a disklist file 566Adding Amanda network services 566

On the amanda server 567

On each amanda client 567Performing an Amanda backup 567Using the pax Archiving Tool 568Summary 571

Trang 30

Chapter 14: Computer Security Issues 573

Linux Security Checklist 573Using Password Protection 576Choosing good passwords 577Using a shadow password file 577Breaking encrypted passwords 578Checking for the shadow password file 578Securing Linux with iptables Firewalls 580Using the Firewall Configuration window 580Configuring an iptables firewall 582Turning on iptables 582Creating iptables firewall rules 584Understanding iptables 590Enhancing your iptables firewall 593Controlling Access to Services with TCP Wrappers 594Checking Log Files 597Understanding the rsyslogd service 597Redirecting logs to a loghost with rsyslogd 597Understanding the messages logfile 600Tracking log messages with logwatch 601Using the Secure Shell Package 602Starting the SSH service 602Using the ssh, sftp, and scp commands 603Using ssh, scp, and sftp without passwords 604Securing Linux Servers 606Understanding attack techniques 606Protecting against denial-of-service attacks 607Mailbombing 607Spam relaying 609Smurf amplification attack 609Protecting against distributed DOS attacks 610Protecting against intrusion attacks 614Evaluating access to network services 615Disabling network services 616Securing servers with SELinux 617Protecting Web servers with certificates and encryption 618Symmetric cryptography 618Public-key cryptography 619Secure Sockets Layer 619Exporting Encryption Technology 627Managing Identities with freeIPA 627Setting up the freeIPA Server 628Setting up freeIPA Clients 629Summary 629

www.it-ebooks.info

Trang 31

Part IV: Fedora and RHEL Network and Server Setup

Chapter 15: Setting Up a Local Area Network 633

Connecting to the Network with NetworkManager 633Connecting to a wireless network 635Connecting to a wired network 636Setting up a virtual private network connection 637Understanding Local Area Networks 638Planning, getting, and setting up LAN hardware 639LAN topologies 639LAN equipment 641LAN equipment setup 643Configuring TCP/IP for your LAN 643Identifying other computers (hosts and DNS) 646Adding Windows computers to your LAN 648Setting Up a Wireless LAN 650Understanding wireless networks 651Choosing wireless hardware 652Selecting wireless LAN cards 653Selecting antennas 655Getting wireless drivers 657Installing wireless Linux software 660Configuring the wireless LAN 660Configuring the wireless interface 661Wireless Security 665Activating the wireless interfaces 666Checking your wireless connection 666Testing distances 666Setting wireless extensions 666Understanding Internet Protocol Addresses 668

IP address classes 669Understanding netmasks 669Classless Inter-Domain Routing 670Getting IP addresses 671Troubleshooting Your LAN 672Did Linux find your Ethernet driver at boot time? 672Can you reach another computer on the LAN? 673

Is your Ethernet connection up? 674Troubleshooting a wireless LAN 675Checking wireless settings 676Checking TCP/IP 678Adapting to poor reception 678Use debugging tools 679Watching LAN traffic with Wireshark 679Starting Wireshark 679

Trang 32

Capturing Ethernet data 681Interpreting captured Ethernet data 682Using Wireshark Filters 683Summary 684

Chapter 16: Connecting to the Internet 685

Understanding How the Internet Is Structured 685Internet domains 688Hostnames and IP addresses 689Routing 690Proxies 691Using Dial-Up Connections to the Internet 691Getting information 691Setting up dial-up PPP 692Creating a dial-up connection with the Network Configuration window 693Launching your PPP connection 695Launching your PPP connection on demand 696Checking your PPP connection 697Checking that your modem was detected 697Checking that your PPP interface is working 698Checking the default route 698Checking that the name servers are set 699Checking the chap-secrets or pap-secrets file 699Looking at the ifcfg file 700Running debugging 702Connecting Your LAN to the Internet 703Setting Up Linux as a Router 704Configuring the Linux router 705Selecting IP addresses 705Enable forwarding and masquerading 705Configuring network clients 707Configuring a Virtual Private Network Connection 709Understanding IPsec 709Using IPsec protocols 710Using IPsec in Fedora or RHEL 711Configuring an OpenVPN Server 712Decisions before configuring OpenVPN 712Create a public key infrastructure 713Create OpenVPN server configuration 715Create OpenVPN client configuration 716Setting Up Linux as a Proxy Server 717Starting the squid daemon 718Using a simple squid.conf file 720Modifying the Squid configuration file 722Configuring access control in squid.conf 722

www.it-ebooks.info

Trang 33

Configuring caching in squid.conf 724Configuring port numbers in squid.conf 725Debugging Squid 726Checking the squid.conf file 726Checking Squid log files 726Using the top command 727Setting Up Proxy Clients 727Configuring Firefox to use a proxy 728Configuring other browsers to use a proxy 729Summary 729

Chapter 17: Setting Up a Print Server 731

Common UNIX Printing Service 731Setting Up Printers 732Choosing a Printer 733Using the Printer configuration window 733Configuring local printers 734Configuring remote printers 739Using Web-based CUPS administration 742Configuring the CUPS server (cupsd.conf) 745Configuring CUPS printer options 746Using Printing Commands 748Using lpr to print 748Listing status with lpc 749Removing print jobs with lprm 749Configuring Print Servers 750Configuring a shared CUPS printer 750Configuring a shared Samba printer 751Understanding smb.conf for printing 751Summary 752

Chapter 18: Setting Up a File Server 753

Goals of Setting Up a File Server 753Setting Up an NFS File Server 754Sharing NFS file systems 756Using the NFS Server Configuration window 756Configuring the /etc/exports file 759Exporting the shared file systems 762Starting the nfsd daemons 763Using NFS file systems 763Manually mounting an NFS file system 763Automatically mounting an NFS file system 765Using autofs to mount NFS file systems on demand 767Unmounting NFS file systems 769

Trang 34

Other cool things to do with NFS 769Setting Up a Samba File Server 770Getting and installing Samba 771Configuring a simple Samba server 772Configuring Samba with SWAT 776Turning on SWAT 776Starting with SWAT 776Creating global Samba settings in SWAT 777Assigning Guest Accounts 780Configuring shared directories with SWAT 783Checking your Samba setup with SWAT 784Working with Samba files and commands 784Editing the smb.conf file 785Adding Samba users 786Starting the Samba service 787Testing your Samba permissions 787Checking the status of shared directories 787Setting up Samba clients 788Using Samba shared directories from Linux 788Using Samba shared directories from Windows 790Troubleshooting your Samba server 791Basic networking in place? 791Samba service running? 791Firewall open? 792User passwords working? 793Summary 793

Chapter 19: Setting Up a Mail Server 795

Introducing SMTP and sendmail 796Installing and Running sendmail 796Other Mail Servers for Fedora or Red Hat Linux 797Starting sendmail 798Other programs 798Logging performed by sendmail 799Configuring sendmail 800Getting a domain name 801Configuring basic sendmail settings (sendmail.mc) 801Defining outgoing mail access 805Configuring virtual servers 807Configuring virtual users 808Adding user accounts 809Starting sendmail and generating database files 810Redirecting mail 811The forward file 811The aliases file 811

www.it-ebooks.info

Trang 35

Introducing Postfix 813Stopping Spam with SpamAssassin 814Using SpamAssassin 815Setting up SpamAssassin on your mail server 815Setting e-mail readers to filter spam 817Getting Mail from the Server (POP3 or IMAPv4) 818Accessing mailboxes in Linux 818Configuring IMAPv4 and POP3 with dovecot 819Getting Mail from Your Browser with SquirrelMail 820Administering a Mailing List with mailman 821Summary 825

Chapter 20: Setting Up an FTP Server 827

Understanding FTP Servers 828Attributes of FTP servers 828FTP user types 829Using the Very Secure FTP Server 829Quick-starting vsFTPd 830Configuring vsFTPd 831User accounts 831Setting FTP access 832Adding message files 835Logging vsFTPd activities 835Setting timeouts 836Navigating a vsFTPd site 836Setting up vsFTPd behind a firewall 836Getting More Information about FTP Servers 837Summary 837

Chapter 21: Setting Up a Web Server 839

Introduction to Web Servers 840The Apache Web server 840Other Web servers available for Fedora and RHEL 841Quickstarting the Apache Web Server 842Configuring the Apache Server 844Configuring the Web server (httpd.conf) 845Setting the global environment 846Setting the number of server processes 848Binding to specific addresses 851Selecting modules in httpd.conf 851Including module-specific configuration files 856Choosing the server’s user and group 856Setting the main server’s configuration 857Identifying user directories 860

Trang 36

Setting default index files for directories 862Defining indexing 869Defining encoding and language 872Choosing character sets 873Adding MIME types and handlers 874Defining actions and headers 874Customizing error responses 875Setting responses to browsers 877Enabling proxy and caching services 877Configuring virtual hosting 879Configuring modules and related services (/etc/httpd/conf.d/*.conf) 881Starting and Stopping the Server 882Monitoring Server Activities 884Displaying server information 885Displaying server status 885Further security of server-info and server-status 887Logging errors 887Logging hits 888Analyzing Web-server traffic 888Statistics Packages Available for Fedora and RHEL 890Summary 890

Chapter 22: Setting Up an LDAP Address Book Server 891

Understanding LDAP 892Defining information in schemas 893Understanding OIDs 894Structuring your LDAP directories 894Setting Up the OpenLDAP Server 895Installing OpenLDAP packages 895Configuring the OpenLDAP server (slapd.conf) 895Creating an Encrypted Password 897Starting the OpenLDAP service 898Setting Up the Address Book 898More Ways to Configure LDAP 904Accessing an LDAP Address Book from Thunderbird 905Summary 907

Chapter 23: Setting Up a DHCP Boot Server 909

Using Dynamic Host Configuration Protocol 909Setting Up a DHCP Server 910Opening your firewall and SELinux for DHCP 911Configuring the /etc/dhcpd.conf file 911Expanding the dhcpd.conf file 912Adding options 914

www.it-ebooks.info

Trang 37

Starting the DHCP server 918Setting Up a DHCP Client 919Summary 920

Chapter 24: Setting Up a MySQL Database Server 921

Finding MySQL Packages 922Getting More MySQL Packages 923Configuring the MySQL Server 924Using mysql user/group accounts 924Adding administrative users 925Setting MySQL options 925Creating the my.cnf configuration file 926Choosing options 927Checking options 929Using sample my.cnf files 930Starting the MySQL Server 931Checking That MySQL Server Is Working 932Working with MySQL Databases 933Starting the mysql command 933Creating a database with mysql 935Adding data to a MySQL database table 936Manually entering data 936Loading data from a file 938Understanding MySQL Tables 939Displaying MySQL Databases 945Displaying all or selected records 945Displaying selected columns 946Sorting data 947Making Changes to Tables and Records 947Altering the structure of MySQL tables 948Updating and deleting MySQL records 948Adding and Removing User Access 949Adding users and granting access 949Revoking access 950Backing Up Databases 951Checking and Fixing Databases 951Summary 953

Chapter 25: Making Servers Public with DNS 955

Determining Goals for Your Server 956Using a hosting service 956Connecting a Public Server 957Choosing an ISP 957Checking Terms of Service 957

Trang 38

Getting static IP addresses 958Choosing a connection speed 959Getting a domain name 960Checking domain name availability 960Reserving a domain name 961Configuring Your Public Server 962Configuring networking 962Configuring servers 963Managing security 964Opening your firewall 964Enabling SELinux 965Checking logs and system files 965Keeping up with updates 966Setting Up a Domain Name System Server 966Understanding DNS 967Understanding authoritative zones 968Understanding DNS risks 968Understanding BIND 969DNS name server example 970Quick-starting a DNS server 972Identifying your DNS servers 973Creating DNS configuration files (named.conf and var/named) 973Starting the named (DNS) daemon 980Checking that DNS is working 980Getting More Information about BIND 982Summary 982

Chapter 26: Integrating Fedora with Apple Macs 983

Looking Inside Mac OS X 984Using Network Services from Mac OS X 985Using AppleTalk (netatalk) from Mac OS X 986Using AppleTalk from Mac OS 8 or OS 9 988Using Mac, Windows, and Linux servers (Samba) 988Sharing X applications 990Configuring an AppleTalk Server in Linux 991Before you start using netatalk 991Setting up the netatalk server 992Starting netatalk 993Open firewall ports 995Defining general AppleTalk server settings 995Defining specific AppleTalk servers settings 996Setting up users 996Sharing netatalk volumes 996Securing netatalk volumes 998User-level security 998

www.it-ebooks.info

Trang 39

Host-level security 999File- and directory-level security 999Printer Sharing 1003Troubleshooting netatalk 1004Accessing NFS Servers from the Mac 1005Connecting to NFS from the Connect to Server window 1005Connecting to NFS from the command line 1007Installing Fedora on an Intel-based Mac 1008Before installing Fedora on your Mac 1008Installing Fedora 1009Summary 1010

Appendix A: About the Media 1011

Fedora Source Code 1012

Appendix B: Running Network Services 1013

Checklist for Running Networking Services 1013Networking Service Daemons 1015The xinetd super-server 1015The init.d start-up scripts 1016Choosing Alternatives 1017Referencing Network Services 1018Web server 1018File servers 1019FTP servers 1019Samba server 1019Netatalk server 1020Login servers 1020E-mail servers 1021News server 1021Print servers 1022Network administration servers 1022Network Time Protocol server 1022Portmap server 1022SWAT 1022Arpwatch server 1023Simple Network Management Protocol server 1023Information servers 1023Network Information System servers 1024Dynamic Host Configuration Protocol server 1024Lightweight Directory Access Protocol server 1024Domain Name System server 1025Reverse Address Resolution Protocol server 1025Database services 1025

Trang 40

User services 1025Remote execution servers 1025Talk server 1026Finger server 1026Remote user identification 1027Write-to-All server 1027Security services 1027System logging 1027Virtual private network servers 1027Proxy/caching server 1028

Appendix C: Red Hat Enterprise Linux 5 Features 1033

What’s in RHEL 5? 1033What’s New in RHEL 5.2? 1036Choosing an RHEL System 1036Getting RHEL Evaluation Subscriptions 1037Hardware Compatibility and Commercial Software 1037Training and Certification 1038Documentation and Support 1039Managing RHEL Systems 1039Using Red Hat Network 1039Using RHEL for high-performance computing clusters 1041Using RHEL Global File System 1041More Information on RHEL 1042What’s in RHEL 5? 1033What’s New in RHEL 5.2? 1036Choosing an RHEL System 1036Getting RHEL Evaluation Subscriptions 1037Hardware Compatibility and Commercial Software 1037Training and Certification 1038Documentation and Support 1039Managing RHEL Systems 1039Using Red Hat Network 1039Using RHEL for high-performance computing clusters 1041Using RHEL Global File System 1041More Information on RHEL 1042

Index 1043

www.it-ebooks.info

Ngày đăng: 15/03/2014, 21:20

TỪ KHÓA LIÊN QUAN