Tải bản đầy đủ (.pdf) (714 trang)

IT training apress the definitive guide to SUSE linux enterprise server dec 2006

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (21.28 MB, 714 trang )

CYAN
MAGENTA

YELLOW
BLACK
PANTONE 123 CV

BOOKS FOR PROFESSIONALS BY PROFESSIONALS ®

THE EXPERT’S VOICE ® IN OPEN SOURCE
Covers
SUSE Linux
Enterprise 10!

Companion eBook Available

The Definitive Guide to SUSE
Linux Enterprise Server

Author of

Pro Novell Open
Enterprise Server

You hold in your hands the only book you need about SUSE Linux Enterprise
Server, regardless of whether you are a beginner or you already have extensive
experience with any Linux distribution. In this book, you’ll learn everything
you need to know in order to install, configure, and manage SUSE Linux
Enterprise Server 10 on a day-to-day basis.
I wrote this book with the goal of it being a complete guide that will let you
immediately configure any of the most important services that SUSE Linux


Enterprise Server 10 has to offer. It was my goal to be complete and clear, thus
serving both novice and advanced users.
The book starts by covering all the aspects of installation and then moves on
to explore the graphical interface. I then explain how to set up the staples of a
strong enterprise server system, such as e-mail, DNS, and the Web. In addition,
you’ll find coverage of advanced topics such as Heartbeat cluster configuration,
OCFS2 configuration, Xen virtualization, AppArmor application security, and
performance optimization.
Whether you’re installing your first SUSE Linux server or are interested in
expanding your knowledge, this is the book for you!
Sander van Vugt

THE APRESS ROADMAP
From Bash to Z Shell:
Conquering the
Command Line
Beginning Ubuntu Linux:
From Novice to Professional

Pro OpenSSH
Shell Scripting Recipes:
A Problem-Solution
Approach

The Definitive Guide to
SUSE Linux
Enterprise Server

Hardening Linux


Companion eBook

Beginning SUSE Linux:
From Novice to Professional,
Second Edition

Pro DNS and BIND

SUSE Linux
Enterprise Server

Dear Reader,

The Definitive
Guide to

The Definitive Guide to

SUSE Linux
Enterprise Server
Everything you need to know to install, configure, and
administer Novell’s SUSE Linux Enterprise Server platform!

See last page for details
on $10 eBook version

ISBN 1-59059-708-7

Sander van Vugt


90000

www.apress.com
Shelve in
Operating Systems/Linux

van Vugt
6

89253 59708

8

9 781590 597088

User level:
Intermediate–Advanced

this print for content only—size & color not accurate

7" x 9-1/4" / CASEBOUND / MALLOY


7087fmfinal.qxd

11/8/06

10:55 PM

Page i


The Definitive Guide
to SUSE Linux
Enterprise Server

Sander van Vugt


7087fmfinal.qxd

11/8/06

10:55 PM

Page ii

The Definitive Guide to SUSE Linux Enterprise Server
Copyright © 2006 by Sander van Vugt
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means,
electronic or mechanical, including photocopying, recording, or by any information storage or retrieval
system, without the prior written permission of the copyright owner and the publisher.
ISBN-13: 978-1-59059-708-8
ISBN-10: 1-59059-708-7
Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1
Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence
of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark
owner, with no intention of infringement of the trademark.
The Novell logo is a registered trademark and the Gecko graphic element is a trademark of Novell, Inc.
in the United States and other countries; logo usage in this publication has been approved by Novell.
Lead Editors: Jason Gilmore and Keir Thomas

