I

About the Authors

After working as a teacher of Mathematics and as Deputy Head of an independent school in London, Roger Whittaker discovered Linux in 1996 and became increasingly interested (some would say obsessed). When SUSE Linux opened its UK office in 1999, he changed careers and worked as a technical and training consultant until early in 2004. He now works for Novell supporting Linux installations for large customers. He is Newsletter Editor for UKUUG, the UK's Unix and Open Systems user group.

Justin Davies has been a Linux user since the age of 15. After University, he joined SUSE Linux as a Technical Consultant where he specialized in Linux on non-Intel architecture. He then spent time working with value-added resellers in Europe to define their open source strategy and go-to-market plans around Linux. He is now the founder and CTO of Ninetyten, a social networking consultancy based in London, where he is still providing solutions based on open source software.

Credits

Acquisitions Editor

Jenny Watson

Development Editor

Gus A. Miklos

Senior Development Editor

Kevin Kent

Technical Editor Warren E. Wyrostek

Production Editor

Daniel Scribner

Copy Editor Nancy Rapoport

Editorial Manager

Mary Beth Wakefield

Production Manager

Tim Tate

Vice President and Executive Group Publisher

Richard Swadley

Vice President and Executive Publisher

Joseph B. Wikert

Project Coordinator, Cover

Lynsey Stanford

Proofreader

Josh Chase, Word One

Indexer

Ron Strauss

Foreword xxix

Preface xxxi

Introduction xxxiii

Part I: SUSE Linux Basics

Chapter 1: Installing SUSE 3

Chapter 2: Linux Fundamentals 47

Chapter 3: Partitions, Filesystems, and Files 77

Part II: The SUSE System

Chapter 4: Booting the System 109

Chapter 5: Documentation 139

Chapter 6: Understanding Your Linux Network 159

Chapter 7: Logging 175

Chapter 8: The X Window System 193

Chapter 9: Configuring the System with YaST 225

Part III: Using the Command Line in SUSE Linux

Chapter 10: Text Manipulation 269

Chapter 11: Text Editors 297

Chapter 12: Working with Packages 319

Chapter 13: Working with Files 347

Chapter 14: Working with the System 379

Chapter 15: Linux Networking 411

Part IV: Implementing Network Services in SUSE Linux

Chapter 16: Setting Up a Web Site with the Apache Web Server 447

Chapter 17: Mail Servers — Postfix, Sendmail, Qpopper, and Cyrus 469

Chapter 18: Setting Up Windows Interoperability with Samba 503

Chapter 19: Setting Up Printing with CUPS 521

Chapter 20: Configuring and Using DHCP Services 541

Chapter 21: Configuring a DNS Server 559

Chapter 22: Working with NFS 577

Chapter 23: Running an FTP Server on SUSE 589

Chapter 24: Implementing Firewalls in SUSE Linux 601

Chapter 25: Network Information and Directory Services 621

Chapter 26: Setting Up a Web Proxy with Squid 647

Part V: SUSE Linux in the Enterprise

Chapter 27: Enterprise Architecture 659

Chapter 28: Emulation and Virtualization 685

Chapter 29: The Kernel 713

Chapter 30: Business Desktop Linux: SLED 729

Appendix A: What's on the DVD 737

Index 739

Foreword xxix

Preface xxxi

Introduction xxxiii

Part I: SUSE Linux Basics

Chapter 1: Installing SUSE 3

Selecting Your Installation Method 4

Starting Your Installation 5

Selecting Boot Options 6

Configuring Language Settings 8

Installation Mode 11

Customizing the Installation 12

Selecting Your Desktop Environment 13

Partitioning Your Disks 14

Resizing Existing Operating System Partitions 16

Primary and Extended Partitions 17

Defining Filesystems 18

Creating a User 23

Installation Settings 24

Customizing Your Installation 24

Selecting Software for Installation 25

Selecting a Boot Loader 28

Changing the Default Runlevel 31

Running the Installation 32

Configuring Your Network Access 33

Testing Your Connection and Online Updates 38

Configuring Your Modem 39

ISDN and ADSL Connections 40

Cable Modem Connections 41

Wireless Networking 41

User Management 41

SuSEconfig 42

Reviewing the Release Notes 42

Configuring Your Hardware 43

Completing Installation 45

Chapter 2: Linux Fundamentals 47

Command Line 101: The Shell 48

