sun certified system administrator for the solaris 10 os...

18
Sun Certified System Administrator for the Solaris 10 OS Bootcamp Student Guide - Volume 1 SA-997 Rev A (SA-200-S10-B.2) D63735GC10 Edition 1.0 D64503

Upload: vonhi

Post on 27-May-2018

221 views

Category:

Documents


10 download

TRANSCRIPT

Sun Certified SystemAdministrator for theSolaris 10 OS Bootcamp

Student Guide - Volume 1

SA-997 Rev A (SA-200-S10-B.2)

D63735GC10Edition 1.0

D64503

Copyright © 2009, 2010, Oracle and/or its affiliates. All rights reserved.

Disclaimer

This document contains proprietary information, is provided under a license agreement containing restrictions on use anddisclosure, and is protected by copyright and other intellectual property laws. You may copy and print this document solely foryour own use in an Oracle training course. The document may not be modified or altered in any way. Except as expresslypermitted in your license agreement or allowed by law, you may not use, share, download, upload, copy, print, display,perform, reproduce, publish, license, post, transmit, or distribute this document in whole or in part without the expressauthorization of Oracle.

The information contained in this document is subject to change without notice. If you find any problems in the document,please report them in writing to: Oracle University, 500 Oracle Parkway, Redwood Shores, California 94065 USA. Thisdocument is not warranted to be error-free.

Sun Microsystems, Inc. Disclaimer

This training manual may include references to materials, offerings, or products that were previously offered by SunMicrosystems, Inc. Certain materials, offerings, services, or products may no longer be offered or provided.Oracle and itsaffiliates cannot be held responsible for any such references should they appear in the text provided.

Restricted Rights Notice

If this documentation is delivered to the U.S. Government or anyone using the documentation on behalf of the U.S.Government, the following notice is applicable:

U.S. GOVERNMENT RIGHTSThe U.S. Government’s rights to use, modify, reproduce, release, perform, display, or disclose these training materials arerestricted by the terms of the applicable Oracle license agreement and/or the applicable U.S. Government contract.

Trademark Notice

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respectiveowners.

AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced MicroDevices. Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are usedunder license and are trademarks or registered trademarks of SPARC International, Inc. UNIX is a registered trademarklicensed through X/Open Company, Ltd.

This page intentionally left blank.

This page intentionally left blank.

viiCopyright 2009 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Rev B.2 - Second Issue

Table of Contents

About This Course .................................................................Preface-iCourse Goals............................................................................ Preface-iTopics Not Covered...............................................................Preface-iiiHow Prepared Are You?.......................................................Preface-ivIntroductions ...........................................................................Preface-vHow to Use Course Materials ..............................................Preface-viConventions ...........................................................................Preface-vii

Typographical Conventions ........................................ Preface-ixAdditional Conventions................................................ Preface-x

Introducing the Solaris™ 10 OS Directory Hierarchy ...................1-1Objectives ........................................................................................... 1-1Introducing / (root) Subdirectories................................................. 1-2

Introducing Important System Directories ........................... 1-2Introducing Important In-Memory System Directories ...... 1-4

Introducing File Components .......................................................... 1-8File Names.................................................................................. 1-8Inodes.......................................................................................... 1-8Data Blocks................................................................................. 1-9

Identifying File Types...................................................................... 1-10Directories ................................................................................ 1-11Regular Files ............................................................................ 1-11Symbolic Links ........................................................................ 1-11Device Files ............................................................................. 1-14

Using Hard Links............................................................................. 1-17Introducing Hard Links ......................................................... 1-17Creating New Hard Links ..................................................... 1-18Removing Hard Links ........................................................... 1-19

Exercise: Identifying File Types ..................................................... 1-20Preparation............................................................................... 1-20Task ........................................................................................... 1-20

Exercise Summary............................................................................ 1-22Exercise Solutions: Identifying File Types ................................... 1-23