Technical Reviewer: Rob Bastiaansen
Editorial Board: Steve Anglin, Ewan Buckingham, Gary Cornell, Jason Gilmore, Jonathan Gennick,
Jonathan Hassell, James Huddleston, Chris Mills, Matthew Moodie, Dominic Shakeshaft, Jim Sumser,
Keir Thomas, Matt Wade
Project Manager: Denise Santoro Lincoln
Copy Edit Manager: Nicole Flores
Copy Editor: Kim Wimpsett
Assistant Production Director: Kari Brooks-Copony
Production Editor: Ellie Fountain
Compositor: Linda Weidemann, Wolf Creek Press
Proofreader: Elizabeth Berry
Indexer: Julie Grady
Artist: Kinetic Publishing Services, LLC
Cover Designer: Kurt Krames
Manufacturing Director: Tom Debolski
Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor,
New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail ,
or visit .
For information on translations, please contact Apress directly at 2560 Ninth Street, Suite 219, Berkeley,
CA 94710. Phone 510-549-5930, fax 510-549-5939, e-mail , or visit .
The information in this book is distributed on an “as is” basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any
liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly
or indirectly by the information contained in this work.


7087fmfinal.qxd

11/8/06

10:55 PM


Page iii

This book is dedicated to my oldest son, Franck.
Alex, the next one will be yours.


7087fmfinal.qxd

11/8/06

10:55 PM

Page iv

Contents at a Glance

About the Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
About the Technical Reviewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxvii
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxix

PART 1

Getting Familiar with SUSE Linux
Enterprise Server

■CHAPTER 1

Installing SUSE Linux Enterprise Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3


■CHAPTER 2

Exploring SUSE Linux Enterprise Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

■CHAPTER 3

Managing SUSE Linux Enterprise Server with YaST . . . . . . . . . . . . . . . . . . . 49

■CHAPTER 4

Finding Your Way on the Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

PART 2

iv

■■■

■■■

Administering SUSE Linux
Enterprise Server

■CHAPTER 5

Managing Users and Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91

■CHAPTER 6


Managing Linux Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

■CHAPTER 7

Performing Daily File System Management Tasks . . . . . . . . . . . . . . . . . . . 125

■CHAPTER 8

Configuring Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139

■CHAPTER 9

Managing Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165

■CHAPTER 10

Managing the Boot Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179

■CHAPTER 11

Managing Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203

■CHAPTER 12

Using System Logging. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215


7087fmfinal.qxd

11/8/06


PART 3

10:55 PM

■■■

Page v

Networking SUSE Linux
Enterprise Server

■CHAPTER 13

Connecting to the Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231

■CHAPTER 14

Configuring a CUPS Print Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267

■CHAPTER 15

Sharing Files with SUSE Linux Enterprise Server . . . . . . . . . . . . . . . . . . . . 285

■CHAPTER 16

Configuring a Mail Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317

■CHAPTER 17


Working with OpenLDAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341

■CHAPTER 18

Enabling Remote Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369

■CHAPTER 19

Configuring xinetd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383

■CHAPTER 20

Configuring SUSE Linux Enterprise Server As an NTP Time Server . . . . 393

■CHAPTER 21

Managing Cryptography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401

■CHAPTER 22

Configuring the Apache Web Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419

■CHAPTER 23

Configuring DNS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437

■CHAPTER 24

Configuring a DHCP Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461


■CHAPTER 25

Configuring the Squid Web Proxy Cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479

■CHAPTER 26

Understanding the Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493

■CHAPTER 27

Introducing Shell Scripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503

■CHAPTER 28

Tuning and Optimizing SUSE Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527

PART 4

■■■

Advanced SUSE Linux
Enterprise Server Configuration

■CHAPTER 29

Configuring SUSE Linux Enterprise Server 10
for High-Availability Clustering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543

■CHAPTER 30


Managing Access with the SUSE Firewall . . . . . . . . . . . . . . . . . . . . . . . . . . . 573

■CHAPTER 31

Using Xen to Create a Virtual Environment . . . . . . . . . . . . . . . . . . . . . . . . . . 593

■CHAPTER 32

Using AppArmor to Secure Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609