Commonly Used Shell Features 49

Advanced Shell Features 49

Getting Help for Linux Commands 55

Working with Files and Directories 56

Listing Files 56

Copying Files 57

Moving and Renaming Files 57

Deleting Files and Directories 58

Changing Directories 58

Making Directories 58

Removing Directories 59

Making Links to Files or Directories 59

Concatenating Files 59

Viewing Files with more and less 60

Viewing the Start or End of Files 60

Searching Files with grep 60

Finding Files with find and locate 61

Editing Text with vi and emacs 61

Common Administrative Tasks 62

Basic User and Group Concepts 62

Creating Users and Groups 63

Working with File Ownership and Permissions 64

Configuring User Preferences 67

Mounting and Unmounting Filesystems 68

Working with Software Packages 69

Checking What's Installed 70

Examining RPM Packages 70

Extracting Files from Packages 71

Working with Source RPMs 72

Compiling Source Packages 72

Connecting Over the Network 73

Backing Up, Restoring, and Archiving Files 74

Creating and Reading Simple Archives 75

Creating an ISO Image to Burn to CD 76

Chapter 3: Partitions, Filesystems, and Files 77

Partitions 77

Types of Partitions 78

Creating Partitions 80

Updating a Disk's Partition Table 85

Changing Partition Types 85

Logical Volume Management 86

Filesystems 87

EXT2 89

EXT3 89

ReiserFS 89

JFS 90

XFS 91

VFAT/NTFS 91

Creating Filesystems 92

Creating an EXT2 Filesystem 93

Creating an EXT3 Filesystem 94

Upgrading an EXT2 Filesystem to an EXT3 Filesystem 95

Creating a ReiserFS Filesystem 96

Filesystem Comparisons 97

Mounting Filesystems 98

Mount Options 99

Mounting Filesystems Automatically 104

Unmounting Filesystems 105

Part II: The SUSE System

Chapter 4: Booting the System 109

Booting Concepts 109

Runlevels 114

Switching Runlevels Manually 115

Using chkconfig to Control Runlevels 118

Customizing Runlevels for Different Types of Systems 119

Boot Managers 120

LILO 120

GRUB 122

Getting Out of Trouble with GRUB 126

Dual Booting 128

Installing Windows and Linux on a New System 128

Installing Linux on an Existing Windows System 129

Manually Partitioning an Existing Windows System 130

Sharing Data on Windows and Linux Partitions 132

Troubleshooting Booting 133

Fixing Boot Problems Using Runlevels 133

The SUSE Rescue System 135

Chapter 5: Documentation 139

Finding Help on Your SUSE System 139

The SUSE Manuals 140

Man Pages 141

Info Pages 144

The KDE Help Center 146

/usr/share/doc/packages/ 146

Other Documentation Packages 147

Linux Documentation Project Resources 148

FAQs 148

HOWTOs 149

Linux Documentation Project Guides 149

The SUSE Books Package 150

Finding Help Online 151

The openSUSE Web Site 151

The Novell Customer Center 152

openSUSE Public Mailing Lists 153

The Unofficial SUSE FAQ 153

Other Unofficial SUSE Help Sites 153

Other SUSE Documents 154

Topic-Specific Sites 154

Finding Software 156

IBM 156

Other Distributions 157

News Sites 157

IRC 157

Local User Groups 157

Finding Further Information 157

Chapter 6: Understanding Your Linux Network 159

Internet 101 160

TCP/IP 161

The ISO OSI Model 161

The DoD Model 165

IP Addresses 165

Routing 172

Chapter 7: Logging 175

The Files in /var/log 176

Logging with syslog 177

Logging with syslog-ng 181

The Log Source 182

The Filter 182

The Log Destination 183

The Log Definition — Tying It All Together 183

Managing Your Logs with logrotate 184

Analyzing Your Logs with logcheck 186

Using Webalizer 188

Reading Log Files 190

Chapter 8: The X Window System 193

X Window System Concepts 194

Window Managers 194

KDE and GNOME 195

Configuring X 196

Getting Hardware Information 196

Using sax2 197

Framebuffer Graphics 198

Accessing Framebuffer Graphics After Installation 200

If X Still Doesn't Start 201

Switching Resolutions 201

Switching to a Text Console 201

Copy and Paste in X 201

User Preferences in X 202

Using X Remotely 202

Diskless X Terminals 207