viii System Administration for the Solaris™ 10 Operating System, Part 1Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Rev B.2 - Second Issue

Managing Local Disk Devices......................................................... 2-1Objectives ........................................................................................... 2-1Introducing the Basic Architecture of a Disk................................. 2-2

Physical Disk Structure ............................................................ 2-2Data Organization on Disk Platters........................................ 2-3The Disk Labels and Partition Tables..................................... 2-4SPARC Disk Slices .................................................................... 2-5x86/x64 Partitions and Slices .................................................. 2-9Disk Device Naming Conventions ....................................... 2-11

Introducing Solaris OS Device Naming Conventions ................ 2-17Logical Device Names............................................................ 2-17Physical Device Names ......................................................... 2-19Instance Names ....................................................................... 2-21

Listing a System’s Devices.............................................................. 2-23The /etc/path_to_inst File ............................................... 2-23The prtconf Command........................................................ 2-27The format Utility ................................................................. 2-28

Reconfiguring Devices .................................................................... 2-29Performing a Reconfiguration Boot...................................... 2-29Using the devfsadm Command............................................ 2-30

Partitioning the Hard Disk ............................................................. 2-32Introducing the Fundamentals of Disk Partitioning.......... 2-32Recognizing Disk Space and Undesirable Conditions ...... 2-33Recognizing Wasted Disk Space........................................... 2-35Recognizing Overlapping Disk Slices .................................. 2-36The format Utility and Disk Partition Tables ................... 2-38Using the format Utility........................................................ 2-41Defining Slices on a SPARC System..................................... 2-41Using the format Utility to Create fdisk Partitions........ 2-50Defining Slices on an x86/x64 System................................ 2-54

Managing Disk Labels..................................................................... 2-62Viewing the VTOC.................................................................. 2-62Replacing a SPARC or x86/x64 VTOC on Disk ................ 2-66Viewing and Replacing fdisk Partition Tables on x86/x64

Systems ................................................................................. 2-68Introducing the Solaris™ Management Console ........................ 2-70

Starting the Solaris Management Console .......................... 2-70Using the Solaris Management Console Tools .................. 2-71Restarting the Solaris Management Console ...................... 2-72Identifying the Functional Areas of the Solaris Management

Console .................................................................................. 2-73Partitioning a Disk Using the Solaris Management Console Disks

Manager Tool................................................................................. 2-77Partitioning the Disk Using the Disks Tool......................... 2-77

Exercise: Managing Local Disk Devices ....................................... 2-86Preparation............................................................................... 2-86

ixCopyright 2009 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Rev B.2 - Second Issue

Exercise Summary................................................................... 2-87Task 1 – Identifying Device Files ......................................... 2-88Task 2 – Adding a New Disk or Tape Device .................... 2-90Task 3 - Working With Disks and Partitions on SPARC

Systems ................................................................................. 2-91Task 4 - Working With Disks and Partitions on x86/x64

Systems ................................................................................. 2-95Task 5 - Working With the Solaris Management Console on

SPARC Systems................................................................. 2-101Exercise Summary.......................................................................... 2-102Exercise Solutions - Managing Local Disk Devices .................. 2-103

Task 1 – Identifying Device Files ........................................ 2-103Task 2 – Adding a New Disk or Tape Device .................. 2-106Task 3 - Working With Disks and Partitions on SPARC

Systems ............................................................................... 2-107Task 4 - Working With Disks and Partitions on x86/x64

Systems ............................................................................... 2-120

Managing Solaris OS ufs File Systems..........................................3-1Objectives ........................................................................................... 3-1Introducing Solaris OS File Systems ............................................... 3-2

Disk-Based File Systems........................................................... 3-2Distributed File Systems ......................................................... 3-3Pseudo File Systems ................................................................. 3-3