■CHAPTER 33

Configuring Service Location Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621

■CHAPTER 34

Troubleshooting SUSE Linux Enterprise Server . . . . . . . . . . . . . . . . . . . . . . 631

■CHAPTER 35

Creating an Installation Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 647

■INDEX

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 663

v


7087fmfinal.qxd


11/8/06

10:55 PM

Page vi


7087fmfinal.qxd

11/8/06

10:55 PM

Page vii

Contents

About the Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
About the Technical Reviewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxvii
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxix

PART 1
■CHAPTER 1

■■■

Getting Familiar with
SUSE Linux Enterprise Server


Installing SUSE Linux Enterprise Server . . . . . . . . . . . . . . . . . . . . . . . 3
Meeting the Installation Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Starting the Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Preparing the Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Selecting What to Install . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Configuring the Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

■CHAPTER 2

Exploring SUSE Linux Enterprise Server . . . . . . . . . . . . . . . . . . . . . . 29
Logging In . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Exploring the Linux User Accounts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Working with Virtual Consoles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Getting Administrative Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Finding Your Way in the File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Exploring the Default Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Performing Essential Tasks in the File System . . . . . . . . . . . . . . . . . . . . . . . 38
Working with the GNOME Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Using the GNOME Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Working with More Applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Modifying the GNOME Desktop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Adding Items to the Desktop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Changing the Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Modifying Other Desktop Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

vii



7087fmfinal.qxd

viii

11/8/06

10:55 PM

Page viii

■CONTENTS

■CHAPTER 3

Managing SUSE Linux Enterprise Server with YaST . . . . . . . . . 49
Exploring YaST Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
The Software Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
The Hardware Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
The System Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Network Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Network Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Novell AppArmor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Security and Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Miscellaneous Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Working with YaST and Its Configuration Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Working with YaST Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

■CHAPTER 4


Finding Your Way on the Command Line . . . . . . . . . . . . . . . . . . . . . 73
Working with the Bash Shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Making the Most of Bash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Knowing the Important Key Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Working with the Bash History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Performing Basic File System Management Tasks . . . . . . . . . . . . . . . . . . . . . . . . 76
Working with Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Working with Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Viewing the Content of Text Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Creating Empty Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Using Piping and Redirection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Using Piping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Using Redirection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Finding Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Working with an Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Exploring the vi modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Saving and Quitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Cutting, Copying, and Pasting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Deleting Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Getting Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Using man to Get Help. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Using the --help Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Learning More About Installed Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87


7087fmfinal.qxd

11/8/06


10:55 PM

Page ix

■CONTENTS

PART 2
■CHAPTER 5

■■■

Administering SUSE Linux
Enterprise Server

Managing Users and Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Managing Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Using Commands for User Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Assigning Users to Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Managing the UID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Setting a Default Shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Managing Passwords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Modifying and Deleting User Accounts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Going Behind the Commands: Configuration Files . . . . . . . . . . . . . . . . . . . . . . . . . 96
/etc/passwd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
/etc/shadow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
/etc/login.defs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
/etc/default/passwd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Managing Users with YaST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Managing Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100

Using Commands for Group Management . . . . . . . . . . . . . . . . . . . . . . . . . 101
Going Behind the Commands: /etc/group . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Managing Authentication: PAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Creating a Default Policy for Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Discovering PAM Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Managing the User’s Shell Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Creating Shell Login Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Displaying Messages to Users Logging In . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108

■CHAPTER 6

Managing Linux Permissions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Granting Read, Write, and Execute: The Three Basic Linux Permissions . . . . . . 109
Understanding Permissions and the Concept of Ownership . . . . . . . . . . . 110
Changing File Ownership . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Understanding Group Ownership . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Working with Advanced Linux Permissions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Setting Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Using chmod to Change Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Using umask to Set Default Permissions. . . . . . . . . . . . . . . . . . . . . . . . . . . 116

ix


7087fmfinal.qxd

x

