32,99 €
* Presenting updated coverage of openSUSE 11.0 and SUSE Linux Enterprise Server 11.0, this reference is written by Novell insiders and boasts the most up-to-date information available * Topics covered include the openSUSE project, command line programs and implementing online services, virtualization, kernel updates, Enterprise Architecture, and more * Reviews Linux fundamentals such as methodologies, partitions, and file system, and features a new section devoted entirely to end-user needs * The DVD includes the openSUSE 11.0
Sie lesen das E-Book in den Legimi-Apps auf:
Seitenzahl: 1241
Veröffentlichungsjahr: 2011
Table of Contents
Title Page
Copyright
Dedication
About the Authors
Credits
Foreword
Preface
How This Book Is Structured
Conventions Used in This Book
DVD, Web Site, and Source Code
Introduction
Linux History
SUSE History
The SUSE Family of Products
Part I: SUSE Linux Basics
Chapter 1: Installing SUSE
Selecting Your Installation Method
Starting Your Installation
Installation Mode
Customizing the Installation
Running the Installation
Completing Installation
Chapter 2: Linux Fundamentals
Command Line 101: The Shell
Getting Help for Linux Commands
Working with Files and Directories
Common Administrative Tasks
Working with Software Packages
Compiling Source Packages
Connecting over the Network
Backing Up, Restoring, and Archiving Files
Chapter 3: Partitions, Filesystems, and Files
Partitions
Filesystems
Creating Filesystems
Filesystem Comparisons
Mounting Filesystems
Unmounting Filesystems
Part II: The SUSE System
Chapter 4: Booting the System
Booting Concepts
Boot Managers
Dual Booting
Troubleshooting Booting
Chapter 5: Documentation
Finding Help on Your SUSE System
Linux Documentation Project Resources
Finding Help Online
Finding Further Information
Chapter 6: Understanding Your Linux Network
Internet 101
TCP/IP
Routing
Chapter 7: Logging
The Files in /var/log
Logging with syslog
Logging with syslog-ng
Managing Your Logs with logrotate
Analyzing Your Logs with logcheck
Using Webalizer
Reading Log Files
Chapter 8: The X Window System
X Window System Concepts
Configuring X
KDE
GNOME
Other Window Managers
Xgl and Compiz
Chapter 9: Configuring the System with YaST
YaST Modules
Configuring Installation Sources
Setting Up Proxy Settings
Using NTP Time Services
Printer Configuration
Setting Up a Scanner
Boot Loader Configuration
Setting Up SCPM
Runlevel Editor
Users and Groups
Installing Additional Software with YaST
YOU—The YaST Online Update
The YaST Installation Server Module
Autoinstallation—AutoYaST
Part III: Using the Command Line in SUSE Linux
Chapter 10: Text Manipulation
Reading Lines from Files
Extracting Lines from Files
Working with Fields from Text Files
Replacing Text
Formatting Text Files for Viewing and Printing
Comparing Files
Getting Text Out of Other File Formats
Chapter 11: Text Editors
The Politics
vi/vim
emacs
Chapter 12: Working with Packages
Binary RPMs
Creating an RPM
Installation Sources
Command-Line Installation Tools
Chapter 13: Working with Files
Listing, Copying, and Moving Files
Finding Files
Looking at Files and File Types
Compressing Files
Working with Archives
Files Attributes and ACLs
Chapter 14: Working with the System
System Rescue and Repair
Working with Partitions
Working with DVDs, CDs, and Floppies
Automating Tasks
Chapter 15: Linux Networking
Configuring an IP Network
The Wonderful World of ARP
Taking Part in an IPX Network
Network Tools
Network Troubleshooting
Wireless Networking
Bluetooth
Part IV: Implementing Network Services in SUSE Linux
Chapter 16: Setting Up a Web Site with the Apache Web Server
Configuring Apache
Security
The Common Gateway Interface
Creating Dynamic Content with PHP
Configuration Using YaST
Chapter 17: Mail Servers—Postfix, Sendmail, Qpopper, and Cyrus
How Mail Is Sent and Received
Postfix
sendmail
Qpopper
Fetchmail
Cyrus IMAPD
Choosing a Mail Client
Mail Systems on Linux
Chapter 18: Setting Up Windows Interoperability with Samba
The Samba Packages
Setting Up and Using a Samba Client
Setting Up a Samba Server Using YaST
Creating and Managing the Samba Password File
Working with the Winbind Daemon
The Samba Configuration File
Using SWAT
Chapter 19: Setting Up Printing with CUPS
Setting Up a Locally Connected Printer
Documentation
Chapter 20: Configuring and Using DHCP Services
DHCP: Mode of Operation
DHCP Packages on SUSE
Setting Up a DHCP Server Using YaST
Manually Configuring a DHCP Server
Starting and Stopping DHCP Clients
Troubleshooting DHCP Clients and Servers
Chapter 21: Configuring a DNS Server
Some DNS Theory
Configuring BIND for Caching and Forwarding
Examining Record Types
Working with Zones
The Reverse Zone
Configuring a DNS Server with YaST
Chapter 22: Working with NFS
Mounting NFS Filesystems
The NFS Server
Chapter 23: Running an FTP Server on SUSE
vsftpd as an Anonymous FTP Server
Setting Up User FTP with vsftpd
Allowing Uploads
Using pure-ftpd
Further Information
Chapter 24: Implementing Firewalls in SUSE Linux
Why Use a Firewall?
Configuring a Firewall with iptables
Network Address Translation
Redirecting Traffic
Allowing ICMP Traffic
Allowing Loopback
Stopping “Too Frequent” Connections
Logging Dropped Packets
Using SuSEfirewall2
Chapter 25: Network Information and Directory Services
Using NIS for Authentication
Working with LDAP in SUSE
What Is LDAP?
Implementing the LDAP Server
Pluggable Authentication Modules
Integrating LDAP into Linux
Setting the ACL on the LDAP Server
How Can LDAP Help You?
Chapter 26: Setting Up a Web Proxy with Squid
Getting Started with Squid on SUSE
User Authentication
Restricting Access by Hardware Address
The Squid Log
Using Squid as a Transparent Proxy
Using Cache Manager
Using squidGuard
Part V: SUSE Linux in the Enterprise
Chapter 27: Enterprise Architecture
A Typical Organization
Linux Enterprise Hardware: The Big Players
Putting It All Together
Chapter 28: Emulation and Virtualization
Emulation Versus Virtualization
DOS Emulation Using dosemu and dosbox
Running Microsoft Windows Applications with Wine
The bochs PC Emulator
Virtual Machines Using QEMU
VMware Virtual Machines
VirtualBox
The Xen Hypervisor
Other Emulators
Chapter 29: The Kernel
Why You Probably Don't Need This Chapter
Why You Might Need This Chapter
SUSE Kernels and Vanilla Kernels
Upgrading a Kernel Package
Kernel Configuration
Building the Kernel
Kernel Module Packages and Third-Party Software
Kernel Parameters at Boot Time
The Initial Ramdisk
Chapter 30: Business Desktop Linux: SLED
The Technical Background
The Stubborn Applications
Other Commercial Desktop Distributions
Other Approaches
SLD, NLD, and SLED
The Future of SLED and the Linux Desktop
For More Information
Appendix A: What's on the DVD
System Requirements
What's on the DVD
Troubleshooting
Index
GNU General Public License
Preamble
Terms and Conditions for Copying, Distribution and Modification
Advertisement
OpenSUSE® 11.0 and SUSE® Linux® Enterprise Server Bible
Published by
Wiley Publishing, Inc.
10475 Crosspoint Boulevard
Indianapolis, IN 46256
www.wiley.com
Copyright © 2008 by Wiley Publishing, Inc., Indianapolis, Indiana
Published simultaneously in Canada
ISBN: 978-0-470-27587-0
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) 646-8600. Requests to the Publisher for permission should be addressed to the Legal Department, Wiley Publishing, Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4355, 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 (800) 762-2974, outside the U.S. at (317) 572-3993 or fax (317) 572-4002.
Library of Congress Cataloging-in-Publication Data:
Whittaker, Roger, 1955-
OpenSUSE 11.0 and SUSE Linux enterprise server bible / Roger Whittaker, Justin Davies.
p. cm.
Includes index
ISBN 978-0-470-27587-0 (paper/dvd)
1. Linux. 2. Operating systems (Computers) I. Davies, Justin, 1979- II. Title.
QA76.76.O63W488 2008
005.4′32 —dc22
2008014649
Trademarks: Wiley, the Wiley logo, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc., in the United States and other countries, and may not be used without written permission. OpenSUSE and SUSE are registered trademarks of Novell, Inc. Linux is a registered trademark of Linus Torvalds. All other trademarks are the property of their respective owners. Wiley Publishing, Inc., is not associated with any product or vendor mentioned in this book.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books.
To Shekufeh and Golnaz, who tolerate all this—Roger Whittaker
To my wife, Aimee—Justin Davies
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
My Brothers and Sisters,
Should we accept that this book is indeed a Bible? Let us use a dictionary to see what the definition of a Bible is.
The first definition is marked obsolete, and just means “a book.” I think that anyone would agree that this tome is a Bible by that definition.
The second definition is the one that most know, “The Book by way of eminence…accepted as of divine authority and origin.” Well, Linux has long been known for its gurus who hand out small snippets of sage advice. Sometimes that sage advice is in many books, and beginners are often told RTFM (Read The Freaking Manual). Easy enough for the guru to say, but when there are so many manuals, HOWTOs, and other pieces of information scattered about, how do you put it all together?
Therefore, a Bible is necessary. Let's hope it carries information pertinent to your own religion, or in this case, distribution. If the Bible tries to cover the information in every distribution, the reader may become lost. That is why this is a SUSE Linux Bible, and not some other brand of Linux.
Some people say that Linux and Free and Open Source (FOSS) are a religion, and that the people that support it are religious zealots. I don't think that is true, for the people I know in FOSS are multifaceted. But when it comes to programming, we believe that Linux and FOSS offer education, government, and business the most flexible, most powerful, and lowest cost solution. All you have to do is reach out and accept that fact.
Like any good religion you have to practice it, study it, and really understand what is being said to you. You also have to apply it to your life. Look for ways in your life that this software can help you, whether to organize your life or your business better.
Many people think that Total Cost of Ownership (TCO) is simply made up of the cost of the hardware, software, and services of the solution you pick. How naive. Total Cost of Ownership is also made up of the cost of not picking a better solution, one that is flexible enough for you to solve 99 percent of your problems instead of 80 percent of your problems. How much does it cost you not to be able to solve that 19–20 percent?
The Freedom that you get when you use FOSS is the key to this savings, or (in reverse) the additional earning power. To be able to fully tailor the software to meet your needs is the greatest value of FOSS. But you can't do this without knowledge.
This is where this Bible comes in, to give you the knowledge to go out and explore further.
So, my brothers and sisters, throw off the shackles of proprietary software and learn how to make software do what you want it to do. Open the pages of this Bible and see your life change. Welcome to the bright side of “The Force.”
Carpe Diem!
Jon “maddog” Hall
President, Linux International
Preface
Welcome to the OpenSUSE 11.0 and SUSE Linux Enterprise Server Bible! This book is for anyone who is interested in running a SUSE Linux system—at home or at work, “for fun or for profit.” It covers the all the currently available versions from SUSE: the brand new openSUSE 11.0 and the current versions of the SUSE Linux Enterprise Server (SLES) and the SUSE Linux Enterprise Desktop (SLED). Most of the content applies equally to earlier versions also, however.
The book aims to supplement the documentation provided by SUSE and to show the reader how best to carry out a particular task on a SUSE system, making full use of SUSE's configuration utilities. Many Linux books and “howto” documents provide generic instructions for carrying out particular tasks; however, it often turns out that these are either incorrect in details or unnecessarily complicated when applied to a particular distribution. In this book we aim to describe the best ways to work with SUSE in a wide variety of situations, making full use of SUSE's specific configuration tools.
Too often, computer books tend to be written only from the standpoint of “how to” perform a task and fail to provide a real understanding of the underlying principles. Our aim in this book is to combine a description of the steps necessary to perform a particular task with a real understanding of what is being done.
While we discuss the use of SUSE Linux in enterprise applications, with examples based on our own consulting experience, the book is also for home users coming to grips with Linux for the first time. In short, we aim for OpenSUSE 11.0 and SUSE Linux Enterprise Server Bible to be what you need to run your SUSE Linux system, whatever your situation might be.
How This Book Is Structured
We've organized this book into five parts:
Part I: SUSE Linux Basics: This part introduces SUSE Linux by describing the installation of a SUSE system and discussing the fundamental concepts of Linux.Part II: The SUSE System: This part describes the use of YaST for system configuration; explains Linux networking, system logs, and the X Window system; and helps you to find further documentation.Part III: Using the Command Line in SUSE Linux: This part covers the power of the Linux command line, with chapters covering text editing and tools for manipulating text files, as well as package maintenance and advanced networking.Part IV: Implementing Network Services in SUSE Linux: This part describes the setup of the major network services on a SUSE system, including setting up web servers, mail servers, and file and print servers.Part V: SUSE Linux in the Enterprise: This part describes the place of SUSE Linux in the modern enterprise and covers the use of storage area networks (SANs). The configuration of the kernel is also covered, and SLED is discussed.Conventions Used in This Book
Throughout the book, special typeface indicates code or commands. Commands and code are shown in monospace type:
This is how code looks.
Additionally, the following icons are used to call your attention to points that are particularly important.
Caution
A Caution warns you to be careful when executing a procedure or you could damage your computer hardware or software.
Cross-Ref
A Cross-Reference refers you to further information on a subject that you can find outside the current chapter.
Note
A Note provides extra information to which you need to pay special attention.
Tip
A Tip shows a special way of performing a particular task or introduces a shortcut to ease your way.
We hope you enjoy working with your SUSE Linux system as much as we enjoy working with ours, and we know that OpenSUSE 11.0 and SUSE Linux Enterprise Server Bible will be an invaluable tool to help you get the most out of it.
DVD, Web Site, and Source Code
This book comes with a DVD containing a full copy of openSUSE 11.0. Additionally, check out this book's web site at www.wiley.com/go/opensuse11bible for an RPM of logcheck, a useful log analysis tool that is not included in the SUSE distribution but is discussed in Chapter 7. Finally, to obtain the openSUSE 11.0 source code, go to http://download.opensuse.org/distribution/11.0/repo/src-oss/suse/src/.
Introduction
What is Linux? There was a time (not so long ago) when the first page of every book and the first slide of every presentation on Linux had this obligatory question. We have come a long way since that time, and we certainly no longer feel that we have to start our own presentations with that slide. However, in a book like this, a brief introduction to Linux in general can provide an appropriate entry into our discussion of SUSE Linux in particular.
Linux is a multiuser, multitasking, multiplatform computer operating system (strictly speaking, an operating system kernel) that has been developed by an open source, collaborative process involving large numbers of people all over the world. Linux is a Unix-like operating system. This means that it conforms closely to a set of conventions and standards associated with Unix; however, Linux does not contain any of the original Unix code.
Linux has been developed using the open source development model. What that means is that all the work that is done by Linux developers is open and shared. It is open to peer review, which encourages honesty and means that each developer is able to build upon work that has already been done by others. Although this method is often still seen as revolutionary in the field of software development, it is effectively the same method that has been used by science in the Western world since about the time of Newton. The development of Western science has been spectacularly successful precisely because it is based on the same values of openness and shared results and because of the quality assurance provided by the scrutiny of peer review.
This model works so well both in science and software because openness leads to scrutiny, and scrutiny leads to improvement and the correction of errors. Openness also means the ability to build on the results of others. Newton himself said that if he saw further than others, it was “by standing upon the shoulders of giants.” This sums up very well the power of collaborative development in any field. It contrasts strongly with the traditional closed source development model: a group of programmers working in secrecy with deadlines for work to be handed to a manager. In such a situation, a team member who knows that his work has a bug in it has no incentive to tell anyone; when the program is finally released, no one outside the small development group can look at the code to understand why it does not work as advertised. In contrast, Eric Raymond coined a phrase to describe the power of having a large open source developer community to debug code: “Given enough eyeballs, all bugs are shallow.”
The dramatic success of Linux and of other associated open source projects such as the Apache web server and Samba is proof of the power of the open source development method.
Linux has come a long way since its beginnings in the early 1990s. In 1991, it was one man's hobby: Ten years later, in 2001, IBM announced that it was investing one billion dollars in its Linux strategy. As I write this at the end of 2007, Linux is a major player in the operating systems market, and making news every day in the world of IT.
Linux History
The beginning of Linux is usually dated to August 25, 1991, the date on which Linus Torvalds sent a posting to the comp.os.minix newsgroup describing the work he had done so far. He subsequently invited others to join the project, made the code available by FTP, and offered it under a license allowing free redistribution (originally a license that he wrote himself, but soon afterward moved to the GNU GPL).
A worldwide community quickly arose, working on the Linux kernel and submitting code and patches back to Torvalds to be incorporated into the kernel. As time went on, the number of people working on Linux grew rapidly, and systems were put in place to filter and channel the incoming code; however, Linus Torvalds has stayed in charge of the whole project, which has remained independent of any particular vendor.
The remarkable rate at which Linux grew and matured is well known: Linux is compelling proof of the power of the open source development model.
Both the history of Linux and descriptions of the workings of open source development are described in many other publications. Glyn Moody's has a very good history of Linux and the open source movement generally. The classic exposition of why and how the open source development model works so well is in Eric S. Raymond's .
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!