Creating a New ufs File System...................................................... 3-5Viewing the Solaris OS ufs File System................................ 3-5Partition Tables and Reserved Space ..................................... 3-8ufs File System Structures...................................................... 3-9Using the newfs Command................................................... 3-15

Checking the File System Using the fsck Command ................ 3-18Data Inconsistencies Checked by the fsck Command ..... 3-18Superblock Consistency ......................................................... 3-18Cylinder Group Block Consistency ...................................... 3-18Inode Consistency................................................................... 3-19Data Block Consistency.......................................................... 3-19The lost+found Directory .................................................... 3-19Noninteractive Mode.............................................................. 3-19Interactive Mode ..................................................................... 3-20

Resolving File System Inconsistencies .......................................... 3-21Reconnecting an Allocated Unreferenced File.................... 3-21Adjusting a Link Counter ...................................................... 3-22Salvaging the Free List ........................................................... 3-22Using Backup Superblocks .................................................... 3-23

Monitoring File System Use ........................................................... 3-27Using the df Command ......................................................... 3-27Using the du Command ......................................................... 3-30

x System Administration for the Solaris™ 10 Operating System, Part 1Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Rev B.2 - Second Issue

Using the quot Command..................................................... 3-32Using the Solaris Management Console Usage Tool ......... 3-33

Exercise: Creating and Maintaining ufs File Systems ............... 3-35Preparation............................................................................... 3-35Task ........................................................................................... 3-35

Exercise Summary............................................................................ 3-40Exercise Solutions: Creating and Maintaining ufs File Systems......

3-41Task ........................................................................................... 3-41

Performing Mounts and Unmounts................................................ 4-1Objectives ........................................................................................... 4-1Working With Mounting Basics ...................................................... 4-2

Determining Which File Systems Are Currently Mounted 4-4Mounting a File System Automatically ................................. 4-4Introducing the Virtual File System Table: /etc/vfstab .. 4-5Introducing the /etc/mnttab File System Table................ 4-8

Performing Mounts.......................................................................... 4-11Mounting a Local File System Manually............................. 4-11Using the mount Command Options ................................... 4-12Mounting All File Systems Manually .................................. 4-14Mounting a New File System................................................ 4-14Mounting Different Types of File Systems......................... 4-16

Performing Unmounts .................................................................... 4-19Unmounting a File System .................................................... 4-19Unmounting All File Systems ............................................... 4-19Unmounting a Busy File System........................................... 4-20Repairing Important Files if Boot Fails on a SPARC System....

4-22Repairing Important Files if Boot Fails on an x86/x64 System

4-23Accessing Mounted Diskettes, CD-ROMs, or DVDs .................. 4-25

Using the Volume Management Service ............................ 4-26Restricting Access to Mounted Diskettes, CD-ROMs, or DVDs4-28

Stopping Volume Management (vold) ............................... 4-28Troubleshooting Volume Management Service Problems4-28

Accessing a Diskette, CD-ROM, or DVD Without the VolumeManagement Service .................................................................... 4-30

Using the mount Command................................................... 4-30Exercise: Mounting File Systems ................................................... 4-32

Preparation............................................................................... 4-32Task ........................................................................................... 4-32

Exercise Summary............................................................................ 4-37Exercise Solutions: Mounting File Systems.................................. 4-38

Task ........................................................................................... 4-38

Solaris™ 10 Operating System Installation Requirements.......... 5-1

xiCopyright 2009 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Rev B.2 - Second Issue

Objectives ........................................................................................... 5-1Identifying Fundamentals of Solaris OS Installations .................. 5-2

Solaris 10 OS Installation and Upgrade Options.................. 5-2Solaris OS Installation Using the GUI.................................... 5-2Solaris OS Installation Using the CLI..................................... 5-3Custom JumpStart Installation................................................ 5-4Solaris Flash Archive Installation ........................................... 5-4Solaris WAN Boot ..................................................................... 5-5Standard Upgrade to the Solaris OS ...................................... 5-5Solaris Live Upgrade Software ............................................... 5-6Hardware Requirements for Solaris 10 OS Installation ...... 5-6Software Components of the Solaris OS............................... 5-7Solaris OS Software Groups .................................................... 5-8