11/8/06


10:55 PM

Page x

■CONTENTS

Working with Access Control Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Using ACLs to Grant Permissions to More Than One Object . . . . . . . . . . . 118
Working with ACL Masks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Using Default ACLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Understanding ACL Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Applying File Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Apply Quota to Allow a Maximum Amount of Files . . . . . . . . . . . . . . . . . . . . . . . . 121
Installing the Quota Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Preparing the File System for the Quota . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Initializing the Quota . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Setting the Quota for Users and Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Starting the Quota Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124

■CHAPTER 7

Performing Daily File System Management Tasks . . . . . . . . . 125
Mounting Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Using the Mount Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Unmounting Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Automating Mounts with /etc/fstab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Checking File System Integrity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Working with Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

Understanding Why You Want to Use Links . . . . . . . . . . . . . . . . . . . . . . . . 131
Working with Symbolic Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Working with Hard Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Creating Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Using tar to Create and Restore Backups . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Working with Magnetic Tapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Using dd to Make a Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Using rsync to Synchronize Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Automating Backups with cron. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138

■CHAPTER 8

Configuring Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Comparing File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Using ext2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Using ext3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Using ReiserFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Using XFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Creating File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Designing a Partition Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Creating Traditional Partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
Working with Logical Volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151


7087fmfinal.qxd

11/8/06

10:55 PM


Page xi

■CONTENTS

Setting Up a Software RAID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Understanding Your RAID Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Setting Up RAID 0 from the Command Line . . . . . . . . . . . . . . . . . . . . . . . . 160
Creating a RAID 5 Array Using YaST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Managing the RAID Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164

■CHAPTER 9

Managing Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Installing Software with YaST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Installing from the Installation Media. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Selecting the Installation Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Installing Nondefault Software with YaST . . . . . . . . . . . . . . . . . . . . . . . . . . 170
Updating Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
Compiling Software from Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Working with RPM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Following the RPM Naming Convention. . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
Rebuilding the RPM Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
Working with the rpm Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
Managing Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

■CHAPTER 10


Managing the Boot Procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Using GRUB and Its Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Working with the GRUB Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . 180
Installing GRUB. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Working with the GRUB Boot Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Understanding the Kernel and Its initrd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Using Init and /etc/inittab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Working with the Boot Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
Manually Tuning the Initial Boot Phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
Using YaST to Tune the Initial Boot Procedure . . . . . . . . . . . . . . . . . . . . . . 196
Including Your Own Services in boot.local . . . . . . . . . . . . . . . . . . . . . . . . . 197
Managing Services Start-Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Understanding the Concept of Runlevels . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Adding Services to a Runlevel Manually . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Using YaST to Add Services to a Runlevel. . . . . . . . . . . . . . . . . . . . . . . . . . 201
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202

■CHAPTER 11

Managing Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Understanding the Different Kinds of Processes . . . . . . . . . . . . . . . . . . . . . . . . . 203
Running in the Foreground and Background. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204

xi


7087fmfinal.qxd

xii


11/8/06

10:55 PM

Page xii

■CONTENTS

Performing Day-to-Day Process Management . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
Tuning Process Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
Using Other Tools to Monitor System Activity . . . . . . . . . . . . . . . . . . . . . . . 208
Terminating Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
Setting Process Priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Scheduling Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
Configuring the cron Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
Executing Once with at . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214

■CHAPTER 12

Using System Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Reading the Boot Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Getting Hardware Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
Browsing the /proc File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
Using YaST Hardware Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
Using the syslog-ng Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Introducing syslog-ng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Understanding syslog-ng.conf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
Monitoring Log Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
Rotating Log Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227

PART 3

■■■

■CHAPTER 13

Networking SUSE Linux
Enterprise Server

