<?Pub UDT _bookmark _target?><?Pub UDT __target_1 _target?><?Pub UDT registeredtm trademark?><chapter id="swmgrpkgsconcepts-52619"><?Pub Tag atict:info tracking="off" ref="4"?><?Pub Tag
atict:user user="sk23612" fullname="Juanita Heieck"?><?Pub Tag atict:user
user="jonj" fullname="Juanita Heieck"?><?Pub Tag atict:user user="smorgan"
fullname=""?><?Pub Tag atict:user user="kathys" fullname="Kathy Slattery"?><?Pub Tag
atict:user user="cindys" fullname=""?><?Pub Tag atict:user user="cathleen"
fullname=""?><?Pub Tag atict:user user="eb151805" fullname="Juanita Heieck"?><?Pub Tag
atict:user user="jh118764" fullname="Juanita Heieck"?><?Pub Tag atict:user
user="lh136763" fullname="Laura Hartman"?><?Pub Tag atict:user user="wsm"
fullname=""?><title>Managing Software (Overview)</title><highlights><para>Software management involves adding and removing software from stand-alone
systems, servers, and their clients. This chapter describes the various tools
that are available for installing and managing software.</para><para>This chapter does not describe installing the Solaris Operating System
(Solaris OS) on a new system, nor does it describe installing or upgrading
a new version of the Solaris OS. For information about installing or upgrading
the Solaris OS, see <olink targetdoc="solarisinstall" remap="external"><citetitle remap="book">Solaris Express Installation Guide: Basic Installations</citetitle></olink>.</para><itemizedlist><para>This is a list of the overview information in this chapter.</para><listitem><para><olink targetptr="gazwe" remap="internal">What's New in Software Management
in the Solaris Operating System?</olink></para>
</listitem><listitem><para><olink targetptr="swmgrpkgsconcepts-30493" remap="internal">Where to Find Software
Management Tasks</olink></para>
</listitem><listitem><para><olink targetptr="swmgrpkgsconcepts-35274" remap="internal">Overview of Software
Packages</olink></para>
</listitem><listitem><para><olink targetptr="swmgrpkgsconcepts-38835" remap="internal">Tools for Managing
Software Packages</olink></para>
</listitem><listitem><para><olink targetptr="swmgrpkgsconcepts-25409" remap="internal">Adding or Removing
a Software Package (pkgadd)</olink></para>
</listitem><listitem><para><olink targetptr="swmgrpkgsconcepts-16775" remap="internal">Key Points for
Adding Software Packages (pkgadd)</olink></para>
</listitem><listitem><para><olink targetptr="swmgrpkgsconcepts-35627" remap="internal">Guidelines for
Removing Packages (pkgrm)</olink></para>
</listitem><listitem><para><olink targetptr="restrict-1" remap="internal">Restrictions on Adding and Removing
Software Packages and Patches for Solaris Releases That are Not Zones Aware</olink></para>
</listitem><listitem><para><olink targetptr="swmgrpkgs-19113" remap="internal">Avoiding User Interaction
When Adding Packages (pkgadd)</olink></para>
</listitem>
</itemizedlist><para>For the most up-to-date information for managing packages and patches
in the Solaris OS, see <ulink url="http://www.sun.com/bigadmin/patches/" type="url"></ulink>.</para><para>For step-by-step instructions on managing software, see <olink targetptr="swmgrpkgsgui-1" remap="internal">Chapter&nbsp;19, Managing Software With Solaris System Administration Tools (Tasks)</olink> and <olink targetptr="swmgrpkgscli-1" remap="internal">Chapter&nbsp;20, Managing Software by Using Package Commands (Tasks)</olink>.</para><para>For information about managing software on Solaris systems with zones
installed, see <olink targetdoc="sysadrm" targetptr="z.pkginst.task-1" remap="external">Chapter 25, <citetitle remap="chapter">Adding and Removing Packages and Patches on a Solaris System With Zones Installed (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide:  Virtualization Using the Solaris Operating System</citetitle></olink>.</para>
</highlights><sect1 id="gazwe"><title>What's New in Software Management in the Solaris
Operating System?</title><para>This section describes the new software management features in this
Solaris release.</para><sect2 id="ggxkb"><title>Deferred-Activation Patching</title><para>Patching tools have changed to handle larger patches. Starting with
patch 119254-42 and 119255-42, the patch installation commands, <command>patchadd</command> and <command>patchrm</command>, have been modified to change the
way in which certain patches that deliver new features are handled. This modification
affects the installation of these patches on any Solaris 10 release. These <emphasis>deferred-activation</emphasis> patches are better equipped to handle the large
scope of changes that are delivered in feature patches.</para><para>For more details, see <ulink url="http://www.sun.com/bigadmin/sundocs/articles/patch-wn.jsp" type="url"></ulink>.</para>
</sect2><sect2 id="gcbvq"><title>Common Agent Container Included in the Solaris OS</title><para>The Common Agent Container is a stand-alone Java program that implements
a container for Java management applications.  This program provides a management
infrastructure that is designed for Java Management Extensions (JMX) and Java
Dynamic Management Kit (Java DMK) based management functionality.  The software
is installed by the <literal>SUNWcacaort</literal> package and resides in
the <filename>/usr/lib/cacao</filename> directory.</para><para>Typically, the container is not visible.</para><itemizedlist><para>However, there are two instances when you might need to interact with
the container daemon:</para><listitem><para>In the event that another application attempts to use a network
port that is reserved for the Common Agent Container.</para>
</listitem><listitem><para>In the event that a certificate store is compromised. If this
conflict occurs, you might have to regenerate the Common Agent
Container certificate keys. </para>
</listitem>
</itemizedlist><para>For information about how to troubleshoot these problems, see <olink targetdoc="sysadv2" targetptr="gcbwx" remap="external"><citetitle remap="section">Troubleshooting Common Agent Container Problems in the Solaris OS</citetitle> in <citetitle remap="book">System Administration Guide: Advanced Administration</citetitle></olink>.</para>
</sect2><sect2 id="gbytw"><title>Improvements to How <command>patchadd</command> <option>M</option> Command Handles Multiple Patches</title><para><emphasis role="strong">Solaris 10:</emphasis> Starting with the Solaris
10 release, the functionality of the <command>patchadd</command> <option>M</option> command
is improved to enable more effective and efficient handling of multiple patches
and dependencies between patches. As a result, you no longer have to specify
patch IDs in numerical order when using this command.</para><para>Note that if you use the <command>patchadd</command> <option>M</option> command
without specifying a patch ID or patch IDs, all the patches in the directory
are automatically installed on the system. To install a specific patch or
patches, you must specify the patch ID when using the <command>patchadd</command> <option>M</option> command.</para><para>For more information, see the <olink targetdoc="refman" targetptr="patchadd-1m" remap="external"><citerefentry><refentrytitle>patchadd</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page.</para>
</sect2><sect2 id="swmgrpkgsconcepts-38"><title>Package and Patch Tool Enhancements</title><para><emphasis role="strong">Solaris 10:</emphasis> The Solaris package and
patch tools were enhanced in the Solaris 10 initial 3/05 release to provide
improved performance and extended functionality. </para><para>As a part of these enhancements, the <command>pkgchk</command> command
now provides a new option to assist you in mapping files to packages. To map
files to packages, use the <command>pkgchk</command> <option>P</option> option
instead of <command>grep</command> <replaceable>pattern</replaceable><filename>/var/sadm/install/contents</filename>. The <option>P</option> option enables you to use a partial path.
Use this option with the <option>l</option> option to list the information
about the files that contain the partial path. For more information see <olink targetptr="eywvy" remap="internal">How to Check the Integrity of Installed Objects (pkgchk
-p, pkgchk -P)</olink> and the <olink targetdoc="refman" targetptr="pkgchk-1m" remap="external"><citerefentry><refentrytitle>pkgchk</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page.</para>
</sect2>
</sect1><sect1 id="swmgrpkgsconcepts-30493"><title>Where to Find Software Management
Tasks</title><para>Use this table to find step-by-step instructions for managing software.</para><informaltable frame="topbot"><tgroup cols="2" colsep="0" rowsep="0"><colspec colname="colspec0" colwidth="41.41*"/><colspec colname="colspec1" colwidth="58.59*"/><thead><row rowsep="1"><entry><para>Software Management Topics</para>
</entry><entry><para>For More Information</para>
</entry>
</row>
</thead><tbody><row><entry><para>Installing Solaris software.</para>
</entry><entry><para><olink targetdoc="solarisinstall" remap="external"><citetitle remap="book">Solaris Express Installation Guide: Basic Installations</citetitle></olink></para>
</entry>
</row><row><entry><para>Adding or removing Solaris software packages after installation.</para>
</entry><entry><para><olink targetptr="swmgrpkgsgui-1" remap="internal">Chapter&nbsp;19, Managing Software With Solaris System Administration Tools (Tasks)</olink> and <olink targetptr="swmgrpkgscli-1" remap="internal">Chapter&nbsp;20, Managing Software by Using Package Commands (Tasks)</olink></para>
</entry>
</row><row><entry><para> Adding or removing Solaris patches after installation.</para>
</entry><entry><para><olink targetptr="swmgrpatchconcepts-30492" remap="internal">Managing Patches in the
Solaris Operating System</olink></para>
</entry>
</row><row><entry><para>Troubleshooting software package problems.</para>
</entry><entry><para><olink targetdoc="sysadv2" targetptr="tsswmgr-40462" remap="external">Chapter 21, <citetitle remap="chapter">Troubleshooting Software Package Problems (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Advanced Administration</citetitle></olink></para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect1><sect1 id="swmgrpkgsconcepts-35274"><title>Overview of Software Packages</title><para><indexterm><primary>packages</primary><secondary>overview</secondary></indexterm><indexterm><primary>packages</primary><secondary>definition of</secondary></indexterm>Software management involves installing or removing software products.
Sun and its third-party ISVs deliver software as a collection of one or more <emphasis>packages</emphasis>. </para><para><indexterm id="swmgrpkgsconcepts-ix1702"><primary>software management</primary><secondary>packages and</secondary></indexterm>The term <emphasis>packaging</emphasis> generically
refers to the method for distributing and installing software products to
systems where the products will be used. A package is a collection of files
and directories in a defined format. This format conforms to the application
binary interface (ABI), which is a supplement to the System V Interface Definition.
The Solaris OS provides a set of utilities that interpret this format and
provide the means to install a package, to remove a package, or to verify
a package installation. </para><para>A <emphasis>patch</emphasis> is an accumulation of fixes for a known
or potential problem within the Solaris OS or other supported software. A
patch can also provide a new feature or an enhancement to a particular software
release. A patch consists of files and directories that replace or update
existing files and directories. Most Solaris patches are delivered as a set
of sparse packages.</para><para>A <emphasis>sparse package</emphasis> contains only those objects that
have been altered since the packages were first delivered as part of the Solaris
distribution. Sparse packages accommodate patches that are smaller than if
they were redistributed as complete packages to provide software updates.
Delivering sparse packages also minimizes the changes that are made to the
customer's environment. For more information about patches, see <olink targetptr="swmgrpatchconcepts-30492" remap="internal">Managing Patches in the Solaris Operating
System</olink>.</para><sect2 id="swmgrpkgsconcepts-27"><title>Signed Packages, Patches, and Software
Updates</title><para><indexterm><primary>packages, signed</primary><secondary>overview</secondary></indexterm><indexterm><primary>packages</primary><secondary>signed</secondary><see>packages, signed</see></indexterm><indexterm><primary>patches</primary><secondary>signed</secondary><tertiary>applying</tertiary></indexterm><indexterm><primary>keystore</primary></indexterm><indexterm><primary>certificate, trusted</primary><secondary>definition</secondary></indexterm><indexterm><primary>user key</primary></indexterm><indexterm><primary>key, user</primary><see>user key</see></indexterm>Packages can include a digital signature. A package with a valid
digital signature ensures that the package has not been modified since the
signature was applied to the package. Using signed packages is a secure method
of downloading or adding packages because the digital signature can be verified
before the package is added to your system.</para><para>The same holds true for signed patches. A patch with a valid digital
signature ensures that the patch has not been modified since the signature
was applied to the patch. Using signed patches is a secure method of downloading
or applying patches because the digital signature can be verified before the
patch is applied to your system.</para><para>For more information about <emphasis>applying</emphasis> signed patches
to your system, see <olink targetptr="swmgrpatchtasks-14" remap="internal">Managing Solaris
Patches by Using the patchadd Command (Task Map)</olink>.</para><para>For information about <emphasis>creating</emphasis> signed packages,
see <olink targetdoc="packinstall" remap="external"><citetitle remap="book">Application Packaging Developer&rsquo;s Guide</citetitle></olink>.</para><para>A signed package is identical to an unsigned package, except for the
digital signature. The package can be installed, queried, or removed with
existing Solaris packaging tools. A signed package is also binary-compatible
with an unsigned package.</para><para>Before you can use <command>pkgadd</command> and <command>patchadd</command> to
add a package or patch with a digital signature to your system, you must set
up a package keystore with trusted certificates. These certificates are used
to identify that the digital signature on the package or patch is valid.</para><para>The following describes the general terms associated with signed packages
and patches.</para><variablelist><varlistentry><term><emphasis role="strong">Keystore</emphasis></term><listitem><para>A repository of certificates and keys that is queried when
needed.</para><itemizedlist><listitem><para>Java keystore &ndash; A repository of certificates that is
installed by default with the Solaris release. The Java keystore is usually
stored in the <filename>/usr/j2se/jre/lib/security</filename> directory.</para>
</listitem><listitem><para>Package keystore &ndash; A repository of certificates that
you import when adding signed packages and patches to your system.</para><para>The
package keystore is stored in the <filename>/var/sadm/security</filename> directory
by default.</para>
</listitem>
</itemizedlist>
</listitem>
</varlistentry><varlistentry><term><emphasis role="strong">Trusted certificate</emphasis></term><listitem><para>A certificate that holds a public key that belongs to another
entity. The <emphasis>trusted certificate</emphasis> is named as such because
the keystore owner trusts that the public key in the certificate indeed belongs
to the identity identified by the subject or owner of the certificate. The
issuer of the certificate vouches for this trust by signing the certificate.</para><para>Trusted certificates are used when verifying signatures, and when initiating
a connection to a secure (SSL) server.</para>
</listitem>
</varlistentry><varlistentry><term><emphasis role="strong">User key</emphasis></term><listitem><para>Holds sensitive cryptographic key information. This information
is stored in a protected format to prevent unauthorized access. A user key
consists of both the user's private key and the public key certificate that
corresponds to the private key.</para>
</listitem>
</varlistentry>
</variablelist><orderedlist><para>The process of using the <command>pkgadd</command> or <command>patchadd</command> command
to add a signed package or patch to your system involves three basic steps:</para><listitem><para>Adding the certificates to your system's package keystore
by using the <command>pkgadm</command> command</para>
</listitem><listitem><para>(Optional) Listing the certificates by using the <command>pkgadm</command> command</para>
</listitem><listitem><para>Adding the package with the <command>pkgadd</command> command
or applying the patch by using the <command>patchadd</command> command</para>
</listitem>
</orderedlist><para>For step-by-step instructions on adding signed packages to your system,
see <olink targetptr="swmgrpkgscli-2" remap="internal">Adding and Removing Signed Packages
by Using the pkgadd Command (Task Map)</olink>.</para><para>For step-by-step instructions on applying signed patches to your system
with the <command>patchadd</command> command, see <olink targetptr="swmgrpatchtasks-14" remap="internal">Managing Solaris Patches by Using the patchadd
Command (Task Map)</olink>.</para><sect3 id="swmgrpkgsconcepts-28"><title>Using Sun's Certificates to Verify
Signed Packages and Patches</title><para>Access to a package keystore is protected by a special password that
you specify when you import the Sun certificates into your system's package
keystore.</para><para>If you use the <command>pkgadm listcert</command> command, you can view
information about your locally stored certificates in the package keystore.
For example:</para><screen># <userinput>pkgadm listcert -P pass:</userinput><replaceable>store-pass</replaceable>
    Keystore Alias: /C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O
        Common Name: /C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O
   Certificate Type: Trusted Certificate
Issuer Common Name: /C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O
Validity Dates: &lt;May 18 00:00:00 1998 GMT&gt; - &lt;Aug 1 23:59:59 2028 GMT&gt;
 MD5 Fingerprint: 2D:BB:E5:25:D3:D1:65:82:3A:B7:0E:FA:E6:EB:E2:E1
   SHA1 Fingerprint: B3:EA:C4:47:76:C9:C8:1C:EA:F2:9D:95:B6:CC:A0:08:1B:67:EC:9D </screen><para>The following describes the output of the <command>pkgadm listcert</command> command.</para><variablelist><varlistentry><term><emphasis role="strong">Keystore Alias</emphasis></term><listitem><para>When you retrieve certificates for printing, signing, or removing,
this name must be used to reference the certificate.</para>
</listitem>
</varlistentry><varlistentry><term><emphasis role="strong">Command Name</emphasis></term><listitem><para>The common name of the certificate. For trusted certificates,
this name is the same as the keystore alias.</para>
</listitem>
</varlistentry><varlistentry><term><emphasis role="strong">Certificate Type</emphasis></term><listitem><para>Can be one of two types:</para><itemizedlist><listitem><para>Trusted certificate &ndash; A certificate that can be used
as a trust anchor when verifying other certificates. No private key is associated
with a trusted certificate.</para>
</listitem><listitem><para>Signing certificate &ndash; A certificate that can be used
when signing a package or patch. A private key is  associated with a signing
certificate.</para>
</listitem>
</itemizedlist>
</listitem>
</varlistentry><varlistentry><term><emphasis role="strong">Issuer Command Name</emphasis></term><listitem><para>The name of the entity that issued, and therefore signed,
this certificate. For trusted certificate authority (CA) certificates, the
issuer common name and common name are the same.</para>
</listitem>
</varlistentry><varlistentry><term><emphasis role="strong">Validity Dates</emphasis></term><listitem><para>A date range that identifies when the certificate is valid.</para>
</listitem>
</varlistentry><varlistentry><term><emphasis role="strong">MD5 Fingerprint</emphasis></term><listitem><para>An MD5 digest of the certificate. This digest can be used
to verify that the certificate has not been altered during transmission from
the source of the certificate.</para>
</listitem>
</varlistentry><varlistentry><term><emphasis role="strong">SHA1 Fingerprint</emphasis></term><listitem><para>Similar to an MD5 fingerprint, except that it is calculated
using a different algorithm.</para>
</listitem>
</varlistentry>
</variablelist><para>Each certificate is authenticated by comparing its MD5 and SHA1 hashes,
also called <emphasis>fingerprints</emphasis>, against the known correct fingerprints
published by the issuer.</para>
</sect3><sect3 id="swmgrpkgsconcepts-36"><title>Importing Sun's Trusted Certificates</title><itemizedlist><para>You can obtain Sun's trusted certificates for adding signed packages
and patches in the following ways:</para><listitem><para><emphasis role="strong">Java keystore</emphasis> &ndash; Import
Sun's Root CA certificate that is included by default in the Java keystore
when you install the Solaris release.</para>
</listitem><listitem><para><emphasis role="strong">Sun's Public Key Infrastructure (PKI)
site</emphasis> &ndash; If you do not have a Java keystore available on your
system, you can import the certificates from this site.</para>
</listitem>
</itemizedlist>
</sect3><sect3 id="swmgrpkgsconcepts-31"><title>Setting Up a Package Keystore</title><para>If your system already has a populated Java keystore, you can now export
the Sun Microsystems root CA certificate from the Java keystore with the <command>keytool</command> command. Then, use the <command>pkgadm</command> command
to import this certificate into the package keystore.</para><para>After the Root CA certificate is imported into the package keystore,
you can use the <command>pkgadd</command> and <command>patchadd</command> commands
to add signed packages and patches to your system.</para><note><para>The Sun Microsystems root-level certificates are only required
when adding Sun-signed patches and packages.</para>
</note><para>For step-by-step instructions on importing certificates into the package
keystore, see <olink targetptr="swmgrpkgscli-3" remap="internal">How to Import a Trusted Certificate
From the Java Keystore (pkgadm addcert)</olink>.</para><para>For complete instructions on adding signed packages with the <command>pkgadd</command> command, see <olink targetptr="swmgrpkgscli-13" remap="internal">How to Add a Signed
Package (pkgadd)</olink>.</para>
</sect3>
</sect2>
</sect1><sect1 id="swmgrpkgsconcepts-38835"><title>Tools for Managing Software Packages</title><para><indexterm id="swmgrpkgsconcepts-ix1704"><primary>software management</primary><secondary>tools for</secondary></indexterm><indexterm id="swmgrpkgsconcepts-ix1710"><primary><command>pkgrm</command> command</primary><secondary>overview</secondary></indexterm><indexterm id="swmgrpkgsconcepts-ix1711"><primary><command>pkgadd</command> command</primary><secondary>overview</secondary></indexterm><indexterm><primary><command>pkgadm</command> command</primary><secondary>overview</secondary></indexterm><indexterm id="swmgrpkgs-ix1834"><primary><command>pkgchk</command> command</primary><secondary>overview</secondary></indexterm><indexterm id="swmgrpkgs-ix1838"><primary><command>pkginfo</command> command</primary><secondary>overview</secondary></indexterm><indexterm id="swmgrpkgs-ix1839"><primary><command>pkgparam</command> command</primary><secondary>overview</secondary></indexterm><indexterm id="swmgrpkgs-ix18300"><primary><command>prodreg</command> command</primary><secondary>overview</secondary></indexterm><indexterm><primary><command>pkgtrans</command> command</primary><secondary>overview</secondary></indexterm>The following table describes
the tools for adding and removing software packages from a system after the
Solaris release is installed on a system.</para><table frame="topbot" id="swmgrpkgs-37371"><title>Tools or Commands for Managing
Software Packages</title><tgroup cols="3" colsep="0" rowsep="0"><?PubTbl tgroup dispwid="7.18in"?><colspec colname="column1" colwidth="111.72*"/><colspec colname="column2" colwidth="202.71*"/><colspec colname="colspec1" colwidth="295.58*"/><thead><row rowsep="1"><entry><para>Tool or Command </para>
</entry><entry><para>Description</para>
</entry><entry><para>Man Page</para>
</entry>
</row>
</thead><tbody><row><entry><para><command>installer</command></para>
</entry><entry><para>Launches an installer, such as Solaris installation GUI, to add software
from the Solaris media. The installer must be available either locally or
remotely.</para>
</entry><entry><para><olink targetdoc="refman" targetptr="installer-1m" remap="external"><citerefentry><refentrytitle>installer</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink></para>
</entry>
</row><row><entry><para><command>prodreg (GUI)</command></para>
</entry><entry><para>Launches an installer to add, remove, or display software product information.
Use Solaris Product Registry to remove or display information about software
products that were originally installed by using the Solaris installation
GUI or the Solaris <command>pkgadd</command> command.</para>
</entry><entry><para><olink targetdoc="refman" targetptr="prodreg-1m" remap="external"><citerefentry><refentrytitle>prodreg</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink></para>
</entry>
</row><row><entry><para>Solaris Product Registry <command>prodreg</command> Viewer (CLI) </para>
</entry><entry><para>Use the <command>prodreg</command> command to remove or display information
about software products that were originally installed by using the Solaris
installation GUI or the Solaris <command>pkgadd</command> command.</para>
</entry><entry><para><olink targetdoc="refman" targetptr="prodreg-1m" remap="external"><citerefentry><refentrytitle>prodreg</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink></para>
</entry>
</row><row><entry><para><command>pkgadd</command></para><para> </para>
</entry><entry><para>Installs a signed or unsigned software package.</para>
</entry><entry><para><olink targetdoc="refman" targetptr="pkgadd-1m" remap="external"><citerefentry><refentrytitle>pkgadd</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink></para>
</entry>
</row><row><entry><para><command>pkgadm</command></para>
</entry><entry><para>Maintains the keys and certificates used to manage signed packages and
signed patches.</para>
</entry><entry><para><olink targetdoc="refman" targetptr="pkgadm-1m" remap="external"><citerefentry><refentrytitle>pkgadm</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink></para>
</entry>
</row><row><entry><para><command>pkgchk</command></para>
</entry><entry><para>Checks the installation of a software package.</para>
</entry><entry><para><olink targetdoc="refman" targetptr="pkgchk-1m" remap="external"><citerefentry><refentrytitle>pkgchk</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink></para>
</entry>
</row><row><entry><para><command>pkginfo</command></para>
</entry><entry><para>Lists software package information.</para>
</entry><entry><para><olink targetdoc="refman" targetptr="pkginfo-1" remap="external"><citerefentry><refentrytitle>pkginfo</refentrytitle><manvolnum>1</manvolnum></citerefentry></olink></para>
</entry>
</row><row><entry><para><command>pkgparam</command></para><para> </para>
</entry><entry><para>Displays software package parameter values.</para>
</entry><entry><para><olink targetdoc="refman" targetptr="pkgparam-1" remap="external"><citerefentry><refentrytitle>pkgparam</refentrytitle><manvolnum>1</manvolnum></citerefentry></olink></para>
</entry>
</row><row><entry><para><command>pkgrm</command></para>
</entry><entry><para>Removes a software package.</para>
</entry><entry><para><olink targetdoc="refman" targetptr="pkgrm-1m" remap="external"><citerefentry><refentrytitle>pkgrm</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink></para>
</entry>
</row><row><entry><para><command>pkgtrans</command></para>
</entry><entry><para>Translates an installable package from one format to another format.
The <option>g</option> option instructs the <command>pkgtrans</command> command
to generate and store a signature in the resulting data stream.</para>
</entry><entry><para><olink targetdoc="refman" targetptr="pkgtrans-1" remap="external"><citerefentry><refentrytitle>pkgtrans</refentrytitle><manvolnum>1</manvolnum></citerefentry></olink></para>
</entry>
</row>
</tbody>
</tgroup>
</table><para>For more information about these commands, see <olink targetptr="swmgrpkgsgui-1" remap="internal">Chapter&nbsp;19, Managing Software With Solaris System Administration Tools (Tasks)</olink> and <olink targetptr="swmgrpkgscli-1" remap="internal">Chapter&nbsp;20, Managing Software by Using Package Commands (Tasks)</olink>.</para>
</sect1><sect1 id="swmgrpkgsconcepts-25409"><title>Adding or Removing a Software Package
(<command>pkgadd</command>)</title><para>All the software management tools that are listed in <olink targetptr="swmgrpkgs-37371" remap="internal">Table&nbsp;18&ndash;1</olink> are used to add,
remove, or query information about installed software. The Solaris Product
Registry <command>prodreg</command> viewer and the Solaris installation GUI
 both access install data that is stored in the Solaris Product Registry.
 The package tools, such as the <command>pkgadd</command> and <command>pkgrm</command> commands,
also access or modify install data.</para><para>When you add a package, the <command>pkgadd</command> command uncompresses
and copies files from the installation media to a local system's disk. When
you remove a package, the <command>pkgrm</command> command deletes all files
associated with that package, unless those files are also shared with other
packages. </para><para>Package files are delivered in package format and are unusable as they
are delivered. The <command>pkgadd</command> command interprets the software
package's control files, and then uncompresses and installs the product files
onto the system's local disk.</para><para>Although the <command>pkgadd</command> and <command>pkgrm</command> commands
do not log their output to a standard location, they do keep track of the
package that is installed or removed. The <command>pkgadd</command> and <command>pkgrm</command> commands store information about a package that has been installed
or removed in a software product database.</para><para>By updating this database, the <command>pkgadd</command> and <command>pkgrm</command> commands keep a record of all software products installed on the
system.</para>
</sect1><sect1 id="swmgrpkgsconcepts-16775"><title>Key Points for Adding Software
Packages (<command>pkgadd</command>)</title><itemizedlist><para><indexterm><primary>adding</primary><secondary>packages (prerequisites)</secondary></indexterm><indexterm><primary><command>pkgrm</command> command</primary><secondary>prerequisites for using</secondary></indexterm><indexterm><primary><command>pkgadd</command> command</primary><secondary>prerequisites for using</secondary></indexterm>Keep the following key points in mind before you install or remove
packages on your system:</para><listitem><para><indexterm id="swmgrpkgsconcepts-ix1725"><primary><literal>SUNW</literal> prefix</primary></indexterm><indexterm id="swmgrpkgsconcepts-ix1726"><primary>software management</primary><secondary>naming conventions for packages</secondary></indexterm><indexterm id="swmgrpkgsconcepts-ix1727"><primary>names</primary><secondary><literal>SUNW</literal> prefix</secondary></indexterm><indexterm id="swmgrpkgsconcepts-ix1728"><primary>names</primary><secondary>software package naming conventions</secondary></indexterm><emphasis role="strong">Package
naming conventions</emphasis> &ndash; Sun packages always begin with the prefix <literal>SUNW</literal>, as in <filename>SUNWaccr</filename>, <filename>SUNWadmap</filename>,
and <filename>SUNWcsu</filename>. Third-party packages usually begin with
a prefix that corresponds to the company's stock symbol.    </para>
</listitem><listitem><para><indexterm id="swmgrpkgsconcepts-ix1730"><primary><command>pkginfo</command> command</primary><secondary>overview</secondary></indexterm><emphasis role="strong">What software is already installed</emphasis> &ndash; You can
use the Solaris installation GUI, Solaris Product Registry <command>prodreg</command> viewer
(either GUI or CLI) or the <command>pkginfo</command> command to determine
the software that is already installed on a system.</para>
</listitem><listitem><para><emphasis role="strong">How servers and clients share software</emphasis> &ndash;
Clients might have software that resides partially on a server and partially
on the client. In such cases, adding software for the client requires that
you add packages to both the server and the client.</para>
</listitem>
</itemizedlist>
</sect1><sect1 id="swmgrpkgsconcepts-35627"><title>Guidelines for Removing Packages
(<command>pkgrm</command>)</title><para><indexterm id="swmgrpkgsconcepts-ix1812"><primary>removing</primary><secondary>software packages</secondary><tertiary>guidelines for</tertiary></indexterm><indexterm id="swmgrpkgsconcepts-ix1815"><primary><command>pkgrm</command> command</primary><secondary><command>rm</command> command (compared)</secondary></indexterm><indexterm id="swmgrpkgsconcepts-ix1816"><primary><command>pkgrm</command> command</primary><secondary>caution</secondary></indexterm><indexterm id="swmgrpkgsconcepts-ix1817"><primary><command>pkgrm</command> command</primary><secondary><command>rm</command> command (compared)</secondary></indexterm><indexterm id="swmgrpkgsconcepts-ix1818"><primary><command>removef</command> command</primary></indexterm>You should use one of the tools listed in <olink targetptr="swmgrpkgs-37371" remap="internal">Table&nbsp;18&ndash;1</olink> to remove a package,
even though you might be tempted to use the <command>rm</command> command
instead. For example, you could use the <command>rm</command> command to remove
a binary executable file. However, doing so is not the same as using the <command>pkgrm</command> command to remove the software package that includes that
binary executable. Using the <command>rm</command> command to remove a package's
files will corrupt the software products database. If you really only want
to remove one file, you can use the <command>removef</command> command. This
command will update the software product database correctly so that the file
is no longer a part of the package. For more information, see the <olink targetdoc="refman" targetptr="removef-1m" remap="external"><citerefentry><refentrytitle>removef</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page.    </para><para><indexterm><primary>administration file</primary><secondary>keyword</secondary></indexterm><indexterm id="swmgrpkgsconcepts-ix1819"><primary>adding</primary><secondary>multiple versions of a package</secondary></indexterm><indexterm id="swmgrpkgsconcepts-ix1820"><primary>multiple versions of software packages</primary></indexterm><indexterm id="swmgrpkgsconcepts-ix1821"><primary>base directory (<filename>basedir</filename>)</primary></indexterm><indexterm id="swmgrpkgsconcepts-ix1822"><primary><literal>basedir</literal> keyword (administration files)</primary></indexterm><indexterm id="swmgrpkgsconcepts-ix1823"><primary>directories</primary><secondary>base directory (<filename>basedir</filename>)</secondary></indexterm>If you intend
to keep multiple versions of a package, install new versions into a different
directory than the already installed package by using the <command>pkgadd</command> command.
For example, if you intended to keep multiple versions of a document processing
application. The directory where a package is installed is referred to as
the base directory. You can manipulate the base directory by setting the <literal>basedir</literal> keyword in a special file called an administration file.
For more information on using an <emphasis>administration file</emphasis> and
on setting the base directory, see <olink targetptr="swmgrpkgs-19113" remap="internal">Avoiding
User Interaction When Adding Packages (pkgadd)</olink> and the <olink targetdoc="refman" targetptr="admin-4" remap="external"><citerefentry><refentrytitle>admin</refentrytitle><manvolnum>4</manvolnum></citerefentry></olink> man page.</para><note><para>If you use the upgrade option when installing Solaris software,
the Solaris installation software checks the software product database to
determine the products that are already installed on the system.</para>
</note>
</sect1><sect1 id="restrict-1"><title>Restrictions on Adding and Removing Software
Packages and Patches for Solaris Releases That are Not Zones Aware</title><para><indexterm><primary>restrictions</primary><secondary>on adding and removing packages and patches</secondary></indexterm><indexterm><primary>zones</primary><secondary>restrictions on adding and removing packages and patches</secondary></indexterm><indexterm><primary>adding and removing packages and patches</primary><secondary>restrictions on</secondary><tertiary>zones</tertiary></indexterm><indexterm><primary>removing and adding packages and patches</primary><secondary>restrictions on</secondary><tertiary>zones</tertiary></indexterm>On systems that are running
a Solaris release that is not zones aware, using any command that accepts
the <option>R</option> option to specify an alternate root path for a global
zone that has non-global zones installed, does not work.</para><itemizedlist><para>These commands include:</para><listitem><para><command>pkgadd</command></para>
</listitem><listitem><para><command>pkgrm</command></para>
</listitem><listitem><para><command>patchadd</command></para>
</listitem><listitem><para><command>patchrm</command></para>
</listitem>
</itemizedlist><para>See the <olink targetdoc="refman" targetptr="pkgadd-1m" remap="external"><citerefentry><refentrytitle>pkgadd</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink>, <olink targetdoc="refman" targetptr="pkgrm-1m" remap="external"><citerefentry><refentrytitle>pkgrm</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink>, <olink targetdoc="refman" targetptr="patchadd-1m" remap="external"><citerefentry><refentrytitle>patchadd</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink>, and <olink targetdoc="refman" targetptr="patchrm-1m" remap="external"><citerefentry><refentrytitle>patchrm</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man pages.</para><para>For additional information, see <olink targetptr="gdytw" remap="internal">Restrictions
on Using patchadd -R to Create an Alternate root Path</olink>.</para>
</sect1><sect1 id="swmgrpkgs-19113"><title>Avoiding User Interaction When Adding Packages
(<command>pkgadd</command>)</title><para>This section provides information about avoiding user interaction when
adding packages with the <command>pkgadd</command> command.</para><sect2 id="swmgrpkgsconcepts-3"><title>Using an Administration File</title><para><indexterm id="swmgrpkgs-ix1844"><primary>adding</primary><secondary> packages with administration files </secondary></indexterm><indexterm id="swmgrpkgs-ix1845"><primary><command>pkgadd</command> command</primary><secondary>bypassing user interaction</secondary></indexterm><indexterm id="swmgrpkgs-ix1846"><primary><command>pkgadd</command> command</primary><secondary sortas="pkgadd command:a option (administration file)"><option>a</option> option (administration file)</secondary></indexterm>When you use the <command>pkgadd</command> <option>a</option> command, the command consults a special administration file for
information about how the installation should proceed. Normally, the <command>pkgadd</command> command performs several checks and prompts the user for confirmation
before it actually adds the specified package. You can, however, create an
administration file that indicates to the <command>pkgadd</command> command
that it should bypass these checks and install the package without user confirmation.
  </para><para><indexterm id="swmgrpkgs-ix1849"><primary sortas="var/sadm/install/admin directory"><filename>/var/sadm/install/admin</filename> directory</primary></indexterm>The <command>pkgadd</command> command, by default, checks
the current working directory for an administration file. If the <command>pkgadd</command> command
doesn't find an administration file in the current working directory, it checks
the <filename>/var/sadm/install/admin</filename> directory for the specified
administration file. The <command>pkgadd</command> command also accepts an
absolute path to the administration file.  </para><note><para>Use administration files judiciously. You should know where a
package's files are installed and how a package's installation scripts run
before using an administration file to avoid the checks and prompts that the <command>pkgadd</command> command normally provides.</para>
</note><para><indexterm id="swmgrpkgs-ix1851"><primary><literal>noask_pkgadd</literal> administration file</primary></indexterm>The following example shows an administration file
that prevents the <command>pkgadd</command> command from prompting the user
for confirmation before installing the package. </para><screen>mail=
instance=overwrite
partial=nocheck
runlevel=nocheck
idepend=nocheck
rdepend=nocheck
space=nocheck
setuid=nocheck
conflict=nocheck
action=nocheck
networktimeout=60
networkretries=3
authentication=quit
keystore=/var/sadm/security
proxy=
basedir=default</screen><para><indexterm id="swmgrpkgs-ix1852"><primary>removing</primary><secondary>packages with administration files and</secondary></indexterm>Besides using administration
files to avoid user interaction when you add packages, you can use them in
several other ways. For example, you can use an administration file to quit
a package installation (without user interaction) if there's an error or to
avoid interaction when you remove packages by using the <command>pkgrm</command> command. </para><para><indexterm id="swmgrpkgs-ix1854"><primary><command>pkgadd</command> command</primary><secondary>alternate base directory and</secondary></indexterm><indexterm id="swmgrpkgs-ix1855"><primary>multiple versions of software packages</primary></indexterm><indexterm id="swmgrpkgs-ix1857"><primary>base directory (<filename>basedir</filename>)</primary></indexterm><indexterm id="swmgrpkgs-ix1861"><primary><command>pkgadd</command> command</primary><secondary sortas="pkgadd command:a option (administration file)"><option>a</option> option (administration file)</secondary></indexterm><indexterm id="swmgrpkgs-ix1862"><primary><command>pkgadd</command> command</primary><secondary>bypassing user interaction</secondary></indexterm>You can also assign a special installation
directory for a package, which you might do if you wanted to maintain multiple
versions of a package on a system. To do so, set an alternate base directory
in the administration file by using the <literal>basedir</literal> keyword.
The keyword specifies where the package will be installed. For more information,
see the <olink targetdoc="refman" targetptr="admin-4" remap="external"><citerefentry><refentrytitle>admin</refentrytitle><manvolnum>4</manvolnum></citerefentry></olink> man
page.</para>
</sect2><sect2 id="swmgrpkgsconcepts-4"><title>Using a Response File (<command>pkgadd</command>)</title><para>A response file contains your answers to specific questions that are
asked by an <firstterm>interactive package</firstterm>. An interactive package
includes a <filename>request</filename> script that asks you questions prior
to package installation, such as whether optional pieces of the package should
be installed.</para><para>If you know prior to installation that the package is an interactive
package, and you want to store your answers to prevent user interaction during
future installations, use the <command>pkgask</command> command to save your
response. For more information on this command, see <olink targetdoc="refman" targetptr="pkgask-1m" remap="external"><citerefentry><refentrytitle>pkgask</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink>.</para><para>Once you have stored your responses to the questions asked by the <filename>request</filename> script, you can use the <command>pkgadd -r</command> command
to install the package without user interaction.</para>
</sect2>
</sect1>
</chapter><?Pub *0000045895 0?>