Installing the Solaris 10 OS From a CD-ROM or DVD............... 5-12Pre-Installation Information .................................................. 5-12Installation and Secure by Default ....................................... 5-14

Simulation: Solaris 10 Operating System Installation Requirements5-16

Performing Solaris 10 OS Package Administration ......................6-1Objectives ........................................................................................... 6-1Introducing the Fundamentals of Package Administration ........ 6-2

Software Packages .................................................................... 6-2The /var/sadm/install/contents File ............................. 6-2Package Formats ...................................................................... 6-4

Administering Packages From the Command Line...................... 6-6Translating Package Formats .................................................. 6-6Displaying Information About Installed Software Packages ...

6-7Adding a Software Package .................................................. 6-10 Checking a Package Installation ......................................... 6-13Removing a Software Package.............................................. 6-15Adding Packages by Using a Spool Directory.................... 6-16Streaming One or More Packages ....................................... 6-18Reviewing Package Administration.................................... 6-20

Exercise: Manipulating Software Packages.................................. 6-21Preparation............................................................................... 6-21Task ........................................................................................... 6-21

Exercise Summary............................................................................ 6-24Exercise Solutions: Manipulating Software Packages ................ 6-25

Task ........................................................................................... 6-25

Managing Software Patches on the Solaris 10 OS........................7-1Objectives ........................................................................................... 7-1Preparing for Patch Administration................................................ 7-2

Introducing Solaris OS Patches............................................... 7-2Accessing Patches and Patch Information ............................ 7-3

xii System Administration for the Solaris™ 10 Operating System, Part 1Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Rev B.2 - Second Issue

Accessing Patches Using SunSolve ........................................ 7-5Accessing Patch Documents................................................... 7-7Downloading Patches Using SunSolve................................ 7-14Checking Patch Levels ........................................................... 7-17Preparing Patches for Installation ........................................ 7-18

Installing and Removing Patches .................................................. 7-21Installing a Patch ..................................................................... 7-21Removing a Patch ................................................................... 7-22Installing Patch Clusters ........................................................ 7-23

The smpatch Utility ......................................................................... 7-28Exercise: Maintaining Patches........................................................ 7-29

Preparation............................................................................... 7-29Task ........................................................................................... 7-29

Exercise Summary............................................................................ 7-31Exercise Solutions: Maintaining Patches ...................................... 7-32

Task ........................................................................................... 7-32

Using Boot PROM Commands ....................................................... 8-1Objectives ........................................................................................... 8-1Introducing Boot PROM Fundamentals ......................................... 8-2

Goal of the OpenBoot™ Architecture Standard.................. 8-3Boot PROM ................................................................................ 8-3System Configuration Information ....................................... 8-5Disabling the Abort Sequence................................................. 8-8Displaying POST to the Serial Port ........................................ 8-9

Using Basic Boot PROM Commands ............................................ 8-11Identifying the System Boot PROM Version....................... 8-12Booting the System ................................................................. 8-12Accessing More Detailed Information ................................ 8-14Listing NVRAM Parameters ................................................ 8-15Changing NVRAM Parameters ............................................ 8-16Restoring Default NVRAM Parameters .............................. 8-17Displaying Devices Connected to the System .................... 8-17

Identifying the System’s Boot Device ........................................... 8-22The show-devs Command .................................................... 8-24The devalias Command ..................................................... 8-25

Creating and Removing Custom Device Aliases ........................ 8-28The nvalias Command......................................................... 8-28The nvunalias Command .................................................... 8-30

Viewing and Changing NVRAM Parameters From the OS ...... 8-33Using the eeprom Command ................................................ 8-33

