Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 58 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
58
Dung lượng
2,02 MB
Nội dung
Installing and Maintaining Solaris 9 19 The default backup directories are located under /var/sadm/pkg and are based on the installed package or packages being modified by the patch and the patch number. For example, the SPARC rpc.rwalld patch (112875-01) modified the SUNWrcmds package. Any files changed by installing this patch are saved under the /var/sadm/pkg/SUNWrcmds/112875-01 directory. You can specify a different backup directory by using the -B command-line argument. The patchadd command will fail if any of the following occur: ➤ A package being patched is not installed or is only partially installed. ➤ The patch requires another patch that is not installed. ➤ The patch is incompatible with another patch already installed. ➤ The current version or a higher version of the patch is already installed. ➤ The architecture of the patch and the system do not match. After unzipping a patch, the zip file can be deleted to save space. Likewise, after installing a patch, the files associated with the patch in the patch spool directory can be deleted to save space. Determining Installed Patches Two commands can be used to generate a list of installed patches for a stand- alone system: ➤ showrev -p ➤ patchadd -p These commands generate almost identical lists. The following example illus- trates the use of the showrev command (the output is formatted for readability): # showrev -p Patch: 112875-01 Obsoletes: Requires: Incompatibles: Packages: SUNWrcmds # When a patch is installed, information regarding the patch is added to the pkginfo files of the package(s) that are updated by the patch. The pkginfo files are located in subdirectories under the /var/sadm/pkg directory. The showrev and patchadd commands extract and format information from the pkginfo files. In addition to the patch number and the package(s) that the patch updates, any related information, such as other required patches or incompatible patches, is listed. 01 8699 ch01 11/19/02 10:12 AM Page 19 Chapter 1 20 The patchadd command can be used to display a list of installed patches for other system configurations using the -C, -R, and -S command-line argu- ments, as previously described. For example, to display the patches applied to an OS service named Solaris_9, you use the following patchadd command: patchadd -S solaris_9 -p You can display a list of patches applied to a particular package by using the pkgparam command. The following example lists the patches applied to the SUNWcsu package: # pkgparam SUNWrcmds PATCHLIST 112875-01 # Removing a Patch The patchrm command is used to remove or back out a patch. The system configurations supported by the patchadd command are also supported by the patchrm command. # patchrm 112875-01 Checking installed patches Backing out patch 112875-01 Patch 112875-01 has been backed out. # The same -C, -R, and -S command-line arguments, as previously described, are used. For example, to remove patch 112875-01 from the bootable root image of a diskless client named client5, you use the following patchrm command: patchrm -R /export/root/client5 112875-01 Because the default backup directory could have changed during installation (by using the –B command-line argument with the patchadd command), the patchrm command also supports the -B argument. In addition, you can use the -f command-line argument of the patchrm com- mand to remove a patch that has been superseded by another patch. You can remove installed patches and return the system to the state it was in before the patch was installed as long as the following conditions are met: ➤ The patch is not required by another patch or has been made obsolete by a later patch. ➤ The patch was not installed using patchadd –d, which informs patchadd not to save a copy of files before they are updated or replaced. 01 8699 ch01 11/19/02 10:12 AM Page 20 Installing and Maintaining Solaris 9 21 Installing Patches Using the Solaris Management Console Patches can also be installed using the Solaris Management Console. Start the console using the following command: # smc The Solaris Management Console, as shown in Figure 1.1, is displayed. To install a patch, click Patches in the left pane and then select Add Patch from the pull-down Action menu. The patch installation is a four-step process: 1. Specify the source of the patch files (see Figure 1.2). Then click Next. 2. Available patches are listed. Highlight the patch number(s) to install and click the Add button. The highlighted patch(es) move to the Patches to Add list. Then click Next (see Figure 1.3). 3. Specify a backout directory and then click Next (see Figure 1.4). 4. Review the specified information and then click Finish (see Figure 1.5). Figure 1.1 Solaris Management Console. 01 8699 ch01 11/19/02 10:12 AM Page 21 Chapter 1 22 Figure 1.2 Solaris Management Console—Add Patch (Step 1). Figure 1.3 Solaris Management Console—Add Patch (Step 2). 01 8699 ch01 11/19/02 10:12 AM Page 22 Installing and Maintaining Solaris 9 23 Figure 1.4 Solaris Management Console—Add Patch (Step 3). Figure 1.5 Solaris Management Console—Add Patch (Step 4). The patch is installed and listed as in the Solaris Management Console (see Figure 1.6). To remove a patch, highlight the patch name, and then select Delete from the pull-down Edit menu. The Remove Patch Warning box (see Figure 1.7) is displayed. If you confirm the process, the patch will be removed and will no longer be listed as an installed patch in the Solaris Management Console. 01 8699 ch01 11/19/02 10:12 AM Page 23 Chapter 1 24 Figure 1.6 Solaris Management Console (with installed patch). Figure 1.7 Solaris Management Console—Remove Patch Warning. Summary System software is distributed in packages, but sometimes several packages need to be distributed and installed as a unit. A collection of two or more related packages is referred to as a software cluster. The Solaris 9 operating system is configured into software groups, which consist of different collections of software clusters and packages. 01 8699 ch01 11/19/02 10:12 AM Page 24 Installing and Maintaining Solaris 9 25 A software group is installed using one of the four installation methods: SunInstall, Web Start, JumpStart, or Custom JumpStart. Individual software packages can be installed using the pkgadd command and removed using the pkgrm command. Updates to packages (that is, patches) can be installed using the patchadd command and removed using the pathcrm command. 01 8699 ch01 11/19/02 10:12 AM Page 25 Chapter 1 26 Exam Prep Practice Questions Question 1 Which of the following methods can be used to install multiple patches? [Select all that apply.] ❑ A. patchadd -M /var/spool/patch 104567-03 106583-10 103276-04 ❑ B. Use patchadd to install each patch separately ❑ C. patchadd -M /var/spool/patch patchlist All the answers are correct and can be used to install multiple patches. Answer A shows installing three patches located in the /var/spool/patch directory. Answer C uses a file named patchlist that contains a list of patch- es to install. Of course, the patchadd command can be used to installs sever- al patches, one at a time (answer B). Question 2 Which of the following tools can be used to install packages? [Select all that apply.] ❑ A. admintool ❑ B. Product Registry ❑ C. pkgadd ❑ D. Web Start All of the listed utilities can be used to install packages. Question 3 Which of the following methods cannot be preconfigured using the Name Service method? [Select all that apply.] ❑ A. Root password ❑ B. Default router ❑ C. Time zone ❑ D. IP address ❑ E. DHCP 01 8699 ch01 11/19/02 10:12 AM Page 26 Installing and Maintaining Solaris 9 27 The correct answers are A, B, and E. The root password, default router, and DHCP cannot be preconfigured using the Name Service method. Question 4 Which of the following is the default spool directory for packages? ❍ A. /var/spool ❍ B. /var/sadm/pkg ❍ C. /tmp ❍ D. /var/spool/pkg The correct answer is D. Answer A is the system spool directory. Answer B is the directory that contains information about installed packages. Answer C is the temporary directory. Question 5 What is the minimum amount of memory required for Solaris 9? ❍ A. 64MB ❍ B. 96MB ❍ C. 128MB ❍ D. 256MB The correct answer is B, 96MB. 128MB is recommended. More is obvious- ly better. Question 6 Which of the following methods will display selected information from the SUNWast pkginfo file? [Select all that apply.] ❑ A. pkginfo SUNWast ❑ B. pkginfo –l SUNWast ❑ C. display pkginfo SUNWast ❑ D. Highlighting SUNWast in the Admintool Software window and clicking Show Details 01 8699 ch01 11/19/02 10:12 AM Page 27 Chapter 1 28 The correct answers are A, B, and D. Although the command in answer A provides only package title and type of software, the pkginfo file is the only place this information can be stored. Answer C is not a valid answer. Question 7 Which of the following commands can be used to remove a patch? ❍ A. rmpatch ❍ B. patchrm ❍ C. pkgrm -p ❍ D. patchadd -d The correct answer is B. Answer A (rmpatch) is not a valid command. Answer C (pkgrm -p) is used to remove packages (and no -p command-line argument exists). Answer D (patchadd -d) is used to add a patch without saving files before they are updated or replaced. Question 8 Which of the following commands can be used to list all installed patches? [Select all that apply.] ❑ A. showrev -p ❑ B. patchinfo ❑ C. patchlist all ❑ D. patchadd -p The correct answers are A and D. B and C are not valid answers. Question 9 During an upgrade, the disk space needs to be reallocated. Which of the follow- ing can be used as the backup media? [Select all that apply.] ❑ A. Unused system disk ❑ B. Tape ❑ C. Disk ❑ D. CD-ROM ❑ E. Remote file system 01 8699 ch01 11/19/02 10:12 AM Page 28 [...]... installation 29 01 8 699 ch01 30 11/ 19/ 02 10: 12 AM Page 30 Chapter.1 Need to Know More? Mulligan, John P., Solaris 8 Essential Reference, New Riders, Indianapolis, IN, 20 01 Sun Microsystems, Solaris 9 Installation Guide Available in printed form, on the Web at docs.sun.com, and from the online documentation provided with the Solaris 9 operating system Sun Microsystems,... file systems remain mounted A command-line interface (with superuser privileges) is started and associated with the system console This allows the system administrator to perform maintenance, such as system backup, without interference from users or applications 02 8 699 ch 02 11/ 19/ 02 10:10 AM Page 43 Booting and Shutting Down the System Table 2. 8 The Eight System. .. (NVRAM) ✓ Device aliases ✓ System run levels ✓ rc scripts Concepts You Need to Master ✓ Using OpenBoot commands ✓ Performing a system boot ✓ Controlling boot processes ✓ Performing a system shutdown 02 8 699 ch 02 32 11/ 19/ 02 10:10 AM Page 32 Chapter .2 Introduction This chapter addresses topics related to booting and shutting down the system The first section... documentation provided with the Solaris 9 operating system Sun Microsystems, System Reference Manual, Section 1M System Administration Commands Available in printed form, on the Web at docs.sun.com, and from the online documentation provided with the Solaris 9 operating system 02 8 699 ch 02 11/ 19/ 02 10:10 AM Page 31 2 Booting and Shutting Down the System Terms You... /var/kernel ❑ D /etc /system ❑ E /etc/kernel The correct answers are A and B Answers C and E are not valid Answer D is used to configure the system kernel Question 10 Which of the following commands can be used to change to system run levels 2 or 3? [Select all that apply.] ❑ A init ❑ B reboot ❑ C shutdown ❑ D poweroff ❑ E uadmin ❑ F halt 51 02 8 699 ch 02 52 11/ 19/ 02 10:10 AM Page 52 Chapter .2 ... change to any system run level Although all the commands can shutdown/reboot the system (run levels 0, 1, 5 ,6 , s), the init command is the only one that can be used to bring a system up from run levels s or 1 to run levels 2 or 3 02 8 699 ch 02 11/ 19/ 02 10:10 AM Page 45 Booting and Shutting Down the System The poweroff(1M) command changes the system to run... boot-device disk2 ok reset 02 8 699 ch 02 11/ 19/ 02 10:10 AM Page 35 Booting and Shutting Down the System Device Aliases OpenBoot identifies system hardware using a full device pathname that represents the type of device and its location in the system A device pathname consists of system buses, addresses, and possibly driver names The following is an example of a... For example, the standard Unix utility to execute maintenance commands automatically is the cron program It is usually started at run level 2 and stopped at run levels 0, 1, 5, 6, and s To start cron at run level 2, the cron rc script is copied (or linked) into /etc/rc2.d and given the name S75cron The 02 8 699 ch 02 11/ 19/ 02 10:10 AM Page 47 Booting and Shutting Down the System. .. ldterm,ttcompat 41 02 8 699 ch 02 42 11/ 19/ 02 10:10 AM Page 42 Chapter .2 Keep in mind that the processes listed in the /etc/inittab file are only executed when the system enters one of the run levels specified in the rstate field on that entry The default run level is defined in the /etc/inittab by the initdefault entry The following example shows run level... -i5 -g0 >/dev/msglog 2/dev/msglog sS:s:wait:/sbin/rcS >/dev/msglog 2/dev/msglog /dev/msglog 2/dev/msglog /dev/msglog 2/dev/msglog /dev/msglog 2/dev/msglog /dev/msglog 2/dev/msglog /dev/msglog 2/dev/msglog . Console—Add Patch (Step 2) . 01 8 699 ch01 11/ 19/ 02 10: 12 AM Page 22 Installing and Maintaining Solaris 9 23 Figure 1.4 Solaris Management Console—Add Patch (Step 3). Figure 1.5 Solaris Management. Figure 1.5). Figure 1.1 Solaris Management Console. 01 8 699 ch01 11/ 19/ 02 10: 12 AM Page 21 Chapter 1 22 Figure 1 .2 Solaris Management Console—Add Patch (Step 1). Figure 1.3 Solaris Management Console—Add. 01 8 699 ch01 11/ 19/ 02 10: 12 AM Page 29 Chapter 1 30 Need to Know More? Mulligan, John P., Solaris 8 Essential Reference, New Riders, Indianapolis, IN, 20 01. Sun Microsystems, Solaris 9 Installation