Special Edition Using Linux 4th Edition pdf pdf
i
Using
Fourth EditionLinux ii
iii
Using
LinuxFourth Edition Jack Tackett, Jr.
Steve Burnett iv
Special Edition Using Linux Copyright © 1999 by Que Corporation
All rights reserved. No part of this book shall be reproduced, stored in a retrieval system, or transmitted by any means, electronic, me- chanical, photocopying, recording, or otherwise, without written permission from the publisher. No patent liability is 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 assume no responsibility for errors or omis- sions. Neither is any liability assumed for damages resulting from the use of the information contained herein. International Standard Book Number: 0-7897-1746-8 Library of Congress Catalog Card Number: 98-85654 Printed in the United States of America First Printing: September, 1998 01 00 99 4 3 2 1
Trademarks
All terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized. Que Corpora- tion cannot attest to the accuracy of this information. Use of a term in this book should not be regarded as affecting the validity of any trademark or service mark.
Warning and Disclaimer
Every effort has been made to make this book as complete and as accurate as possible, but no warranty or fitness is implied. The information provided is on an “as is” basis. The authors and the publisher shall have neither liability nor responsibility to any person or entity with respect to any loss or damages arising from the infor- mation contained in this book or from the use of the CDs or pro- grams accompanying it.
EXECUTIVE EDITOR Jeff Koch ACQUISITIONS EDITOR Jane Brownlow DEVELOPMENT EDITORS Mark Cierzniak Kate Shoup Welsh MANAGING EDITOR Sarah Kearns PROJECT EDITOR Christopher Morris COPY EDITOR Audra McFarland
INDEXER Craig Small TECHNICAL EDITOR Eric C. Richardson SOFTWARE DEVELOPMENT SPECIALIST Jack Belbot PRODUCTION Steve Balle-Gifford Maribeth Echard Megan Wade v
Contents at a Glance
vi
vii
Table of Contents Introduction
XENIX, SunOS, and AIX 24 Linux 25
Partitioning Your Hard Drive 42 Understanding Partitions 42 Using FDISK 43 Repartitioning Your DOS Drive 44 Using the Linux fdisk Program 47 Adding the Necessary Partition 50
Compiling Needed information 39 Creating the Boot and Supplemental Disks 41
Starting the Installation Process 37 Understanding the Various Installation Methods 38
Requirements 30 The System’s CPU 31 The System’s Bus 31 Memory Needs 31 Disk Drives and Space Requirements 32 Monitor Requirements 33 CD-ROMs 34 Network Access 35 Miscellaneous Hardware 36
29 Understanding Linux’s Hardware
2 Linux Installation Overview
Who Owns Linux? 26 From Here… 27
A Brief History of Linux 23 AT&T 23 BSD 24 USL 24
Who Should Not Use This Book? 4 Hardware Needed to Use This Book 4 How to Use This Book 6
The Commercial Side of Linux 22 Commercial Programs from Red Hat 22 Commercial Programs from Caldera 22
Disadvantages of Using Linux 19 Lack of Technical Support 20 Hardware Problems 20 Inability to Use Current Software 20 Lack of Experience 21 Overcoming the Disadvantages 21 Disappearing Disadvantages 22
Open Systems Portability 17 Applications 18 Advantages for Computer Professionals 18 Education 18 Hackers 19
Why Use Linux? 15 Linux Distributions 16 Advantages of Using Linux 17
13 What Is Linux? 14
1 Understanding Linux
Part I: Installing Linux 6 Part II: System Administration 6 Part III: Managing the File System 7 Part IV: Working with Linux 7 Part V: Network Administration 8 Part VI: Using the Internet 8 Part VII: Setting Up a Linux Web Server 8 Appendixes 9 Conventions Used in This Book 9 I Installing Linux
Troubleshooting Problems 52 From Here… 56 viii Installing Linux 91
3 Installing Red Hat
57 Using a Previous Configuration 91
Starting the Installation Process 58 Configuring LISA 92 Probing for Hardware 92
Understanding the Various Installation Preparing the Hard Disks 94
Methods 59 Using the Linux fdisk Program 95
Compiling Needed Information 60 Adding the Necessary Partition 97
Creating the Boot, Supplemental, and Creating the Swap Partition 99
Rescue Disks 61 Installing the Linux Software System 99
Installing the Linux System 62 Using the Linux fdisk Program 67
Configuring Your System 100 Adding the Necessary Partition 70
Installing LILO 101 Creating the Swap Partition 72
Uninstalling LILO 101 Using Disk Druid 73 Installing the Software Components 75
Going Back to the Beginning 102 Configuring Your System 77
Resolving Problems 102 Configuring Your Network 79
From Here… 103 Configuring the TCP/IP Network 79 Configuring the Clock 79
5 Running Linux Applications 105
Selecting the Services to Start on Reboot 80
Maneuvering Through Linux 106 Selecting Your Root Password 82
Entering Commands 106 Installing LILO 82
Recalling Command History 106 Making Selections 107
Installing Red Hat Linux on DEC Completing Commands 107
Alphas 83 Using Supported Alpha Hardware 83
Managing Users 107 Creating the Boot and Root Disks 84
Logging In and Out 108 Installing the Main Red Hat
Adding Users Under Slackware 108 Distribution 85
Adding Users with Red Hat 111 Using Red Hat’s Control Panel to
Going Back to the Beginning 85 Manage Users 111
Troubleshooting Problems 86 Changing Passwords 113
From Here… 86 Using Basic Commands 114
Getting Help for Commands with
man
114
4 Installing Caldera OpenLinux
Using Directory-Manipulation
Lite
87 Commands 114
Using File-Manipulation What You Need to Install Linux 88
Commands 116 Installation 89
Dealing with DOS Files Under Linux 118 Making the Preparations 89
Shutting Down Linux 119 Preparing the Installation Floppies 90
Running Linux Programs 120 Creating the Install and Modules
Using the workbone CD Player 120 Disks 90 ix Using the bc Calculator 122
II System Administration
Using the minicom Telecommunications Package 122
7 Understanding System
Playing Games 124 Administration 163 Tetris 124
Understanding the Importance of Proper Dungeon 125
Administration 164 Trek 125
Understanding Multiuser Concepts 165 Running DOS Programs Under Linux 127
Installing DOSEMU 127 Understanding Centralized-Processing
Configuring DOSEMU 127 Systems 166
Running DOSEMU 134 Elements of the Centralized-Processing Model 167
Running Windows Programs Under Linux 143
Understanding Distributed-Processing Systems 168
From Here… 144 Elements of the Distributed-Processing Model 169
Topologies 170
with RPM 145
Understanding the Client/Server Understanding Key Terms Used in This
Model 171
Chapter 146 Performing Administration in a Networked Understanding the Politics of Environment 172 Upgrading 147 Defining the Role of the Network Installing Software 147 Administrator 172 Understanding the System Understanding Hardware and Software Administrator’s Job 148 Issues 172 Performing Common Networking Using the Red Hat Package Manager 149 Administrative Tasks 173 Locating Packages 150 Training the Administrator 175 Installing Packages with RPM 150 Uninstalling Packages with RPM 151 From Here… 176 Updating Packages with RPM 152 Querying Packages with RPM 152
8 Using the vi Editor 177
Verifying Packages with RPM 153 Installing Non-Linux Software 154
Introducing vi 178 Reviewing File Permissions 157
What Is vi? 179 Solving Problems 157
Understanding the Editing Process 180 Removing Applications 158
Using vi 181 Upgrading Your Kernel 158
Looking at vi’s Two Modes 182 Creating Your First vi File 182
From Here… 159 Starting vi by Using an Existing File 183 Exiting vi 184 Undoing a Command 186 x Positioning the Cursor 189 Adding Text 191 Deleting Text 193 Searching 194 Changing and Replacing Text 195 Copying, Cutting, and Pasting 197 Repeating Commands 199
vi
Using tar 229 Using cpio 232
PAM: The Pluggable Authentication Modules Architecture 246
Developing a Secure System 243 Security Threats 243 Controlling the Root 244 Controlling Modems and Crackers 244 Preventing Idle Terminals 244 Enforcing Security 245 Handling Security Breaches 245 Performing Backups 246
Avoiding Social Engineering Threats 242 Recording Use of the su Command 243
Handling File Security 240 Permissions 241 SUID and SGID Programs 241
Accounts Without Passwords 239 Unused Accounts 239 Default Accounts 239 Guest Accounts 239 Command Accounts 240 Group Accounts 240
Handling Physical Security 236 Dealing with Password Security 237 Developing Login Security 238
12 Improving System Security 235
From Here… 233
Considering Backup Issues 226 Considering Backup Tips 227 Planning a Backup Schedule 227 Performing Backups and Restoring Files 229
Command Summary 199 Setting the vi Environment 201
11 Backing Up Data 225
Managing Home Directories 223 Web-Based Administration 224
Working with Groups 223 Adding a Group 223 Deleting a Group 223
Working with Users 220 Adding a User 220 Using the adduser Command 221 Setting User Passwords 221 Removing a User 222
Shutting Down Linux 215 From Here… 217
Configuring LILO 214 Using LILO 215
Understanding the Boot Process 206 Booting Linux from a Floppy 212 Booting from a Boot Manager 213 Understanding LILO, the Linux Loader 214
From Here… 204
Using set to See and Set Options 203 Setting the showmode Option 203 Setting Toggle Options 203 Changing Options for Every vi Session 204
Understanding PAM Configuration Files 247 Required, Requisite, and Optional: Module Order and Necessity 247 xi Shadow Passwords: What Good Are They? 248
The /etc/password and /etc/shadow Files 249 Adding, Changing, and Deleting Users with Shadowed Passwords 249
Using fdisk to Create Disk Parti- tions 280 Using mkfs to Build a File System 286
From Here… 316
Linux Standard Directories 313 Classic UNIX Directories 313 Linux Directories 315
Understanding File and Path Names 304 File Types 306 Ordinary Files 306 Directory Files 307 Directories and Physical Disks 307 Links 308 Special Files 309 File Permissions 310
16 Understanding the File and Directory System 303
From Here… 302
Running the Samba Server 300 Using smbclient 300
The [global] Section 297 The [homes] Section 297 The [printers] Section 298 Sharing Directories 298 Testing the smb.conf File 299
Installing Samba 292 Configuring Samba on Linux 293
15 Using Samba 291
From Here… 289
Using Swap Files and Partitions 288 Creating a Swap Partition 288 Creating a Swap File 289
Using the fsck Command 279 Creating and Formatting File Systems 280
From Here… 251
Exporting an NFS File System 274 Understanding the /etc/exports File 275 Mounting NFS File Systems 277
Understanding the Network File System 274
Mounting File Systems Interac- tively 270 Mounting File Systems at Boot Time 271 Unmounting File Systems 273
Understanding File Systems 266 Mounting and Unmounting File Systems 269
14 Managing File Systems 265
III Managing the File System
From Here… 262
Working with Kernel Modules 260 Restarting kerneld 262
Compiling the New Kernel 258 Building a Modularized Kernel 259
The Interactive Text-Based Program 255 Using the Menu-Based Program 256 Using the X Windows-Based Program 257
Preparing to Build a New Kernel 254 Configuring a New Kernel 255
13 Configuring the Linux Kernel 253
17 Managing Files and Directories 317 xii Copying Files 322 Moving and Renaming Files 323 Removing Files or Directories 323 Viewing the Contents of a File 325
Using cat to View a File 326 Using more to View a File 326 Using less to View a File 326 Searching Through a File and Escaping to the Shell 327 Viewing Files in Other Forms 327
From Here… 380
392 Reporting On the Status of Processes with ps 394
who
Finding Out Who’s on the System with
388 Reporting On and Monitoring the Multitasking Environment 391
crontab
Using the Scheduling Commands 385 Running Commands at Specified Times with at 386 Running Long Tasks with batch 388 Scheduling Commands with cron and
Starting Multiple Processes 384 Starting a Background Process 384 Using Pipes to Start Multiple Processes 385
Understanding Multitasking 382 Initiating Multiple Processes 384
19 Managing Multiple Processes 381
Customizing Linux Shells 378 Exporting Variables to the New Shell 378 Defining Command Aliases 380
Searching for Files 329 Changing File Time and Date Stamps 331 Compressing Files 332 From Here… 333
Working with Shell Scripts 365 Writing Programs with the Shell 367 Programming with Control Structures 371
Editing Commands 364 Viewing Command History 364 Aliasing Commands 364 Completing Commands 365 Adding Text with Cut and Paste 365
Understanding Command Feedback 363 Editing and Aliasing Shell Commands 364
Doing Background Processing 361 Arranging for Processes to Run in the Background 361
Using Commands, Flags, and Param- eters 351 Performing Filename Matching 352 Connecting Processes with Pipes 355 Redirecting Input and Output 355 Substituting Shell Variables 356 Substituting Command Results 357 Regular Expressions 358 Understanding Command Groups, Subshells, and Other Commands 360
Understanding Shell Command Parsing 350
Looking at Different Shells 339 Configuring Your Login Environ- ment 341 Understanding Processes 349
Logging In 338 Understanding Shells 339
IV Working with Linux
Controlling Multiple Processes 397 Using nohup with Background Processes 398 Scheduling the Priority of Commands with nice 398 xiii Scheduling the Priority of Running Processes with renice 399 Terminating Processes with kill 400
From Here… 403
xterm
CDE
444
KDE
444 Using X Applications in Red Hat 444
nxterm
446
xv
446 Using X Windows Applications with Slackware 96 448
448
Enlightenment
xcalc
451
xspread
454 Seyon 455
xgrab
457
xlock
458 Having Fun with DOOM for Linux 458
Installing DOOM 458 Starting DOOM 459
444
443
Selecting a Printer to Work with Linux 406 Knowing What You Need to Configure Printers 406 Knowing How Printing Works Under Linux 406 Understanding the Important Programs for Printing 407
Configuring XFree86 430 Running the SuperProbe Program 431 Understanding the XF86Config Sections 431 Running the xf86Config Program 437
The lpd Daemon 408 The lpr Command 408 The lpq Command 409 The lprm Command 409 The lpc Command 409
Understanding the Important Directories 410 Understanding the Important Files 410 Understanding the /etc/printcap File 411
Understanding the Fields in /etc/printcap 412 Setting the PRINTER Environment Variable 413
Creating a Test printcap Entry 413 Putting It All Together 414 Configuring Red Hat Printers 416 From Here… 419
21 Installing the X Windows System 421
Understanding X Windows 422 What Is a Client/Server System? 424 Output Capabilities 424 User Interface Capabilities 425 Input Capabilities 425
Ensuring Hardware Suppor t for
XFree86 427 Installing the X System with pkgtool for Slackware 429
Running X in -probeonly Mode 437 Using the X Windows Resource Files 438 From Here… 438
olwm
22 Using X Windows 439
Navigating X Windows 440 Using Menus 440 Using Virtual Terminals in X Windows 440
Using Window Managers for Linux 441
twm
441
fvwm
442
fvwm95
443
From Here… 460 xiv
V Network Administration
Monitoring a TCP/IP Network with
26 Configuring Electronic Mail 517
Troubleshooting 514 From Here… 515
The named.boot File 506 Database Files and Resource Records 508 The named.hosts File 511 The named.rev File 513 The named.ca File 514
Using the named Daemon to Set Up the Server 506
The /etc/host.conf File 503 The /etc/resolv.conf File 505
Introducing DNS 502 Configuring the Resolver 503
25 Configuring Domain Name Service 501
From Here… 498
493 Displaying Active Network Connec- tions 494 Examining the Kernel Routing Table 497 Displaying Network Interface Statistics 497
netstat
Understanding TCP/IP Routing 489 Deciding On a Routing Policy 489 Using the /sbin/route Program 490
23 Understanding the TCP/IP Protocol Suite 463
Initializing Ethernet Interfaces 486 Using ifconfig to Inspect a Network Interface 488 Configuring the Software Loopback Interface 488 Configuring a Network Interface 488
The /etc/hosts File 484 The /etc/networks File 485
Understanding the TCP/IP Configuration Files 484
From Here… 482
Internet Network Setup 477 Understanding the Types of Connec- tions 477 Choosing a Networking Configura- tion 480 Understanding Network Configuration Guidelines 481 Using Routers and Bridges 481
Routing Information Protocol (RIP) 476 Network Segmentation 476
Subnetworks and Subnet Masks 474 Routing 475
IP Address Classes 470 Network Naming 472 NIC Naming Tree 473
IP Addresses 469
The History of TCP/IP 464 Internet Terminology 464 The Open Systems Interconnection Model 466 The TCP/IP Protocol Stack 468
An Overview of Electronic Mail 518 History and General Concepts 518 The Shared-File Messaging Model 518 The Client/Server Messaging Model 519 MUAs, MTAs, and MDAs 519 The IETF Requests for Comment 520 Internet Protocols 522 Mail Message Formatting 523 xv sendmail 524 sendmail’s History 524 sendmail’s Architecture 525 sendmail Rulesets 528
From Here… 529
rlogin
telnet
Command Summary 578 Sample telnet Session 579
Using FTP for Remote File Transfer 580 Anonymous FTP 580
ftp
Command Summary 581 A Sample FTP Session 585 A Sample Anonymous FTP Session 586
Using the r- Commands 589
589
30 Accessing the Network with telnet, ftp, and the r- Commands 577
rsh
590
rcp
591
ssh
592 From Here… 594
31 Surfing the Internet with the World Wide Web 595
Using telnet to Access Remote Computers 578
From Here… 575
27 Configuring a Usenet News Service 531
Writing Files and Saving the Buffer 547 Using Files 547 Positioning the Cursor 548 Adding Text 550 Deleting Text 550 Searching and Replacing Text 551 Copying, Cutting, and Pasting 554
A Usenet Primer 532 History and Origins of Usenet 532 Usenet Structure 532
Configuring Usenet Clients 534 NN and TIN 534 Pine 535
From Here… 537
28 Using the emacs Editor 539
Starting emacs 540 Using emacs 541
Looking Over the emacs Screen 542 Creating Your First emacs File 542 Starting emacs by Using an Existing File 543 Exiting emacs 544 Undoing a Command 546
Basic Command Summary 555 Customizing emacs 557 From Here… 557
569 Providing PPP Service 573 Keeping Your PPP Link Secure 574
VI Using the Internet
29 Using SLIP and PPP 561
Using dip to Automate SLIP Opera- tions 562 Using dip in Command Mode 563 Using dip with Static IP Addresses 566 Using dip with Dynamic IP Addresses 567
Using diplogin to Provide SLIP Service 568
Creating SLIP Accounts 568 Using the /etc/diphosts File 568
Using PPP 569 Automating PPP Links with pppd and
chat
Introducing the World Wide Web 596 Understanding the Web’s Structure 596 Understanding URLs 597 Searching the Web 598 xvi Using archie with a Web Browser 602 Using telnet with a Web Browser 604 Using gopher with a Web Browser 605 Accessing Usenet News with a Web Browser 606 Getting on Mailing Lists 606
Finding Mailing Lists 607 Using Mailing Lists 607
Customizing Your mail Environment 646 Quitting the mail Program 647
Lack of Visual Reference 662 Newsgroup Culture 662
No Central Authority 661 Usenet Culture 661
Group Hierarchies 659 News Distributions 660
What Is Usenet News? 656 A Usenet Glossary 656 A Brief History 658 How Usenet Is Structured 659
34 Surviving Usenet News 655
From Here… 653
Using the Mutt E-Mail Client 652 Where to Get Mutt 652 For More Information on Mutt 652
Using the elm Mailer 649 Starting elm 649 Using elm Commands 650
Quitting and Saving Changes 648 Quitting and Not Saving Changes 648
Forwarding Messages 643 Sending a Copy with mail 644 Using Aliases and Mailing Lists 645
Using Wide Area Information Servers (WAIS) 608 From Here… 608
640 Replying to E-Mail with mail 641 Routing Mail to Others 643
Reading Your Mail 635 Printing Mail Messages 638 Getting Help with mail 638 Saving E-Mail to Files with mail 639 Deleting and Undeleting Messages with
Writing a Message While Sending E-Mail 633 Canceling a Message 633 Sending a Prepared Message 634 Sending the Result of a Command or Program by E-Mail 635
Understanding E-Mail 630 Sending E-Mail with mail 632
From Here… 628
Understanding HTML Syntax 614 Using Document Tags 615 Formatting Text 615 Organizing Information with Lists 620 Linking Pages with Anchors 623 Using Graphics 625
Tags 614 Attributes 614 URLs 614
Understanding HTML 610 Working with HTML 610 Using Basic HTML Elements 614
32 Creating Web Documents with HTML 609
Reading and Posting News 663 Subscribing to Newsgroups 663 Reading News 664 Replying via E-Mail 664 xvii Using the rn News Reader 667 From Here… 668
VII Setting Up a Linux Web Server
Special Modules 693 Server-Side Includes 693
VIII Appendixes A Sources of Information 721
Other Tuning Issues 717 From Here… 717
CGI Issues 714 Server-Side Includes 715 Symbolic Links 715 Publicly Writable Spaces 716
Automating Logfile Rotation 713 Understanding Security Issues 714
Using Server-Side Includes 712 Using .htaccess Files 712 Using .asis Files for Server-Push Animations 713
Controlling Server Child Processes 710 Using the Scoreboard File 711 Increasing Efficiency in the Server Software 712
37 Managing an Internet Web Server 709
From Here… 708
Advanced Functionality 702 Host-Based Access Control 702 User Authentication 704 Database Management File Authentication 705 Vir tual Hosts 705 Customized Error Messages 707 Assorted httpd.conf Settings 707
Configurable Logging 696 Content Negotiation 699 As-Is Files 701
, ScriptAlias, and Redirect 687 A Better Way to Activate CGI Scripts 688 Directory Indexing 689 User Directories 692
35 Getting Started with Apache 671
Alias
686
AddEncoding
Configuration Basics 684 Per-Directory Configuration Files 684 MIME Types: AddType and
36 Configuring Apache 683
Setting Up Apache-SSL 681 From Here… 681
Open File Error Messages 679 Port and Bind Error Messages 680 Bad User or Group Name Messages 680 Initial Ser ver Startup Error Messages 680
Starting Up Apache 677 Debugging the Server Startup Process 679
Establishing the File Hierarchy 673 Performing a Basic Configuration 674 httpd.conf 675 srm.conf 676 access.conf 677
Compiling Apache 672 Step 1: Edit the Configuration File 672 Step 2: Run the Configure Script 673 Step 3: Run make 673
Linux Web Sites 722 Usenet Newsgroups 722 Online Documents 725 xviii Magazines 726 Controllers (SCSI) 768
Supported 768 Linux FTP Sites 726
Others 770 Unsupported 770
Contacting InfoMagic 727 Controllers (Multiport) 771
For Linux Developers 727 Non-Intelligent Cards - Supported 771 Intelligent Cards - Supported 771
B The Linux HOWTO Index 729
Others 771 What Are Linux HOWTOs? 730
Network Adapters 772 Where Do I Get Linux HOWTOs? 730 Supported 772
HOWTO Translations 730 Others 773 Unsupported 773
HOWTO Index 731 Mini-HOWTO index 736 Sound Cards 773 Special HOWTO index 741 Supported 773 Unmaintained HOWTOs and Others 774 mini-HOWTOs 741 Unsupported 774
Writing and Submitting a HOWTO 741 Hard Drives 775 Copyright 743 Tape Drives 775
Supported 775 Others 775
C The Linux Hardware Compatibility
Unsupported 776
HOWTO 745
CD-ROM Drives 776 Introduction 746
Supported 776 Others 777
Welcome 746 Notes 777
Copyright 747 System Architectures 747
CD-Writers 778 Computers/Motherboards/BIOS 747
Removable Drives 778 Specific Systems 747 Unsupported 748 Mice 779
Supported 779 Laptops 748
Others 779 Specific Laptops 748
Notes 780 PCMCIA 749
Modems 780 CPU/FPU 749
Printers/Plotters 780 Memory 749
Ghostscript 781 Video Cards 750
Scanners 782 Diamond Video Cards 750
Supported 782 SVGALIB (Graphics for Console) 750
Others 783
XFree86 3.3.1 750 Unsupported 784
S.u.S.E. X-Server 751 Other Hardware 784
Commercial X Ser vers 752
VESA Power Savings Protocol (DPMS) xix Video Capture Boards / Frame Grabbers / TV tuner 784 Digital Camera 786 UPS 786 Multifunction Boards 786 Data Acquisition 786 Watchdog Timer Interfaces 787 Miscellaneous 787 Related Sources of Information 787
Acknowledgments 787 Appendix A. S3 Cards Supported by
Preparing for a Network Installation 817 The Server Side of a Network Installation 817 The Client Side of a Network Installation 818
About the Software 825
Caldera OpenLinux Lite 1.2 824 StarOffice 4.0 825
Red Hat Linux 5.1: Award Winning Operating System 824 Caldera OpenLinux Lite 1.2 and StarOffice 4.0 for Linux 824
F What’s on the CD-ROM 823
Modifying the StarOffice Installation 820 Upgrading Your StarOffice Installation 820 Deinstalling StarOffice 820 Repairing StarOffice 821
Updating or Removing the StarOffice Installation 819
Reviewing the License Agreement 812 Choosing an Installation Option 813 Using the Custom Installation Option 814 Deciding Where to Put StarOffice 815 Entering Your User Information 816
XFree86 3.3.1. 787 Appendix B. Supported PCMCIA Cards 789 Appendix C. Plug and Play Devices 795 Appendix D. Linux Incompatible Hardware 795 Glossary 796
811
Checking Your Environment Variables 808 Single-User and Network (Multiuser) Installations 808 Checking File Permissions and Library Versions 809
Reviewing Linux System Requirements 808
E Installing StarOffice 807
The GNU License 800 Preamble 801 GNU General Public License Terms and Conditions for Copying, Distribution, and Modification 801 How to Apply These Terms to Your New Programs 805
D The GNU General Public License 799
Index 827 xx
About the Authors Jack Tackett, Jr.
is the Manager of System Operations for Nortel’s Information Network, the leading outsource provider of Virtual Private Networks in the VPN industry. When not herding his system administrators (a practice very similar to herding cats), he sometimes breaks away to write (another practice very similar to herding cats and usually just as rewarding ;-). He fights for living space with his loving wife and their two dogs and three cats in Cary, NC. He tackett@netwharf.com invites your comments at .
Steve Burnett
is an information technology consultant in Research Triangle Park, NC. His last degree was an M.S. in Technical Communication. For the last several years, his professional interests have centered on systems administration, integration, and interoperability. When he’s not working, he likes to take his wife out for dinner, cooking not being a noted achievement of his. xxi
Dedication From Jack Tackett To my wife Peggy and to my Mom, Mary Louise—love always.
From Steve Burnett To my mother.
Acknowledgments From Jack Tackett:
First, I want to thank all the readers of the first three editions for their patronage and for their helpful and insightful comments. Your comments are important and make a difference; you have made this a better project! I want to say thank you for the tremendous efforts put forth by the Linux developers scattered across the globe. I also want to acknowledge the fine contributions begun by Linus Torvalds and continued by so many others around the world—thanks for creating Linux and breathing life into such a monumental effort! Also, thanks to Matt Welsh, et al., for the work on the Linux Documentation project. Also, a big thanks to the fine folks at Red Hat for their help in prepar- ing this edition—and for a great lunch at Kanki’s! Next, I want to express my regards for the people at the Que Continuum. I especially want to thank Jane Brownlow and Mark Cierzniak for their help in getting this project off the ground and finished. To Steve Burnett for stepping in at the last minute to provide aid and assistance to a haggard cat herder. Also thanks to Paul Barrett for his initial help with the research that eventually led to this book. And also thanks to David Gunter for his efforts with the first three editions. To my friends Paul Barrett, Keith E. Bugg, Gregg and Beckie Field, Dave and Lola Gunter, Israel Janovich, Dianna Smith, Kell and Joy Wilson, Britney, Vicki, and Binh, and finally Joe Williams: Thanks for the memories! Thanks to my combined family—the Tacketts and the Martins—for their support in all my endeavors. Also, a big thank you to the best cousins in the world—Bill and Hope Tackett, Jr.
I’d like to thank my best instructor, Dr. Joe Daugherty of the University of North Carolina- Asheville. Also thanks to Myrtice Trent of the Blue Ridge Technical Community College. Thanks for the help and encouragement you both provided. Next a great big thank-you to my coworkers at Nortel’s Information Network for picking up the slack while I revised this book—thank you to everyone! Finally, to my wife Peggy, who has yet again put up with me spending endless hours at the computer writing yet another computer book. Thanks, sweetheart, and I love you! xxii
From Steve Burnett
First, without the mammoth amount of work put into Linux by Linus Torvalds and the rest of the Linux development community, there would be nothing to write about here. Since the first release, Linux has grown into a robust operating system that is used to meet a wide variety of needs, from home hobbyists up through business usage central to those companies. Secondly, without Jack and David’s work on the previous editions, there wouldn’t have been a book to invite me to help revise. Jack, thanks for inviting me in on this project. Although electronic mail works great, living within a local call range of each other helped keep my bills down while we tried to coordinate our actions.
Other people I’d like to thank include David Fugate for coordination, and Leland Wallace, Jay Cuthrell, and Cameron Wallace for fact-checking and offering occasional opinions when asked. Louis Popovsky also contributed by sending me frequent well-chosen technical updates throughout the writing period. Sanity checks were provided by the various staff and inhabitants of the Duke University Primate Center, reminding me there’s more than computers out there. Finally and most importantly, I’d like to thank my wife Merrie. xxiii
Tell Us What You Think!
As the reader of this book, you are our most important critic and commentator. We value your opinion and want to know what we’re doing right, what we could do better, what areas you’d like to see us publish in, and any other words of wisdom you’re willing to pass our way. As the Executive Editor for the Operating Systems team at Macmillan Computer Publishing, I welcome your comments. You can fax, email, or write me directly to let me know what you did or didn’t like about this book—as well as what we can do to make our books stronger.
Please note that I cannot help you with technical problems related to the topic of this book, and that due to the high volume of mail I receive, I might not be able to reply to every message.
When you write, please be sure to include this book’s title and author, as well as your name and phone or fax number. I will carefully review your comments and share them with the author and editors who worked on the book. Fax: 317-581-4663
opsys@mcp.com
Email: Mail: Executive Editor
Operating Systems Macmillan Computer Publishing 201 West 103rd Street Indianapolis, IN 46290 USA xxiv
I N T R O D U C T
I O N Introduction
inux is no longer a “not ready for prime time” operating system!
L
Many commercial uses of Linux abound, ranging from being used to create many of the fantastic special effects for James Cameron’s mega hit Titanic, to being used as the OS for new network com- puters. As Linux evolves, one has to keep up with the changes; that’s why you will find plenty of new material in this fourth edi- tion of the popular Special Edition Using Linux.
Many chapters have been rewritten to highlight the Red Hat distribution—probably the most popular and easiest-to-install Linux distribution ever. In addition, the book contains updated coverage of such items as RPM (the Red Hat Package Manager), which offers the easiest way to install and upgrade your system; PAM, a leading security feature of most Linux distributions; and
X Windows. You’ll also find another CD-ROM containing a lite version of Caldera’s OpenLinux Base product. Finally, on the third CD-ROM, you’ll find a copy of Caldera’s StarOffice, an integrated office application that includes several office automation programs. ■
However, if you’re just tuning in, you might want to know just what the heck Linux is. In 1991, Linus Torvalds, then a 23-year-old college student, began a personal project to expand the Minix operating system into a full-fledged clone of the UNIX operating system that was so popular on college campuses. The project is still evolving: Linux is continuously updated and expanded by literally hundreds of people around the world.
Therefore, Linux is a unique animal in the computer (r)evolution. It isn’t a commercial product backed by a huge corporation; rather, it’s an operating system born of frustration and built by a ragtag team of computer enthusiasts around the world. This team used Internet resources to communicate and build the operating system named Linux.
But don’t think Linux is just a hobby for hackers around the world—it’s not! Plenty of commer- cial products are being written specifically for Linux. In fact, several companies are porting their UNIX-based applications, such as Corel’s WordPerfect, to Linux. As a matter of fact, Corel has adopted Linux for its new Network Computer and has released the resulting software to the development community.
N O T E
While it is very hard to estimate the total number of Linux users or installations in the world, a working estimate shows between 5,000,000 and 10,500,000 active Linux users worldwide. For more information see the following URL: http://www.redhat.com/redhat/linuxmarket.html ■
N O T E
If you don’t understand what a Uniform Resource Locator (URL) is or how to use it, don’t despair! This book will help you learn how to make your way around the Internet using Linux. ■
◊ See “URLs,” p. 614 Many Fortune 500 companies use Linux for internal projects and mission-critical applications.
And recently, large companies such as Netscape Communications, are embracing the concept of open solutions by releasing their own software into the development community, just as Linus Torvald and others released their software to the world. There are also plenty of free applications and utilities for Linux. Since the inception of Linux, almost the entire GNU library of utilities has been ported to Linux, and the X Windows GUI system—so popular on UNIX-type workstations—also has been ported. GNU (a recursive acronym for “GNU’s Not UNIX”) is a project started by one man to make software available to anyone who wants access. The GNU General Public License in Appendix D describes the philosophy under which Linux and many other fine software packages are distributed. The accompanying CD-ROMs contain many of these packages. This book provides you with enough information to use and enjoy Linux. The accompanying CD-ROMs contain the Red Hat 5.1 distribution and Caldera’s OpenLinux Lite, each of which use the 2.0.34 Linux kernel.
Probably the first order of business is to help you pronounce the word Linux. To most Ameri- cans, the pronunciation is LEN-nucks, with the shor t i sound. The official pronunciation is LIE-nucks, with the long i sound.
You can hear Linus pronounce Linux in English at the following URL: ftp://ftp.linux.org/pub/kernel/SillySounds/english.au
Who Should Use This Book?
Anyone interested in the Linux phenomenon can use this book as a guide to installing, config- uring, and using Linux. Linux is often called a UNIX clone, but it’s actually a POSIX-compliant multiuser, multitasking operating system for Intel 386 and later processors. POSIX is an inter- national standard for operating systems and software detailing interoperability standards. Linux doesn’t require MS-DOS or Windows to operate; in fact, Linux can replace those pro- grams on your computer.
Because Linux is still evolving, it’s imperative that you understand the possibility of losing existing data on your system. Do not install Linux without first backing up your system. It might be necessary to repartition your hard drive to make room for this new operating system, al- though it’s possible to install Linux on top of MS-DOS or to repartition your hard drive without losing data. If you take the proper precautions, anyone can install and enjoy Linux.
N O T E
The most current version of Linux is always available on the Internet, from sources listed in Appendix A, “Sources of Information.” The accompanying CD-ROMs contain the latest possible versions of Linux, but due to the rapid development of this popular operating system and the chaotic process in which it’s developed, it’s impossible to provide the latest and greatest on a CD-ROM. In fact, although all efforts are made to keep the book and CD-ROMs in synch, that also is nearly impossible. Unlike commercial software, which changes infrequently and under controlled conditions, Linux and related software are perpetually dynamic. ■ Because Linux is very similar to UNIX, many of the operations and procedures necessar y for using Linux also apply to many UNIX systems. By learning to use Linux, you also learn how to use most UNIX systems.
UNIX has evolved over the years to become the premier operating system used by hundreds of thousands of people throughout the world. This isn’t an accident. Earlier versions of UNIX were harder to manipulate than other operating systems, but despite this, UNIX managed to amass a distinguished following in academic and scientific circles. These professionals realized not only what a powerful, flexible, and manageable operating system UNIX was, but also its potential to be the best operating system ever. Their efforts have culminated in the UNIX of today, with its mar velous utilities, bundled with the newest communications capabilities and The UNIX of today promises again to revolutionize the personal computer industr y, and per- haps redirect the industry’s growth. UNIX has evolved from a minicomputer operating system to one that crosses all hardware platforms. There’s no reason to think that this evolution will stop. UNIX may well become the standard for what most users dream of—complete standard- ization and compatibility of all computer systems eventually, regardless of size or power. UNIX comes in several flavors from a variety of vendors, including versions for the Intel PC platforms, but most of these versions cost big bucks. Linux provides a relatively inexpensive— free if you have access to the Internet—solution to learning about UNIX-type procedures and commands, the X Windows GUI, and accessing the Internet via Linux.
Who Should Not Use This Book?
If you are a Linux kernel hacker or a UNIX guru, this book may not be your cup of tea. This book is a great resource for someone wanting to know more about Linux and UNIX who has never been involved with either operating system. However, if you know how to install Linux and maneuver around in UNIX, you may still find this book of use, particularly if you are only a UNIX user and have never had the chance to perform system administration tasks. Several sections of the book explain the finer points of system administration and how to maintain a Linux/UNIX system. Typically, a normal UNIX user is never allowed to perform these system administration tasks, but with Linux you be- come king of the hill and ruler of the system, free to do whatever you want to do! Now, if you don’t have a clue what MS-DOS is or what a floppy disk looks like, you might want to brush up on some computer basics before tackling Linux. Linux isn’t for the faint of heart— you must have some understanding of how a computer works. If the thought of repartitioning or reformatting your hard drive sends shivers down your spine, you probably should put off learning Linux for a while until you become more comfortable with your computer system.