Connecting to the Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
Configuring the Network Interface with YaST . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
Adding a Network Card Manually . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
Configuring the Network Interface from the Command Line . . . . . . . . . . . . . . . . 240
Working with the network Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Using ifup, ifdown, and Related Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Using ifconfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
Using the ip Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
Managing IPv6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
IPv6 Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
Address Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
The Neighbor Discovery Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
Assigning IPv6 Addresses in SUSE Linux Enterprise Server . . . . . . . . . . . 248


7087fmfinal.qxd

11/8/06


10:55 PM

Page xiii

■CONTENTS

Managing Routes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
Setting the Default Route with route . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
Using the ip Tool to Specify the Default Gateway. . . . . . . . . . . . . . . . . . . . 251
Storing Routing Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Configuring the DNS Resolver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
The Role of nsswitch.conf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
Using /etc/hosts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
Tuning and Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Testing Connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Testing Routability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
Testing Availability of Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Monitoring the Network Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
Monitoring Network Traffic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
Using the GNOME Network Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265

■CHAPTER 14

Configuring a CUPS Print Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Installing a CUPS Printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Understanding CUPS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
Managing CUPS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
Managing CUPS with YaST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
Using the Web Interface for CUPS Management . . . . . . . . . . . . . . . . . . . . 277

Tuning the CUPS Environment from the Command Line . . . . . . . . . . . . . . 279
Configuring CUPS Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Installing a Linux CUPS Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Installing Windows As a Client for CUPS . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284

■CHAPTER 15

Sharing Files with SUSE Linux Enterprise Server . . . . . . . . . . . 285
Sharing Files with NFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
Using the NFS Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
Configuring an NFS Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Configuring an NFS Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
Tuning and Monitoring the NFS Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Sharing Files with Samba . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Recognizing Samba Server Possibilities and Impossibilities . . . . . . . . . . . 294
Configuring the Samba Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
Integrating CUPS with Samba. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
Setting Up Samba As a Domain Controller . . . . . . . . . . . . . . . . . . . . . . . . . 302
Configuring Samba with YaST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
Implementing Client Access to the Samba Server . . . . . . . . . . . . . . . . . . . 312

xiii


7087fmfinal.qxd

xiv

11/8/06


10:55 PM

Page xiv

■CONTENTS

Offering Files with FTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
Configuring the pure-ftpd Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
Starting the pure-ftpd Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316

■CHAPTER 16

Configuring a Mail Server

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317

Understanding How a Mail Solution Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
Configuring the Postfix MTA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
Handling Inbound and Outbound Mail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
Managing Postfix Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
Configuring the Master Daemon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
Configuring Global Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
Tuning Postfix with Lookup Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
Using Postfix Management Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
Receiving E-mail Using IMAP or POP3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
Fetching E-mail Using Cyrus IMAPd. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
Filtering Incoming E-mail with Procmail . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
Getting E-mail with POP3 Using Qpopper . . . . . . . . . . . . . . . . . . . . . . . . . . 336

Using YaST to Set Up an MTA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340

■CHAPTER 17

Working with OpenLDAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
Centralizing Vital Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
Structure of an LDAP Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
The LDAP Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
OpenLDAP Files and Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
Installing an OpenLDAP Directory with YaST . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
Configuring the OpenLDAP Server During Installation . . . . . . . . . . . . . . . . 344
Configuring OpenLDAP on an Operational Server. . . . . . . . . . . . . . . . . . . . 347
Setting Up the SUSE Linux Enterprise Server LDAP Client. . . . . . . . . . . . . . . . . . 354
Tuning LDAP Configuration Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
Configuring the OpenLDAP Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
Configuring the LDAP Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
Adding, Querying, and Modifying Entries in the Directory . . . . . . . . . . . . . . . . . . 364
Creating LDIF Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364
Adding Entries with ldapadd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
Modifying Entries with ldapmodify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
Deleting Entries with ldapdelete. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
Using ldapsearch to Query the Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367


7087fmfinal.qxd

11/8/06


10:55 PM

Page xv

■CONTENTS

■CHAPTER 18

Enabling Remote Access

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369

