Sun
Solaris 9 System Administration Part 1 Prepared by Dzafir Jaffar
Solaris 9 System Administration Part 1
Table of Contents Prerequisites ...................................................................................................................................................................... 4 File System s ....................................................................................................................................................................... 4 Root Subdirectories ........................................................................................................................................................... 4 File Types........................................................................................................................................................................... 6 Filenames, Inodes and Data Blocks .................................................................................................................................. 7 Hard Links .......................................................................................................................................................................... 7 Disk Architecture ................................................................................................................................................................ 8 Physical Structure .......................................................................................................................................................... 8 Disk Com ponents ........................................................................................................................................................... 8 Disk Slices ...................................................................................................................................................................... 9 Disk Slice Nam ing Convention ....................................................................................................................................... 9 How to List Devices............................................................................................................................................................ 9 The /etc/path_to_ inst File ............................................................................................................................................... 9 The prtconf Com m and ................................................................................................................................................. 10 The form at Comm and .................................................................................................................................................. 11 How to reconfigure devices.............................................................................................................................................. 11 Disk Partitioning ............................................................................................................................................................... 12 File System Types............................................................................................................................................................ 16 Disk-Based File Systems ............................................................................................................................................. 16 Distributed File Systems .............................................................................................................................................. 16 Pseudo File System s ................................................................................................................................................... 17 How to create a ufs File System ...................................................................................................................................... 17 How to Mount File Systems ............................................................................................................................................. 17 Mount Points and the m ount Com m and ....................................................................................................................... 17 Mounting a File System ................................................................................................................................................ 18 The Virtual File System Table (vfstab)............................................................................................................................. 18 Softw are Installation ........................................................................................................................................................ 19 System Requirements...................................................................................................................................................... 19 Before You Begin ............................................................................................................................................................. 20 Software Packages .......................................................................................................................................................... 20 Package Inform ation .................................................................................................................................................... 20 Package Installation ..................................................................................................................................................... 22 Package Check ............................................................................................................................................................ 23 The var/sadm/inst all/contents File ................................................................................................................................ 24 The B oot PR O M ................................................................................................................................................................ 24 What is the Boot PROM................................................................................................................................................... 24 What is NVRAM? ............................................................................................................................................................. 25 Boot PROM commands ................................................................................................................................................... 25 Boot PROM Version Identification ................................................................................................................................ 25 Boot The System .......................................................................................................................................................... 25 List/Change NVRAM Parameters ................................................................................................................................. 25 Display Devices Connected to the Bus ........................................................................................................................ 26 Identify Boot Device ..................................................................................................................................................... 26 Page 2 of 46
Solaris 9 System Administration Part 1 Create and Rem ove Custom Device Aliases ............................................................................................................... 27 View and Change NVRAM Param eters from the Shell ................................................................................................ 28 Interrupt a Hung System .............................................................................................................................................. 30 The Boot Process............................................................................................................................................................. 30 System Shutdown Procedures ....................................................................................................................................... 30 The following describe the different types of system shutdowns: ............................................................................ 30 User and Security Adm inistration .................................................................................................................................. 31 Components of a User Account ....................................................................................................................................... 31 User Creation and Management...................................................................................................................................... 32 User Creation ............................................................................................................................................................... 32 User M odification ......................................................................................................................................................... 32 User Deletion ............................................................................................................................................................... 33 Group Creation and Management ................................................................................................................................... 33 Group Account Creation ............................................................................................................................................... 33 Group Account M odification ......................................................................................................................................... 33 Group Account Deletion ............................................................................................................................................... 33 System Access Control .................................................................................................................................................... 34 Difference between /etc/passwd and /etc/shadow ....................................................................................................... 34 The pwconv Comm and ................................................................................................................................................ 35 Monitor Failed Login Attem pts ..................................................................................................................................... 35 Monitor System Access ................................................................................................................................................ 36 Printer M anagem ent and Adm inistration ....................................................................................................................... 36 Print Management Tools.................................................................................................................................................. 36 Printer Configuration Types ............................................................................................................................................. 37 The Solaris LP Print Service ............................................................................................................................................ 37 Print Service Directory Structure...................................................................................................................................... 37 The Printing Process........................................................................................................................................................ 38 Creating Printer Classes .................................................................................................................................................. 38 Set or Change Default Printer or Printer Class................................................................................................................ 39 Remove Printer Configuration.......................................................................................................................................... 39 Client Side Rem oval ..................................................................................................................................................... 39 Server Side Rem oval ................................................................................................................................................... 40 Stop and Start the LP Print Service ................................................................................................................................. 40 Enable and Disable Printers ............................................................................................................................................ 41 Move Print Requests........................................................................................................................................................ 41 View System Processes .................................................................................................................................................. 42 Scheduling Command Execution..................................................................................................................................... 42 System Backups and R estores ....................................................................................................................................... 43 Tape Media Types and Capacities .................................................................................................................................. 43 Tape Device Naming Conventions .................................................................................................................................. 43 Backup Types .................................................................................................................................................................. 44 The ufsdump Command .................................................................................................................................................. 44 The ufsrestore Command ................................................................................................................................................ 44 Perform a File System Restore........................................................................................................................................ 45 Determine Number of Tapes Required ............................................................................................................................ 46 Page 3 of 46
Solaris 9 System Administration Part 1
Prerequisites It will be very beneficial to have access to a Sparc system running Solaris 9. If you do not have Solaris 9 installed on your Sparc system, you can download it free of cost at: http://survey1.sun.com/servlet/viewsflash?cmd=showform&pollid=sol9_download
File System s Root Subdirectories There are several root directories that are created upon the installation of the Solaris Operating System. Each of these directories resides under the root (/) directory and serves a special purpose.
/ - This is the root of the entire file system’s name space
Think of a / directory as the equivalent of the root of the C drive in Windows. Everything else must be under “C:\”; for example, “C:\Windows\”
/bin – This directory is a symbolic link to the /usr/bin directory which stores binary files or system commands
Think of a binary or binary file as the equivalent of a program or exe file in Windows. We will talk more about symbolic links later in this section
/dev – Stores symbolic links to device files in the /devices directory
Note: Names in this directory will look like the following examples: /dev/rdsk – Raw disk device /dev/rmt - Raw magnetic tape device /dev/sound - Audio device or its control files /dev/term - Serial device
/devices – This directory stores physical device names and device files
/etc – Stores configuration files and databases specific to the system Names in this directory will look like the following examples:
Page 4 of 46
Solaris 9 System Administration Part 1
/etc/default - Stores default information for programs /etc/lp – Stores configuration information for the printer subsystem
/export – This is the default directory for commonly shared file systems. These include user home directories and client file systems
/home – This is the default location or mount point for user home directories
/kernel - Directory of kernels required as part of the boot process. These kernels are platform-independent
/mnt – This is a temporary mount point for file systems
/opt – Default directory for application packages
/sbin – Executables used in the boot process as well as a manual system recovery
/tmp – Directory for temporary files. These files are cleared every time the system is rebooted.
/usr – USR is an acronym for UNIX System Resources. It holds many different components and files required by the operating system. A few examples of the directories under the /usr directory are as follows: /usr/bin – system commands /usr/dt - Common Desktop Environment (CDE) software /usr/java - Directories containing Java programs and libraries
/var – Directory for varying files. This usually includes log or temporary files
Page 5 of 46
Solaris 9 System Administration Part 1
File Types There are four main file types in the Solaris Operating Environment.
Regular files
Directories
Symbolic Links
Device Files
The first three file types store data. Device files do not store data. They provide access to devices. It is very easy to differentiate between them by using the ls command. # cd /etc # ls -l total 458 drwxr-xr-x
2 adm
adm
lrwxrwxrwx
1 root
root
drwxr-xr-x
2 root
bin
-rw-r--r--
1 root
bin
-rw-r--r--
1 root
bin
512 Jun 20 18:26 acct 14 Jun 20 17:50 aliases -> ./mail/aliases 512 Jun 20 18:30 apache 83 Jun 20 20:34 auto_home 113 Jun 20 17:50 auto_master