Solaris 10 1/06: In this release,this chapter has been completely revised. This chapter documents current packageand patch procedures on a system with installed non-global zones.
Solaris 10 6/06:A note was addedto the procedureHow to Add a Package to the Global Zone Only.
Solaris 10 8/07: A note was removedfrom the taskHow to Apply a Patch to the Global Zone Only.
For a complete listing of new Solaris 10 features and a descriptionof Solaris releases, seeOracle Solaris 10 9/10 What’s New.
This chapter describes how to add and remove packages and patches ona system with zones installed. Other tasks associated with managing packagesand patches, such as checking package parameter settings and obtaining packageinformation, are also addressed. For an overview of patching and packagingconcepts on a with zones installed, seeChapter 25, About Packages and Patches on a Solaris System With Zones Installed (Overview).
Task | Description | For Instructions |
|---|---|---|
Add a package. | Add a package on a system with zones installed. | |
Check package information. | Check package information on a system with zones installed. | Checking Package Information on a Solaris System With Zones Installed |
Remove a package. | Remove a package on a system with zones installed. | Removing a Package From a Solaris System With Zones Installed |
Apply a patch. | Apply a patch on a system with zones installed. | |
Remove a patch. | Remove a patch on a system with zones installed. | |
(Optional) Check the package parameter settings. | When adding or removing packages, verify that the settings of the packageparameters support the action you want to perform. | Checking Package Parameter Settings on a System with Zones Installed |
You can use thepkgadd system utility described inthepkgadd(1M) manpage to perform the following tasks:
Add a package to the global zone only
Add a package to both the global zone and all non-global zones
Add a package that is already installed in the global zoneto the non-global zones
Add a package to a specified non-global zone only
TheSUNW_PKG_ALLZONES andSUNW_PKG_HOLLOW packageparameter settings must match the correct value, eithertrue orfalse, to add packages. Otherwise, the desired result will not beachieved. For more information about the effect of these package parametersettings, seeAbout Packages and Zones.For more information about how to check these package parameter settings,seeChecking Package Parameter Settings on a System with Zones Installed.
How to Add a Package to the Global ZoneOnlyTo add a package to the global zone only, theSUNW_PKG_ALLZONES packageparameter must be set tofalse.
You must be the global administrator in the global zone to perform thisprocedure.
Become superuser, or assume the Primary Administrator role.
To create the role and assign the role to a user, seeUsing the Solaris Management Tools With RBAC (Task Map) inSystem Administration Guide: Basic Administration.
While in the global zone, run thepkgadd-d command followed by the location of thepackage, the-G option, and then the package name.
If installing the package from a CD-ROM, type:
global#pkgadd-d/cdrom/cdrom0/directory-Gpackage_name |
If installing the package from a directory to which it hasbeen copied, type:
global#pkgadd-ddisk1/image-Gpackage_name |
wheredisk1 is the location where the packagewas copied.
If thepkgadd utility is run without the-G option andSUNW_PKG_THISZONE=true, then the specifiedpackage is added to the current (global) zone by default.
How to Add a Package to the Global Zoneand All Non-Global ZonesDo not usepkgadd option-G in thisprocedure.
You must be the global administrator in the global zone to perform thisprocedure.
Become superuser, or assume the Primary Administrator role.
To create the role and assign the role to a user, seeUsing the Solaris Management Tools With RBAC (Task Map) inSystem Administration Guide: Basic Administration.
While in the global zone, run thepkgadd-d command followed by the location of thepackage and then the package name.
If installing the package from a CD-ROM, type:
global#pkgadd-d/cdrom/cdrom0/directorypackage_name |
If installing the package from a directory to which it hasbeen copied, type:
global#pkgadd-ddisk1/imagepackage_name |
wheredisk1 is the location where the packagewas copied.
How to Add a Package That Is Installedin the Global Zone to All Non-Global ZonesYou must be the global administrator in the global zone to perform thisprocedure.
Become superuser, or assume the Primary Administrator role.
To create the role and assign the role to a user, seeUsing the Solaris Management Tools With RBAC (Task Map) inSystem Administration Guide: Basic Administration.
In the global zone, usepkgrm toremove the package.
Add the package without using the-G option.
How to Add a Package to a Specified Non-GlobalZone OnlyTo add a package to a specified non-global zone only, theSUNW_PKG_ALLZONES package parameter must be set tofalse. Do notuse thepkgadd option-G inthis procedure or the operation fails.
You must be the zone administrator in the non-global zone to performthis procedure.
Log in to the non-global zone as the zone administrator.
While in the non-global zone,my-zone in this procedure, run thepkgadd-d commandfollowed by the location of the package and then the package name.
If installing the package from a CD-ROM, type:
my-zone#pkgadd-d/cdrom/cdrom0/directorypackage_name |
If installing the package from a directory to which it hasbeen copied, type:
my-zone#pkgadd-ddisk1/imagepackage_name |
wheredisk1 is the location where the packagewas copied.
You can query the software package database for the global zone andnon-global zones by using thepkginfo command. See thepkginfo(1) manpage for more information about this command.
How to Check Package Information in theGlobal Zone OnlyTo check the software package database for the global zone only,usepkginfo followed by the package name.
global%pkginfopackage_name |
global%pkginfo SUNWcsr SUNWcsusystem SUNWcsr Core Solaris, (Root)system SUNWcsu Core Solaris, (Usr) |
How to Check Package Information in aSpecified Non-Global Zone OnlyTo check the software package database ina specific non-global zone, log into the non-global zone and usepkginfo followed by the package name.
my-zone%pkginfopackage_name |
my-zone%pkginfo SUNWcsr SUNWcsusystem SUNWcsr Core Solaris, (Root)system SUNWcsu Core Solaris, (Usr) |
You can use thepkgrm system utility described inthepkgrm(1M) manpage to perform the following tasks:
Remove a package from the global zone and all non-global zones
Remove a package from a specified non-global zone only
TheSUNW_PKG_ALLZONES andSUNW_PKG_HOLLOW packageparameter settings must match the correct value, eithertrue orfalse, to remove packages. Otherwise, the desired result will notbe achieved. For more information about the effect of these package parametersettings, seeAbout Packages and Zones.For more information about how to check these package parameter settings,seeChecking Package Parameter Settings on a System with Zones Installed.
How to Remove a Package From the GlobalZone and All Non-Global ZonesYou must be the global administrator in the global zone to perform thisprocedure.
Become superuser, or assume the Primary Administrator role.
To create the role and assign the role to a user, seeUsing the Solaris Management Tools With RBAC (Task Map) inSystem Administration Guide: Basic Administration.
While in the global zone, run thepkgrm command followed by the package name.
global#pkgrmpackage_name |
How to Remove a Package From a SpecifiedNon-Global Zone OnlyTo remove a package from a specified non-global zone only, theSUNW_PKG_ALLZONES package parameter must be set tofalse.
You must be the zone administrator in the non-global zone to performthis procedure.
Log in to the non-global zone as the zone administrator.
While in the non-global zone,my-zone in this procedure, run thepkgrm command followedby the package name.
my-zone#pkgrmpackage_name |
You can use thepatchadd system utility describedin thepatchadd(1M) manpage to perform the following tasks:
Apply a patch to the global zone only
Apply a patch to the global zone and all non-global zones
Apply a patch to specified non-global zone only
How to Apply a Patch to the Global ZoneOnlySolaris 10 3/05 through Solaris 10 11/06: Ifyou are patching a package that was added by using thepkgadd commandwith the-G option, the package must be patched by using thepatchadd command with the-G option. This restrictionis removed in the Solaris 8/07 release.
You must be the global administrator in the global zone to perform thisprocedure.
Become superuser, or assume the Primary Administrator role.
To create the role and assign the role to a user, seeUsing the Solaris Management Tools With RBAC (Task Map) inSystem Administration Guide: Basic Administration.
Execute thepatchadd command with the-Goption,followed by the patch ID.
global#patchadd -Gpatch_id |
How to Apply a Patch to the Global Zone and All Non-GlobalZonesYou must be the global administrator in the global zone to perform thisprocedure.
Also seeSolaris 10 10/09: Zones Parallel Patching to Reduce Patching Time andSolaris 10 10/09: How to Patch Non-Global Zones in Parallel.
Become superuser, or assume the Primary Administrator role.
To create the role and assign the role to a user, seeUsing the Solaris Management Tools With RBAC (Task Map) inSystem Administration Guide: Basic Administration.
Execute thepatchadd commandfollowed by the patch ID.
global#patchaddpatch_id |
How to Apply a Patch to a Specified Non-GlobalZone OnlyTo apply a patch to a specified non-global zone only, theSUNW_PKG_ALLZONES package parameter for all packages in the patch set must be settofalse.
You must be the zone administrator in the non-global zone to performthis procedure.
Log in to the non-global zone as the zone administrator.
While in the non-global zone,my-zone in this procedure, execute thepatchadd commandfollowed by the patch ID.
my-zone#patchaddpatch_id |
Solaris 10 10/09: How to Patch Non-Global Zones inParallelSet the number of non-global zones that will be patched in parallelin thepatchadd configuration file/etc/patch/pdo.conf. When patching in the global zone has finished, the number of non-globalzones set innum_proc= are patched together.
If running a release prior to Solaris 10 10/09, download patch 119254-66or later revision (SPARC) or 119255-66 or later revision (x86).
You must be the global administrator in the global zone to perform thisprocedure.
Become superuser, or assume the Primary Administrator role.
To create the role and assign the role to a user, seeUsing the Solaris Management Tools With RBAC (Task Map) inSystem Administration Guide: Basic Administration.
(Optional, for releases prior to Solaris 10 10/09 only) Downloadpatch 119254-66 (SPARC) or 119255-66 (x86).
In the/etc/patch/pdo.conf file, set 6 non-globalzones to be patched together in parallel on a system with 4 online CPUs.
num_proc=6 |
If there are more than six non-global zones on the system, the firstsix will be patched in parallel, then the remaining non-global zones willbe patched as processes finish patching the first six non-global zones.
You can use thepatchrm system utility describedin thepatchrm(1M) manpage to perform the following task:
Remove a patch from the global zone and all non-global zones
Remove a patch from a specified non-global zone only
How to Remove a Patch From the Global Zone and AllNon-Global ZonesYou must be the global administrator in the global zone to perform thisprocedure.
Become superuser, or assume the Primary Administrator role.
To create the role and assign the role to a user, seeUsing the Solaris Management Tools With RBAC (Task Map) inSystem Administration Guide: Basic Administration.
Execute thepatchrm command followed by thepatch ID.
global#patchrmpatch_id |
How to Remove a Patch From a SpecifiedNon-Global Zone OnlyTo remove a patch from a specified non-global zone only, theSUNW_PKG_ALLZONES package parameter for all packages in the patch set must be settofalse.
You must be the zone administrator in the non-global zone to performthis procedure.
Log in to the non-global zone as the zone administrator.
While in the non-global zone,my-zone in this procedure, execute thepatchrm commandfollowed by the patch ID.
my-zone#patchrmpatch_id |
Before you add or remove a software package, you can use thepkgparam command to check package parameter settings. This step is optional.This check also can be done when troubleshooting why a package is not addedor removed as expected. For information about displaying package parametervalues, see thepkgparam(1) manpage.
(Optional) How to Check the Setting ofa Package Already Installed on the SystemTo check the package parameter setting of a package that is alreadyinstalled in a global or non-global zone, usepkgparam followedby the package name and the name of the parameter.
my-zone%pkgparampackage_name SUNW_PKG_ALLZONEStruemy-zone%pkgparampackage_name SUNW_PKG_HOLLOWfalse |
(Optional) How to Check the Setting ofa Package in Software on a CD-ROMTo check the package parameter setting of an uninstalled packagein software located on a CD-ROM, usepkgparam-d withthe path of the CD-ROM followed by the package name and the name of the parameter.
my-zone%pkgparam-d/cdrom/cdrom0/directorypackage_name SUNW_PKG_ALLZONEStruemy-zone%pkgparam-d/cdrom/cdrom0/directorypackage_name SUNW_PKG_HOLLOW false |