Understanding How Secure Shell Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
Working with Public/Private Key Pairs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
Working with Secure Shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
Configuring SSH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372
Using Key-Based Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374
Introducing Cryptography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374
Using Public/Private Key–Based Authentication in an
SSH Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
Setting Up SSH for Key-Based Authentication . . . . . . . . . . . . . . . . . . . . . . 375
Caching Keys with ssh-agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376
Tunneling Traffic with SSH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
Using X-Forwarding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
Using Generic TCP Port Forwarding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
Using Other Methods for Remote Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379
Using VNC for Remote Access to Graphical Screens . . . . . . . . . . . . . . . . . 379
Enabling VNC via xinetd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
Securing VNC Remote Access with SSH . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
Using screen to Synchronize Remote Sessions . . . . . . . . . . . . . . . . . . . . . 382

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382

■CHAPTER 19

Configuring xinetd

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383

Configuring xinetd with YaST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383
Tuning xinetd by Hand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386
Managing the xinetd Daemon. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386
Setting Default Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386
Tuning the Individual Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
Tuning Access to Services with TCP Wrapper . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
Working with /etc/hosts.allow and /etc/hosts.deny . . . . . . . . . . . . . . . . . . 390
Why You Shouldn’t Use TCP Wrapper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392

■CHAPTER 20

Configuring SUSE Linux Enterprise Server
As an NTP Time Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
Understanding NTP Fundamentals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
Configuring a Stand-Alone NTP Time Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
Configuring ntp.conf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
Pulling or Pushing the Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396

xv



7087fmfinal.qxd

xvi

11/8/06

10:55 PM

Page xvi

■CONTENTS

Tuning Your NTP Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
Using the NTP Drift File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
Using the NTP Log File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
Securing Your NTP Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
Configuring an NTP Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
Checking NTP Synchronization Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400

■CHAPTER 21

Managing Cryptography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
Introducing SSL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
Public and Private Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
The Need for a Certificate Authority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
Managing Certificates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
Creating Certificates and a Certificate Authority with YaST . . . . . . . . . . . 403
Other YaST Certificate Authority Management Options . . . . . . . . . . . . . . . 413
The Common Server Certificate Interface . . . . . . . . . . . . . . . . . . . . . . . . . . 414

Managing Certificates from the Command Line . . . . . . . . . . . . . . . . . . . . . 414
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417

■CHAPTER 22

Configuring the Apache Web Server . . . . . . . . . . . . . . . . . . . . . . . . . 419
Understanding How a Web Server Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419
Installing Apache on SUSE Linux Enterprise Server . . . . . . . . . . . . . . . . . . . . . . . 420
Installing the Right Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420
Starting, Stopping, and Testing the Apache Web Server . . . . . . . . . . . . . . 421
Exploring the Configuration Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
Understanding the Structure of the Apache Configuration Files . . . . . . . . 423
Checking the Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
Configuring Apache with YaST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
Working with Virtual Hosts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
Managing Access to the Web Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
Configuring Host-Based Access Restrictions . . . . . . . . . . . . . . . . . . . . . . . 431
Configuring User-Based Access Restrictions . . . . . . . . . . . . . . . . . . . . . . . 432
Using OpenSSL for Encrypted Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434
Performance Tuning Your Web Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436


7087fmfinal.qxd

11/8/06

10:55 PM

Page xvii


■CONTENTS

■CHAPTER 23

Configuring DNS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
Introducing DNS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
Methods of Name Resolving . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
Organization of the DNS Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
Master and Slave Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440
Connecting the Name Servers in the Hierarchy . . . . . . . . . . . . . . . . . . . . . 440
DNS and Reversed DNS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441
Configuring DNS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442
Configuring DNS with YaST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442
Configuring DNS from Its Configuration Files . . . . . . . . . . . . . . . . . . . . . . . 453
Securing Zone Transfers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459