Interrupting an Unresponsive System.......................................... 8-35Aborting an Unresponsive System....................................... 8-35

Exercise: Using Boot PROM Commands...................................... 8-36Preparation............................................................................... 8-36Task ........................................................................................... 8-36

xiiiCopyright 2009 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Rev B.2 - Second Issue

Exercise Summary............................................................................ 8-40Exercise Solutions: Using Boot PROM Commands .................... 8-41

Task ........................................................................................... 8-41

Using the GRand Unified Bootloader (GRUB) ...............................9-1Objectives ........................................................................................... 9-1Introduction to GRUB ....................................................................... 9-2

GRUB Terminology .................................................................. 9-2GRUB-Based Booting................................................................ 9-3How GRUB-Based Booting Works ......................................... 9-4GRUB Device Naming Conventions ...................................... 9-6Functional Components of GRUB .......................................... 9-6The GRUB Menu ....................................................................... 9-7

Modifying x86 System Boot Behavior in the Solaris OS............... 9-9How to Set Solaris Boot Parameters Using the eeprom

Command.............................................................................. 9-10Modifying the Solaris Boot Behavior Using the kernel

Command.............................................................................. 9-12GRUB Boot Archives ....................................................................... 9-17

Managing the Primary Boot Archive ................................... 9-18Booting a System in the GRUB-Based Boot Environment ......... 9-20

How to Boot a System to Run Level 3 (Multiuser Level) .. 9-20How to Boot a System to Run Level S (Single-User Level).......

9-20How to Boot a System Interactively ..................................... 9-22How to Stop an x86 System for Recovery Purposes .......... 9-23How to Boot the Failsafe Archive for Recovery Purposes 9-23

Interrupting an Unresponsive System.......................................... 9-26Aborting an Unresponsive System....................................... 9-26

Exercise: Using GRUB ..................................................................... 9-27Preparation............................................................................... 9-27Task ........................................................................................... 9-27

Exercise Summary............................................................................ 9-30Exercise Solutions: Using GRUB.................................................... 9-31

Task ........................................................................................... 9-31

Performing Boot and Shutdown Procedures...............................10-1Objectives ......................................................................................... 10-1Legacy Boot and Shutdown Versus Service Management Facility

(SMF)............................................................................................... 10-2SMF Features ........................................................................... 10-2

Identifying the Phases of the Boot Process................................... 10-3SPARC Boot PROM Phase..................................................... 10-5SPARC Boot Programs Phase................................................ 10-6x86/x64 Boot PROM Phase ................................................... 10-6x86/x64 Boot Programs Phase .............................................. 10-7The kernel Initialization Phase .......................................... 10-8

xiv System Administration for the Solaris™ 10 Operating System, Part 1Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Rev B.2 - Second Issue

The /etc/system File and Kernel Configuration............ 10-11The init Phase...................................................................... 10-14Legacy Run Level Fundamentals ...................................... 10-16Determining a System’s Current Run Level ..................... 10-17Changing Run Levels ........................................................... 10-17Controlling Legacy Boot Processes ................................... 10-18The /sbin Directory ............................................................. 10-18The /etc/rc#.d Directories .............................................. 10-20Start Run Control Scripts ..................................................... 10-21Stop Run Control Scripts ..................................................... 10-21The /etc/init.d Directory............................................... 10-22

The Service Management Facility (SMF) .................................... 10-24SMF Service............................................................................ 10-24Service Identifiers................................................................. 10-25Service States ......................................................................... 10-27Milestones .............................................................................. 10-28The svc.startd Daemon......................................................... 10-30The Service Configuration Repository............................... 10-31The Service Repository Database........................................ 10-32Stopping and Starting Services Using SMF Commands 10-34Using svcs to Determine Why Services are Not Running.........

10-38Creating New Service Scripts.............................................. 10-38