KDE 208

Konqueror 209

The KDE Control Center 211

KDE Applications 212

GNOME 213

Nautilus 215

Firefox 215

Evolution 215

Gnucash 215

AbiWord 216

Gnumeric 216

Other Window Managers 216

FVWM2 217

Blackbox 217

IceWM 218

XFCE 218

Window Maker 218

Xgl and Compiz 219

Setting Up Desktop Effects 222

Chapter 9: Configuring the System with YaST 225

YaST Modules 228

Configuring Installation Sources 234

Setting Up Proxy Settings 237

Using NTP Time Services 237

Printer Configuration 239

Setting Up a Scanner 242

Boot Loader Configuration 243

Setting Up SCPM 245

Runlevel Editor 247

Users and Groups 248

Adding or Editing Users 249

Adding or Editing Groups 252

Installing Additional Software with YaST 253

YOU — The YaST Online Update 255

YOU on SUSE Professional and on SLES 255

opensuse-updater 256

The YaST Online Update Module 257

YOU Dangers 258

The YaST Installation Server Module 258

Setting Up an Installation Server 258

Installing from the Installation Server 260

Autoinstallation — AutoYaST 261

Principles 262

Mode of Operation 262

The YaST Autoinstallation Module 263

Using Pre-Install, chroot, and Post-Install Scripts 265

Further Information 266

Part III: Using the Command Line in SUSE Linux

Chapter 10: Text Manipulation 269

Reading Lines from Files 270

cat 270

tac 272

zcat 272

head 272

tail 272

expand 273

nl 273

uniq 274

sort 274

Extracting Lines from Files 275

grep 275

zgrep 278

grepmail 278

sgrep 279

split 280

csplit 280

Working with Fields from Text Files 281

cut 282

paste 282

join 283

awk 283

wc 285

Replacing Text 285

sed 286

tr 287

dos2unix and unix2dos 288

Formatting Text Files for Viewing and Printing 289

pr 289

fold 289

fmt 290

groff-Tascii 290

a2ps 290

enscript 291

Comparing Files 291

cmp 291

diff and patch 292

Getting Text Out of Other File Formats 293

antiword 294

ps2ascii 294

pdftotext 294

ps2pdf 295

dvi2tty 295

detex 295

acroread and xpdf 296

html2text 296

strings 296

Chapter 11: Text Editors 297

The Politics 298

vi/vim 298

Using Command Mode 300

Moving Around the Text 300

Deleting Text 302

Copying and Pasting 304

Inserting and Saving Files 305

Searching and Replacing 305

Using the vim Initialization File 306

Exiting vim 307

emacs 307

What to Install 308

Starting emacs 308

Controlling emacs 310

Using Word Completion 311

Using Command Completion and History 312

emacs Modes 312

Using the Calendar 314

Customizing emacs 315

More Information 318

Chapter 12: Working with Packages 319

Binary RPMs 320

Installing an RPM 320

Querying RPM Packages 322

Removing Installed Packages 324

Verifying an RPM 325

Creating an RPM 327

Distribution RPMs 327

Source Code 327

The RPM Environment 328

The Spec File 329

Compiling an RPM from the Spec File 334

Checking the Finished RPM 336

Installation Sources 337

YaST's Installation Sources Module 338

1-Click Installation 340

Command-Line Installation Tools 343

Chapter 13: Working with Files 347

Listing, Copying, and Moving Files 347

The Command-Line Tools 347

File Managers 352

Finding Files 354

Using find 354

Using locate 354

Using Konqueror to Find Files 355

Finding Files in GNOME 356

Finding Files in mc 356

Finding Files by Content: Beagle 357

Looking at Files and File Types 358

The file Command 358

strings, ghex, khexedit, and antiword 359

Viewing and Opening Different File Types and Formats 360

Compressing Files 367

Working with Archives 369

Working with tar Archives 369

Working with cpio Archives 371

Working with zip Archives 372

Unpacking RPM Packages 372

Using pax 372

Using ark 373

Files Attributes and ACLs 374

File Attributes 374

File ACLs 376

Chapter 14: Working with the System 379

System Rescue and Repair 379

Booting from the Hard Disk with Special Boot Parameters 380

Booting into the Rescue System 380

Booting into YaST System Repair Mode 381

Working with Partitions 385

Partitioning Examples 386

Making a Filesystem 391

