Movatterモバイル変換


[0]ホーム

URL:



System Administration Guide: Oracle Solaris Containers-Resource Management and Oracle Solaris Zones

Chapter 26 Adding and Removing Packagesand Patches on a Solaris System With Zones Installed (Tasks)

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).

Adding and Removing Packages and Patcheson a Solaris System With Zones Installed (Task Map)

Task 

Description 

For Instructions 

Add a package. 

Add a package on a system with zones installed. 

Adding a Package on a Solaris 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. 

Applying a Patch to a Solaris System With Zones Installed

Remove a patch. 

Remove a patch on a system with zones installed. 

Removing 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

Adding a Package on a Solaris System WithZones Installed

You can use thepkgadd system utility described inthepkgadd(1M) manpage to perform the following tasks:

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.

ProcedureHow to Add a Package to the Global ZoneOnly

To 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.

  1. 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.

  2. 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.


    Note –

    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.


ProcedureHow to Add a Package to the Global Zoneand All Non-Global Zones

Do not usepkgadd option-G in thisprocedure.

You must be the global administrator in the global zone to perform thisprocedure.

  1. 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.

  2. 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.

ProcedureHow to Add a Package That Is Installedin the Global Zone to All Non-Global Zones

You must be the global administrator in the global zone to perform thisprocedure.

  1. 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.

  2. In the global zone, usepkgrm toremove the package.

  3. Add the package without using the-G option.

ProcedureHow to Add a Package to a Specified Non-GlobalZone Only

To 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.

  1. Log in to the non-global zone as the zone administrator.

  2. 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.

Checking Package Information on a SolarisSystem With Zones Installed

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.

ProcedureHow to Check Package Information in theGlobal Zone Only

  1. To check the software package database for the global zone only,usepkginfo followed by the package name.


    global%pkginfopackage_name

Example 26–1 Using thepkginfo Command in the GlobalZone


global%pkginfo SUNWcsr SUNWcsusystem      SUNWcsr Core Solaris, (Root)system      SUNWcsu Core Solaris, (Usr)

ProcedureHow to Check Package Information in aSpecified Non-Global Zone Only

  1. To 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

Example 26–2 Using thepkginfo Command in a Non-Global Zone


my-zone%pkginfo SUNWcsr SUNWcsusystem      SUNWcsr Core Solaris, (Root)system      SUNWcsu Core Solaris, (Usr)

Removing a Package From a Solaris SystemWith Zones Installed

You can use thepkgrm system utility described inthepkgrm(1M) manpage to perform the following tasks:

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.

ProcedureHow to Remove a Package From the GlobalZone and All Non-Global Zones

You must be the global administrator in the global zone to perform thisprocedure.

  1. 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.

  2. While in the global zone, run thepkgrm command followed by the package name.


    global#pkgrmpackage_name

ProcedureHow to Remove a Package From a SpecifiedNon-Global Zone Only

To 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.

  1. Log in to the non-global zone as the zone administrator.

  2. While in the non-global zone,my-zone in this procedure, run thepkgrm command followedby the package name.


    my-zone#pkgrmpackage_name

Applying a Patch to a Solaris SystemWith Zones Installed

You can use thepatchadd system utility describedin thepatchadd(1M) manpage to perform the following tasks:

ProcedureHow to Apply a Patch to the Global ZoneOnly


Note –

Solaris 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.

  1. 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.

  2. Execute thepatchadd command with the-Goption,followed by the patch ID.


    global#patchadd -Gpatch_id

ProcedureHow to Apply a Patch to the Global Zone and All Non-GlobalZones

You 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.

  1. 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.

  2. Execute thepatchadd commandfollowed by the patch ID.


    global#patchaddpatch_id

ProcedureHow to Apply a Patch to a Specified Non-GlobalZone Only

To 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.

  1. Log in to the non-global zone as the zone administrator.

  2. While in the non-global zone,my-zone in this procedure, execute thepatchadd commandfollowed by the patch ID.


    my-zone#patchaddpatch_id

ProcedureSolaris 10 10/09: How to Patch Non-Global Zones inParallel

Set 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.

  1. 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.

  2. (Optional, for releases prior to Solaris 10 10/09 only) Downloadpatch 119254-66 (SPARC) or 119255-66 (x86).

  3. 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.

Removing a Patch on a System with ZonesInstalled

You can use thepatchrm system utility describedin thepatchrm(1M) manpage to perform the following task:

ProcedureHow to Remove a Patch From the Global Zone and AllNon-Global Zones

You must be the global administrator in the global zone to perform thisprocedure.

  1. 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.

  2. Execute thepatchrm command followed by thepatch ID.


    global#patchrmpatch_id

ProcedureHow to Remove a Patch From a SpecifiedNon-Global Zone Only

To 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.

  1. Log in to the non-global zone as the zone administrator.

  2. While in the non-global zone,my-zone in this procedure, execute thepatchrm commandfollowed by the patch ID.


    my-zone#patchrmpatch_id

Checking Package Parameter Settings ona System with Zones Installed

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.

Procedure(Optional) How to Check the Setting ofa Package Already Installed on the System

  1. To 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

Procedure(Optional) How to Check the Setting ofa Package in Software on a CD-ROM

  1. To 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

[8]ページ先頭

©2009-2025 Movatter.jp