Secure By Default ........................................................................... 10-46Installation and Secure by Default ..................................... 10-46Custom Configurations........................................................ 10-46Limited Networking Profile ................................................ 10-47Opening Selected Services ................................................... 10-49

Performing System Shutdown Procedures ................................ 10-54The /usr/sbin/init Command ...................................... 10-56The /usr/sbin/shutdown Command .............................. 10-56“Ungraceful” Shutdown Commands................................ 10-58

Exercise: Managing Boot and Shutdown Procedures............... 10-59Preparation............................................................................. 10-59Task ......................................................................................... 10-59

Exercise Summary.......................................................................... 10-63Exercise Solutions: Managing Boot and Shutdown Procedures .......

10-64Task ......................................................................................... 10-64

Performing User Administration .................................................. 11-1Objectives ......................................................................................... 11-1Introducing User Administration.................................................. 11-2

Main Components of a User Account.................................. 11-2System Files That Store User Account Information.......... 11-3

Managing User Accounts.............................................................. 11-15

xvCopyright 2009 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Rev B.2 - Second Issue

Introducing Command-Line Tools..................................... 11-15Creating a User Account ...................................................... 11-16Modifying a User Account .................................................. 11-21Deleting a User Account ...................................................... 11-23Creating a Group Entry........................................................ 11-24Modifying a Group Entry .................................................... 11-25Deleting a Group Entry........................................................ 11-27Using the Solaris Management Console Users Tool ........ 11-28Troubleshooting Login Issues ............................................. 11-37

Managing Initialization Files........................................................ 11-41Introducing System-Wide Initialization Files ................... 11-41Introducing User Initialization Files .................................. 11-42Customizing the User’s Work Environment..................... 11-43

Exercise: Adding User and Group Accounts ............................. 11-46Preparation............................................................................. 11-46Task 1 – Disabling the Solaris OS Registration Window 11-48Task 2 – Adding Group Entries .......................................... 11-48Task 3 – Adding User Accounts......................................... 11-49Task 4 – Examining Configuration Files........................... 11-51Task 5 – Establishing Password Aging .............................. 11-52Task 6 – Modifying User Accounts and Group Entries... 11-53

Exercise Summary.......................................................................... 11-55Exercise Solutions: Adding User and Group Accounts ........... 11-56

Task 1 – Disabling the Solaris OS Registration Window 11-57Task 2 – Adding Group Entries .......................................... 11-57Task 3 – Adding User Accounts.......................................... 11-58Task 4 – Examining Configuration Files............................ 11-60Task 5 – Establishing Password Aging ............................. 11-62Task 6 – Modifying User Accounts and Group Entries... 11-63

Exercise: Modifying Initialization Files ...................................... 11-66Preparation............................................................................. 11-66Task ........................................................................................ 11-66

Exercise Summary.......................................................................... 11-70Exercise Solutions: Modifying Initialization Files..................... 11-71

Task ........................................................................................ 11-71

Introducing System Security.........................................................12-1Objectives ......................................................................................... 12-1Monitoring System Access.............................................................. 12-2

Displaying Users on the Local System................................. 12-2Displaying Users on Remote Systems.................................. 12-3Displaying User Information ................................................ 12-4Displaying a Record of Login Activity ................................ 12-5Recording Failed Login Attempts ........................................ 12-6

Switching Users on a System ......................................................... 12-8Introducing the su Command............................................... 12-8

xvi System Administration for the Solaris™ 10 Operating System, Part 1Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Rev B.2 - Second Issue

Switching to Another Regular User ................................... 12-10Becoming the root User ..................................................... 12-11Monitoring su Attempts ..................................................... 12-12

Controlling System Access ........................................................... 12-14The /etc/default/login File........................................... 12-14File Transfer Protocol (FTP) Access.................................... 12-16The /etc/hosts.equiv and $HOME/.rhosts Files ........ 12-17The /etc/hosts.equiv File Rules .................................... 12-19The $HOME/.rhosts File Rules........................................... 12-20