Working with DVDs, CDs, and Floppies 392

Creating and Using Images of Existing Disks 392

Creating and Using New Disk Images 393

Creating ISO CD and DVD Images 394

Burning CDs from the Command Line 395

Burning CDs and DVDs Using k3b 395

Automating Tasks 396

Shell Aliases 397

Writing Shell Scripts 397

Scripting Languages 405

Chapter 15: Linux Networking 411

Configuring an IP Network 412

ifconfig 412

Setting Up Your Routes 416

Using iproute2 419

The Wonderful World of ARP 422

Taking Part in an IPX Network 423

Network Tools 424

Using Telnet 425

Using SSH 427

rsync 431

wget 432

Tracing Packets on the Network 433

Network Troubleshooting 435

ping 435

traceroute 436

Wireless Networking 436

ndiswrapper 437

Configuring Your Wireless Network 439

Bluetooth 441

Part IV: Implementing Network Services in SUSE Linux

Chapter 16: Setting Up a Web Site with the Apache Web Server 447

Configuring Apache 448

Apache Packages in SUSE 448

Starting Apache for the First Time 448

The Apache Configuration Files 450

Global Directives 451

Main Server 453

Virtual Hosts 454

Security 456

Setting Up User Access 457

Setting Up Group Access 458

The Common Gateway Interface 459

Creating Dynamic Content with PHP 462

Configuration Using YaST 464

Chapter 17: Mail Servers — Postfix, Sendmail, Qpopper, and Cyrus . . . 469

How Mail Is Sent and Received 470

Testing an MTA from the Command Line 470

Postfix 472

Postfix Configuration 473

Postfix Terminology and Use 481

Stopping Spam 486

sendmail 487

Installing sendmail 487

Configuring sendmail 488

Starting sendmail 492

Getting More Information About sendmail 493

Qpopper 493

Fetchmail 495

Cyrus IMAPD 496

Configuring the Cyrus User 497

Adding Users to Cyrus 497

Creating a Shared Mailbox 498

Integrating Cyrus and Postfix 499

Setting an Alias for Root's Mail in Cyrus 500

Choosing a Mail Client 500

The Command-Line Clients 500

The Graphical Mail Clients 501

Mail Systems on Linux 502

Chapter 18: Setting Up Windows Interoperability with Samba 503

The Samba Packages 504

Setting Up and Using a Samba Client 505

Using a Windows Printer from Linux 508

Setting Up a Samba Server Using YaST 511

Creating and Managing the Samba Password File 515

Working with the Winbind Daemon 516

The Samba Configuration File 517

Using SWAT 519

Chapter 19: Setting Up Printing with CUPS 521

Setting Up a Locally Connected Printer 523

Printers Not Listed by YaST 526

Unsupported Printers 526

Printing from Applications 526

Printing from the Command Line 527

Canceling a Print Job from the Command Line 528

Setting Up a Simple Print Server on the Local Network 529

Setting Up a Windows Client to Print to the CUPS Server 531

Printing from Linux to Other Types of Remote Printers 532

Using the CUPS Web Interface 533

The CUPS Command-Line Tools and Configuration Files 536

The CUPS Logs 538

Other Tools 539

Documentation 539

CUPS Online Documentation 539

The CUPS Book 539

SUSE Printing Documentation 539

IPP Documentation 540

Chapter 20: Configuring and Using DHCP Services 541

DHCP: Mode of Operation 541

DHCP Packages on SUSE 542

Setting Up a DHCP Server Using YaST 542

Using the YaST DHCP Server Wizard 543

Reconfiguring an Existing DHCP Server in YaST 546

Manually Configuring a DHCP Server 549

IP Address Ranges 549

Assigning a Default Gateway 549

Configuring Name Services 550

Configuring Fixed Addresses 550

Other Options 550

Defining Host Groups 551

Specifying Leases 551

Other DHCP Options 552

Starting and Stopping DHCP Clients 552

Troubleshooting DHCP Clients and Servers 553

Troubleshooting DHCP Clients 553

Troubleshooting DHCP Servers 555

Chapter 21: Configuring a DNS Server 559

Some DNS Theory 559

Top-Level Domains 560

How Does a DNS Search Work? 560

Caching 561

Configuring BIND for Caching and Forwarding 561

Using dig 562

Using host 563

Examining Record Types

Was this article helpful?

0 0

Post a comment