■CHAPTER 24

Configuring a DHCP Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461
Understanding How DHCP Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461
Configuring a DHCP Server from YaST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
Configuring the DHCP Service Manually . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469
The DHCP Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470
The Configuration File /var/lib/dhcp/etc/dhcpd.conf . . . . . . . . . . . . . . . . . 470
The Start-up Configuration File /etc/sysconfig/dhcpd . . . . . . . . . . . . . . . . 472
Setting Advanced Configuration Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473
Integrating DHCP and DNS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473
The DHCP Relay Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475

Setting Up DHCP Failover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477

■CHAPTER 25

Configuring the Squid Web Proxy Cache . . . . . . . . . . . . . . . . . . . . 479
Introducing Squid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479
Installing Squid and Performing the Initial Configuration . . . . . . . . . . . . . . . . . . . 480
Network Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481
Defining Cache Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481
Specifying Log Files and Cache Directories . . . . . . . . . . . . . . . . . . . . . . . . 482
Optimizing Squid Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483
Timeout Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484
Generic Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485
Securing the Proxy with ACLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485
Configuring User Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487
Squid and URL Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489
Configuring Squid for SSL Traffic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489

xvii


7087fmfinal.qxd

xviii

11/8/06

10:55 PM


Page xviii

■CONTENTS

Configuring Clients for Squid Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490
Using Squid As a Transparent Proxy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491

■CHAPTER 26

Understanding the Kernel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493
Understanding Kernel Modules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493
Tuning initrd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494
Loading Modules on Boot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494
Loading Modules Manually . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494
Loading Modules Automatically . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495
Using udev to Load Kernel Modules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496
Tuning the Kernel Source Files (or Not) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
Understanding SUSE Kernel Backgrounds . . . . . . . . . . . . . . . . . . . . . . . . . 499
Configuring the Kernel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500
Patching the Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502

■CHAPTER 27

Introducing Shell Scripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503
Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503
To Script or Not to Script?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503
What Shell? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504
Basic Elements of a Shell Script. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504

Making It Executable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505
Making a Script Interactive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507
Working with Arguments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508
Regular Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509
Working with Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 510
Command Substitution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 510
Changing Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 511
Substitution Operators. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 511
Pattern-Matching Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513
Performing Calculations in Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514
Using Flow Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517
Using if . . . then . . . else . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518
case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 520
while . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522
until . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522
for . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 523
Using a Stream Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 523
Working with Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 525


7087fmfinal.qxd

11/8/06

10:55 PM

Page xix

■CONTENTS


■CHAPTER 28

Tuning and Optimizing SUSE Linux . . . . . . . . . . . . . . . . . . . . . . . . . . 527
Managing Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527
Optimizing Usage of Swap Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528
Monitoring Swap Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529
Adding Swap Space on the Fly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529
Using ulimit to Set Resource Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530
Tuning the Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531
Understanding the /proc File System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531
Using procinfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533
Tuning the Kernel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534
Using the Powertweak Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537
Crashes and Core Dumps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540

PART 4

■■■

■CHAPTER 29

Advanced SUSE Linux
Enterprise Server Configuration

Configuring SUSE Linux Enterprise Server 10
for High-Availability Clustering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543
Introducing Linux Clustering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543
Designing an HA Cluster Solution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544

Using Shared Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545
Using Heartbeat for High Availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558
Editing the Sample Configuration Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559
Using Authentication Keys to Ensure Secure Communications . . . . . . . . 559
Tuning the Main Configuration File ha.cf on Both Nodes . . . . . . . . . . . . . 559
Creating Shared Resources by Editing the haresources File . . . . . . . . . . . 561
Managing the Shared Resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563
Avoiding Split Brain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564
Configuring a Heartbeat 2–Style Cluster with YaST . . . . . . . . . . . . . . . . . . . . . . . 565
Creating the Cluster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565
Creating Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568
Migrating Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 572
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 572