Restricting Access to Data in Files............................................... 12-21Determining a User’s Group Membership........................ 12-21Identifying a User Account................................................. 12-22Changing File and Directory Ownership .......................... 12-22Changing File and Directory Group Membership........... 12-25Using File Permissions ......................................................... 12-26

Exercise: User Access..................................................................... 12-30Preparation............................................................................. 12-30Task ........................................................................................ 12-31

Exercise Summary.......................................................................... 12-34Exercise Solutions: User Access ................................................... 12-35

Task ......................................................................................... 12-35Exercise: Restricting Access to Data on Systems ....................... 12-41

Preparation............................................................................. 12-41Task ........................................................................................ 12-41

Exercise Summary.......................................................................... 12-45Exercise Solutions: Restricting Access to Data on Systems ..... 12-46

Configuring and Using Printer Services...................................... 13-1Objectives ......................................................................................... 13-1Introducing Network Printing Fundamentals............................. 13-2

Raster Image Processor (RIP) ................................................ 13-2PostScript Printer Description (PPD) ................................... 13-2Print Management Tools........................................................ 13-3Client-Server Model................................................................ 13-3Types of Printer Configurations .......................................... 13-3Basic Functions of the Solaris OS LP Print Service ........... 13-5LP Print Service Directory Structure .................................... 13-6Print Requests From the Network...................................... 13-10Solaris OS Printing Process................................................. 13-12

Configuring Printer Services ........................................................ 13-20Using the Solaris OS Print Manager................................... 13-20Configuring a New Network Printer ................................. 13-23

Administering Printer Services.................................................... 13-32Setting the System’s Default Printer................................... 13-32Removing a Client’s Printer Configuration ...................... 13-33Removing a Server’s Printer Configuration...................... 13-34

xviiCopyright 2009 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Rev B.2 - Second Issue

Starting and Stopping the LP Print Service................................ 13-35Starting the LP Print Service................................................ 13-35Stopping the LP Print Service ............................................. 13-35

Specifying a Destination Printer .................................................. 13-36Using the lp Command ....................................................... 13-36Using the lpr Command..................................................... 13-36

Using the LP Print Service ............................................................ 13-37Accepting Print Jobs ............................................................. 13-37Rejecting Print Jobs ............................................................... 13-38Enabling Printers................................................................... 13-38Disabling Printers ................................................................. 13-39Moving Print Jobs ................................................................ 13-40

Exercise: Using the LP Print Service............................................ 13-42Preparation............................................................................. 13-42Task ........................................................................................ 13-42

Exercise Summary.......................................................................... 13-46Exercise Solutions: Using the LP Print Service .......................... 13-47

Task ......................................................................................... 13-47

Controlling System Processes......................................................14-1Objectives ......................................................................................... 14-1Viewing System Processes.............................................................. 14-2

Using the CDE Process Manager .......................................... 14-2Using the prstat Command ............................................... 14-4Using the Solaris Management Console Process Tool...... 14-7

Killing Frozen Processes ................................................................. 14-9Using the kill and pkill Commands ............................... 14-9Performing a Remote Login ................................................ 14-11

Suspending and Terminating Processes With SMC ................. 14-12Scheduling an Automatic One-Time Execution of a Command.......

14-14Using the at Command ....................................................... 14-14Controlling Access to the at Command........................... 14-16

Scheduling an Automatic Recurring Execution of a Command.......14-17

Introducing the crontab File Format ................................ 14-17Using the crontab Command ............................................ 14-19Controlling Access to the crontab Command................ 14-21Using the Solaris™ Management Console Job Scheduler Tool

14-22Exercise: Using Process Control................................................... 14-24

Preparation............................................................................. 14-24Task ........................................................................................ 14-24

Exercise Summary.......................................................................... 14-26Exercise Solutions: Using Process Control ................................. 14-27

