EXi PREP Solaris 10 System Administration Bill Calkins ULB Darmstadt llllllllllllllll 16876771
Contents at a Glance Introduction Part I: Exam Preparation 310-200 CHAPTER 1 Managing File Systems 21 CHAPTER 2 Installing the Solaris 10 Operating Environment 171 CHAPTER 3 Perform System Boot and Shutdown Procedures 257 CHAPTER 4 User and Security Administration 363 CHAPTER 5 Managing System Processes 457 CHAPTER 6 Managing the LP Print Service 503 CHAPTER 7 Performing System Backups and Restorations 551 310-202 CHAPTER 8 The Solaris Network Environment 599 CHAPTER 9 Virtual File Systems, Swap Space, and Core Dumps 641 CHAPTER 10 Managing Storage Volumes 703 CHAPTER 11 Controlling Access and Configuring System Messaging 745 CHAPTER 12 Naming Services 775 CHAPTER 13 Solaris Zones 827 CHAPTER 14 Advanced Installation Procedures 859 Part II: Final Review Fast Facts ^ 951 Practice Exam 1001 Part III: Appendixes APPENDIX A What's on the CD-ROM 1025 Glossary 1027 Index 1047
Table of Contents Introduction 1 How This Book Helps You 1 Conventions Used in This Book 4 Audience 5 The Sun Certified System Administrator Exams 5 Exam CX-31O-2OO 5 Manage File Systems 6 Install Software 6 Perform System Boot Procedures 6 Perform User and Security Administration 6 Manage Network Printers and System Processes 6 Perform System Backups and Restores 6 Exam CX-310-202 7 Describe Network Basics 7 Manage Virtual File Systems and Core Dumps 7 Manage Storage Volumes 7 Control Access and Configure System Messaging 7 Set Up Naming Services.. : 7 Solaris Zones 8 Perform Advanced Installation Procedures 8 Exam CX-31O-2O3 (Solaris 10 Upgrade Exam) 8 Summary 9 Advice on Taking the Exam 9 Study and Exam Prep Tips T. 11 v Learning as a Process 11 Study Tips 11 Study Strategies 12 Pre-Testing Yourself 13 Exam Prep Tips,.,,. 13 Putting It All Together 14
V Contents Part I: Exam Preparation CHAPTER ONE: Managing File Systems 21 Introduction 26 Device Drivers 26 Physical Device Name 27 Device Autoconfiguration 33 USB Devices 35 Instance Names 37 Major and Minor Device Numbers 40 Logical Device Name 42 Block and Raw Devices 46 A File System Defined 47 Defining a Disk's Geometry 48 Disk Controllers 49 Defect List 49 Disk Labels 49 Partition Tables 51 Solaris File System Types 51 Disk-Based File Systems..'. 51 Network-Based File Systems 52 Virtual File Systems 52 Disk Slices 54 Displaying Disk Configuration Information 56 Using the format Utility to Create Slices 58 The Free Hog Slice 66 Using the format Utility to Modify Partitions 66 Using the Solaris Management Console Disks Tool 68 Recovering Disk Partition Information...? 74 Logical Volumes 75 Parts of a UFS 75 The Root (/) File System 78 Soft (Symbolic) Links 83 Hard Links 85 Removing a Link 87
vi Solaris 10 System Administration Exam Prep Components of the UFS 87 The Boot Block 88 The Superblock 88 Cylinder Groups 89 The inode 89 The Storage Block 90 Free Blocks 90 Creating a UFS 90 Understanding Custom File System Parameters 92 Logical Block Size 93 Fragment Size 93 Minimum Free Space 94 Optimization Type 95 Number of inodes and Bytes per inode 95 The mkf s Command 95 The f styp Command 98 File System Operations 99 Synchronizing a File System 99 Repairing File Systems 100 The labelit Command 104 The volcopy Command 104 Tuning File Systems 106 Mounting File Systems ' 108 Mounting a File System with Large Files 113 Mounting a File System with UFS Logging Enabled 114 Unmounting a File System 114 The f user Command 115 /etc/mnttab 116 Volume Management» 120 Using Volume Management 128 Troubleshooting Volume Manager 129 Displaying a File System's Disk Space Usage 131 Displaying Directory Size Information 135 v Information on File Systems 136 Controlling User Disk Space Usage 138 The quot Command 139
vii Contents Summary 141 Exercises 142 Exam Questions 147 Answers to Review Questions 163 Suggested Readings and Resources 170 CHAPER TWO: Installing the Solaris 10 Operating Environment 171 Introduction 174 Installing the Solaris 10 Software 174 Requirements and Preparation for Installing the Solaris 10 Software 175 Minimum System Requirements 177 Software Terminology 178 Software Packages 178 Software Groups 179 Solaris Media 180 System Configuration to Be Installed 180 Disk Storage 182 Basic Considerations for Planning Partition (Slice) Sizes 184 Slice Arrangements on Multiple Disks 186 Methods of Installing the Solaris 10 Software 186 Solaris Interactive Installation 187 JumpStart ' :- 187 Custom JumpStart 187 Solaris Flash Archives 188 WAN Boot 189 Solaris Live Upgrade 190 Upgrading the Operating System 190 The Solaris Installation Prechecklist 191 Using the Interactive Installation Process (suninstall) 194 Configuring Power Management 216 Tools for Managing Software 217 Adding and Removing Software Packages 218 Using a Spool Directory 220 Installing Software from the Command Line 221 Removing Software Using pkgrm 222
viii : Solaris 10 System Administration Exam Prep Solaris Product Registry 222 Web Start Installer 225 Listing and Verifying Installed Packages 227 Software Patches 229 Installing a Patch 230 Installing a Patch 232 Removing a Patch 234 Patch Manager (smpatch) 235 Patch Tool 240 General Guidelines 242 Summary 244 Exercises 245 Exam Questions 248 Answers to Exam Questions 254 Suggested Readings and Resources 256 CHAPTER THREE: Perform System Boot and Shutdown Procedures 257 Introduction 260 Booting a System 260 Powering On the System 261 The Boot PROM and Program Phases 261 The OpenBoot Environment.. :~ 262 Entry-Level to High-End Systems 264 Accessing the OpenBoot Environment 264 System Control Switch 265 OpenBoot Firmware Tasks 266 The OpenBoot Architecture 267 The OpenBoot Interface ^ 269 Getting Help in OpenBoot 269 PROM Device Tree (Full Device Pathnames) 271 OpenBoot Device Aliases 276 OpenBoot NVRAM 278 The nvedit Line Editor 285 OpenBoot Security 287 OpenBoot Diagnostics 289 Input and Output Control 293
ix Contents OpenBoot PROM Versions 294 Booting a System 295 The boot Command 296 The Kernel 303 The init Phase 310 The Solaris Management Facility (SMF) Service 311 Using the Run Control Scripts to Stop or Start Services 335 System Shutdown 339 Commands to Shut Down the System 340 Stopping the System for Recovery Purposes 343 Turning Off the Power to the Hardware 345 Summary 346 Exercises, 347 Review Questions 351 Answers to Review Questions 358 Suggested Readings and Resources 362 CHAPTER 4: User and Security Administration 363 Introduction 366 Administering User Accounts 366 Managing User and Group Accounts with the SMC 366 Managing User and Group Accounts from the Command Line 381 Setting Up Shell Initialization Files 389 C Shell Initialization Files 389 Bourne Shell Initialization Files 390 Korn Shell Initialization Files 390 Additional Shells Included with Solaris 10 390 Default Initialization Files 391 Customizing User Initialization Files 392 The Home Directory 395 Projects 396 Name Services 396 System Security 397 Controlling Physical Security 398 Controlling System Access 398 Controlling File Access 407
Solaris 10 System Administration Exam Prep Access Control Lists (ACLs) 411 Setting ACL Entries. 412 Checking the New File Permissions 414 Verifying ACL Entries 414 Copying a File's ACL to Another File 414 Modifying ACL Entries on a File 415 Deleting ACL Entries from a File 415 Auditing Users 418 Controlling Network Security 423 Securing Superuser Access The Secure Shell (ssh) 432 Ṇ ASET ' 435 Common-Sense Security Techniques 437 Summary 438 Exercises 439 Exam Questions 444 Answers to Exam Questions 453 Suggested Reading and Resources 456 CHAPTER FIVE: Managing System Processes. /. '. 457 Introduction 460 Viewing a Process ; : 460 pgrep 464 prstat 466 Process Manager 470 SMC Process Tool " 473 pargs 475 svcs 476 Process Types 476 Using Signals 479 Scheduling Processes 483 Scheduling Priorities 484 Changing the Priority of a Time-Sharing Process with nice 484 Changing the Scheduling Priority of Processes with priocntl 486 Fair Share Scheduler (FSS) and the Fixed Scheduler (FX) 487 429
xi Contents Using the Solaris Batch-Processing Facility 487 Configuring crontab 487 Scheduling a Single System Event (at) 490 Job Scheduler 493 Summary 495 Exercises 496 Exam Questions 497 Answers to Exam Questions 501 Suggested Reading and Resources 502 CHAPTER SIX: Managing the LP Print Service 503 The LP Print Service 506 The Solaris Print Service 506 LP Print Service Directories 507 The Print Spooler 509 The LP Print Daemons 510 Setting Up the Printer Hardware 511 Ethernet Connections 512 Parallel Connections 512 Serial Connections 512 USB Connections 512 Setting Up a Network Printer..: 512 BSD Versus SVR4 Printing Software 513 Print Servers Versus Print Clients 515 Configuring Software for a Solaris Printer 516 Administering Printers 522 Deleting Printers and Managing Printer Access 522 Creating Printer Classes 524 Checking Printer Status 526 Managing Printer Queues 527 Restarting the Print Scheduler 533 Setting a User's Default Printer 534 Modifying the Printer with Print Manager 534 Troubleshooting the Print Scheduler 536
xii : Solaris 10 System Administration Exam Prep Summary 537 Exercises 538 Exam Questions 544 Answers to Exam Questions 548 Suggested Reading and Resources 549 CHAPTER SEVEN: Performing System Backups and Restorations 551 Introduction 554 Backup Media 554 Tape Device Names....? 555 Solaris Backup and Restoration Utilities 557 The tar Utility 557 The dd Utility 559 The cpio Utility 560 The pax Utility 564 The uf sdump Utility 567 The uf srestore Utility 574 Recovering the Root (/) or /usr File System 578 Additional Notes About Restoring Files 580 The f ssnap Utility ". 581 zip and unzip 585 Solaris Flash Archive : 585 The j ar Utility 586 Summary 590 Apply Your Knowledge 591 Exercises 591 Exam Questions 593 Answers to Exam Questions 596 Suggested Reading and Resources 597 CHAPTER EIGHT The Solaris Network Environment 599 Introduction 602 ^Network Fundamentals 602 Network Topologies 602 Network Protocols and Network Models 603
xiii Contents Encapsulation and Decapsulation 609 Packets 609 Ethernet 609 Network Hardware 611 IPv4 Addressing 613 IPv6 616 Network Interfaces 618 Controlling and Monitoring an IPv4 Network Interface 618 Configuring an IPv4 Network Interface 620 Changing the System Hostname 624 Network Services 62 5 Network Maintenance 629 Summary 632 Apply Your Knowledge 633 Exercises 633 Exam Questions 634 Answers to Exam Questions 637 Suggested Reading and Resources 639 CHAPTER NINE: Virtual File Systems, Swap Space, and Core Dumps 641 Introduction 644 The Swap File System..' '. 644 Swap Space and TMPFS 645 Sizing Swap Space 646 Monitoring Swap Resources 647 Setting Up Swap Space 649 Core File Configuration 655 Crash Dump Configuration v 658 NFS 659 NFS Version 4 660 Servers and Clients 661 NFS Daemons 661 Setting Up NFS 662 Mounting a Remote File System 666 NFS Server Logging 671
xiv Solaris 10 System Administration Exam Prep AutoFS 672 AutoFS Maps 675 When to Use automount 687 Summary 688 Key Terms 688 Exercises 688 Exam Questions 692 Answers to Exam Questions 699 Suggested Reading and Resources 701 CHAPTER TEN: Managing Storage Volumes 703 Introduction 706 RAID 706 RAID 0 707 RAID 1 708 RAID 5 708 RAID 1+0 708 Solaris Volume Manager (SVM) 708 SVM Volumes 710 <J Planning Your SVM Configuration 712 Metadisk Driver 715 SVM Commands '.' 715 Creating the State Database 716 Monitoring the Status of the State Database 719 Creating a Concatenated Volume 721 Monitoring the Status of a Volume 723 Creating a Soft Partition 724 Expanding an SVM Volume s- 725 Creating a Mirror 727 Unmirroring a Non-Critical File System 730 Mirroring the Root File System 731 Unmirroring the Root File System 734 J/eritas Volume Manager 737
XV Contents Summary 740 Exercises -. 740 Exam Questions 741 Answers to Exam Questions 743 Suggested Reading and Resources 744 CHAPTER ELEVEN: Controlling Access and Configuring System IViessaging 745 Introduction 748 Role-Based Access Control (RBAC) 748 Using RBAC 749 RBAC Components 754 syslog 762 Using the logger Command 767 Summary 768 Review Exercises 769 Exam Questions 770 Answers to Exam Questions 773 Suggested Readings and Resources 774 CHAPTER TWELVE: i Naming Services 775 Introduction (,778 Name Services Overview 778 The Name Service Switch File 779 /etc Files 783 NIS -. 784 The Structure of the NIS Network 784 Determining How Many NIS Servers You Need 785 Determining Which Hosts Will Be NIS Servers 786 Information Managed by NIS 786 Planning Your NIS Domain 790 Configuring an NIS Master Server 791 Setting Up NIS Clients 800 Setting Up NIS Slave Servers 801 Creating Custom NIS Maps 802
XVI i Solaris 10 System Administration Exam Prep NIS Security 803 Troubleshooting NTS 804 NIS+ 805 Hierarchical Namespace 805 NTS+ Security 806 Authentication 806 Authorization 806 DNS 808 Configuring the DNS Client T 808 Lightweight Directory Access Protocol (LDAP) 810 Sun Java System Directory Server 811 Name Service Cache Daemon (nscd) 814 The getent Command 816 Summary 817 Key Terms 817 Exercises 818 Exam Questions 820 Answers to Exam Questions 824 Suggested Reading and Resources 826 CHAPTER THIRTEEN: Solaris Zones 827 Introduction ' ; 830 Consolidation and Resource Management 830 Consolidation 831 Solaris Zones 831 Types of Zones 832 Zone Features 833 Non-Global Zone Root File System Models... v 834 Networking in a Zone Environment 835 Zone Daemons 835 Configuring a Zone 836 Viewing the Zone Configuration 840 v Installing a Zone 840 Booting a Zone' 841 Halting a Zone 842
XVII Contents Rebooting a Zone 842 Uninstalling a Zone 842 Deleting a Zone 842 Zone Login 843 Creating a Zone 847 Summary 850 Review Exercises 851 Exam Questions 853 Answers to Exam Questions.... ^ 857 Suggested Reading and Resources 858 CHAPTER FOURTEEN: Advanced Installation Procedures 859 Introduction 862 JumpStart 862 Preparing for a Custom JumpStart Installation 864 What Happens During a Custom JumpStart Installation? 865 The Boot Server 1 866 The Install Server 870 The Configuration Server 872 The Rules File 874 begin and finish Scripts 884 Creating class Files \ 884 Testing Class Files 902 sysidcfg File 905 Setting Up JumpStart in a Name Service Environment 910 Setting Up Clients 910 Troubleshooting JumpStart 913 A Sample JumpStart Installation ^ 914 Solaris Flash 920 Creating a Flash Archive 920 Using the Solaris Installation Program to Install a Flash Archive 924 Solaris Flash and JumpStart 926 Preboot Execution Environment (PXE) 928 Preparing for a PXE Boot Client 928 Booting the x86 Client 936
xviii ; Solaris 10 System Administration Exam Prep Summary 938 Exercises 939 Exam Questions 942 Answers to Exam Questions 946 Suggested Reading and Resources 948 Part II: Final Review ^ Fast Facts 951 Section 1 Exam CX-31O-2OO 951 Managing File Systems 951 Devices and Drivers 952 Instance Names 953 File Systems 953 Creating a UFS : 956 Volume Management 957 Installing the Solaris 10 Operating Environment 958 Tools for Managing Software 959 Software Patches 960 System Startup and Shutdown 961 OpenBoot Environment* " 961 The Kernel 964 Commands to Shut Down the System _ 966 User and Security Administration 966 Shells and Initialization Files 967 System Security 970 Protecting Data - 971 Access Control Lists (ACLs) 972 Monitoring Users 972 Network Security T. 972 Restricting Root Access 973 Managing Processes 974 Using the kill Command 974 Projects and Tasks 976 v Managing the LP Print Service 977 The LP Print Daemons 978
xix : Contents Performing System Backups and Restorations : 979 Section 2 Exam CX-31O-2O2 980 The Solaris Network Environment 980 Network Definitions and Hardware 980 Network Classes 981 Configuring Network Interfaces 982 Changing the System Hostname 983 Virtual File Systems, Swap Space, and Core Dumps 984 Swap Space 984 Core File and Crash Dump Configuration 985 Network File System (NFS) 987 Autofs 989 Managing Storage Volumes 989 RAID (Redundant Array of Inexpensive Disks) 991 The State Database 992 Controlling Access and Configuring System Messaging 992 Role-Based Access Control (RBAC) 993 Naming Services 993 /etc Files 994 NIS i : 994 NIS+ 995 DNS 996 Lightweight Directory Access Protocol (LDAP) 996 Solaris Zones 996 Advanced Installation Procedures 997 JumpStart : - 997 Solaris Flash 998 * > Practice Exam ^ 1001 Practice Exam Questions 1002 Practice Exam Answers 1014
XX I Solaris 10 System Administration Exam Prep Part III: Appendixes APPENDIX A: What's on the CD-ROM 1025 ExamGear, Exam Prep Edition 1025 Glossary 1027 Index 1047