■CHAPTER 30

Managing Access with the SUSE Firewall . . . . . . . . . . . . . . . . . . . 573
Before Configuring the Firewall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573
Configuring the SUSE Firewall with YaST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577

xix


7087fmfinal.qxd

xx

11/8/06

10:55 PM


Page xx

■CONTENTS

Tuning Netfilter with iptables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 584
Making Proper Preparations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 584
Netfilter Building Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 585
Using iptables to Create a Firewall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 586
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591

■CHAPTER 31

Using Xen to Create a Virtual Environment. . . . . . . . . . . . . . . . . . 593
Working with Xen Virtualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593
Virtualization Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594
Xen Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594
Installing Xen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595
Preparing for Xen Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595
Installing the Xen Domain-0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595
Installing the First Virtual Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597
Managing Xen Domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 602
Managing Xen from the Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . 602
Managing Virtual Machines from YaST . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605
Managing Xen Networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 606
Migrating Virtual Machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 607
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608

■CHAPTER 32


Using AppArmor to Secure Applications . . . . . . . . . . . . . . . . . . . . 609
Exploring the AppArmor Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609
Managing AppArmor Profiles with YaST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611
Creating a New Profile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611
Updating a Profile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616
Deleting a Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 617
Managing AppArmor Profiles from the Command Line . . . . . . . . . . . . . . . . . . . . 618
Creating a Profile with genprof . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618
Monitoring AppArmor’s Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620

■CHAPTER 33

Configuring Service Location Protocol . . . . . . . . . . . . . . . . . . . . . . 621
Understanding How SLP Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621
Configuring an SLP Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622
Configuring OpenSLP from YaST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622
Tweaking /etc/slp.conf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624
Registering Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 626
Browsing Available Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 628
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629


7087fmfinal.qxd

11/8/06

10:55 PM

Page xxi


■CONTENTS

■CHAPTER 34

Troubleshooting SUSE Linux Enterprise Server . . . . . . . . . . . . . 631
Analyzing the Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631
Analyzing the Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631
Checking Application Availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 634
Checking Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635
Troubleshooting from the GRUB Boot Prompt . . . . . . . . . . . . . . . . . . . . . . . . . . . . 636
Booting a Rescue System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638
Using the Repair an Installed System Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . 640
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645

■CHAPTER 35

Creating an Installation Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 647
Creating an Installation Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 648
Configuring TFTP for PXE Boot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 653
Installing a Server Automatically with AutoYaST . . . . . . . . . . . . . . . . . . . . . . . . . 655
Performing Remote Installations Using SSH or VNC . . . . . . . . . . . . . . . . . . . . . . . 659
Performing a Remote Installation with SSH . . . . . . . . . . . . . . . . . . . . . . . . 659
Combining SSH with VNC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 660
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661

■INDEX

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 663


xxi


7087fmfinal.qxd

11/8/06

10:55 PM

Page xxii


7087fmfinal.qxd

11/8/06

10:56 PM

Page xxiii

About the Author

■SANDER VAN VUGT performed his first Linux installation in 1992. Since then,
he has been an enthusiastic Linux user, working with it on a professional
basis since 1995. Sander is an independent trainer and consultant living in
the Netherlands. He has worked professionally everywhere from Singapore
to San Francisco (and is willing to cover the rest of the planet as well). Sander
is a Novell-certified trainer for the SUSE Linux Advanced Technical Trainer
program and is authorized to teach most other Novell technical courses as
well. In addition to being a trainer, he is an author, having written more than

30 books and hundreds of technical articles. Sander is also working as a volunteer for the LPI
organization, contributing topics for the LPIC-3 certification. Most important of all, Sander is the
father of Alex and Franck and the loving husband of Florence. You can reach Sander via his website
at or via e-mail at

xxiii


7087fmfinal.qxd

11/8/06

10:56 PM

Page xxiv


×