Task ......................................................................................... 14-27

xviii System Administration for the Solaris™ 10 Operating System, Part 1Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Rev B.2 - Second Issue

Performing File System Backups................................................. 15-1Objectives ......................................................................................... 15-1Introducing the Fundamentals of Backups .................................. 15-2

Importance of Routine File System Backups ...................... 15-2Tape Media Types.................................................................. 15-3Tape Drive Naming ................................................................ 15-4Tape Drive Control ................................................................. 15-5Strategies for Scheduled Backups......................................... 15-6The /etc/dumpdates File................................................... 15-10

Backing Up an Unmounted File System..................................... 15-11The ufsdump Command....................................................... 15-11Options for the ufsdump Command ................................. 15-12Tape Backups......................................................................... 15-13Remote Backups to a Tape................................................... 15-14Backups to Disk..................................................................... 15-15

Exercise: Backing Up a File System to Tape............................... 15-18Preparation............................................................................. 15-18Task ........................................................................................ 15-19

Exercise Summary.......................................................................... 15-20Exercise Solutions: Backing Up a File System to Tape ............. 15-21

Task ......................................................................................... 15-21Exercise: Backing Up a File System to an Extra Disk Drive..... 15-23

Preparation............................................................................. 15-23Task ........................................................................................ 15-24

Exercise Summary.......................................................................... 15-25Exercise Solutions: Backing Up a File System to an Extra Disk Drive

15-26Task ......................................................................................... 15-26

Performing File System Restores ................................................ 16-1Objectives ......................................................................................... 16-1Restoring a ufs File System............................................................ 16-2

Restoring a Regular File System ........................................... 16-2Restoring the /usr File System............................................. 16-4Performing a Special Case Recovery of the / (root) File System

on a SPARC System ............................................................. 16-6Performing a Special Case Recovery of the / (root) File System

on an x86/x64 System ......................................................... 16-8Invoking an Interactive Restore .......................................... 16-10Performing an Incremental Restore ................................... 16-12

Exercise: Restoring Files and File Systems ................................. 16-17Preparation............................................................................. 16-17Exercise Summary................................................................. 16-17Task 1- Back Up the root (/) File System to Tape............. 16-18Task 2 - Back up the / (root) File System to a File on Disk.......

16-18

xixCopyright 2009 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Rev B.2 - Second Issue

Task 3 – Restore the /etc/inet/hosts File From Tape orFrom a File on Disk............................................................ 16-19

Task 4 – Destroy and Restore the Root(/) File System .. 16-20Exercise Summary.......................................................................... 16-23Exercise Solutions: Restoring Files and File Systems ............... 16-24

Task 1- Back Up the root (/) File System to Tape............. 16-24Task 2 - Back up the / (root) File System to a File on Disk.......

16-25Task 3 – Restore the /etc/inet/hosts File From Tape or

From a File on Disk............................................................ 16-27Task 4 – Destroy and Restore the Root(/) File System .. 16-29

Backing Up a Mounted File System With a UFS Snapshot ........17-1Objectives ......................................................................................... 17-1Creating a UFS Snapshot ................................................................ 17-2

Using the fssnap Command ................................................ 17-2Limiting the Size of the Backing-Store File ......................... 17-4Displaying Information for a ufs File System Snapshot . 17-5

Backing Up the UFS Snapshot File ................................................ 17-6Performing a Backup of a UFS Snapshot............................. 17-6Performing an Incremental Backup Using a UFS Snapshot .....

17-7Restoring Data From a UFS Snapshot Backup ................. 17-10Deleting a UFS Snapshot...................................................... 17-10

Exercise: Working With UFS Snapshots ..................................... 17-11Preparation............................................................................. 17-11Task ........................................................................................ 17-12

Exercise Summary.......................................................................... 17-13Exercise Solutions: Working With UFS Snapshots ................... 17-14

Task ......................................................................................... 17-14