System Administration Guide: Basic Administration

Chapter 22 Managing Software (Overview)

The management of software involves adding and removing software from standalone systems, servers, and their clients. This chapter describes background and other information about the various tools available for installing and managing software.

This is a list of the overview information in this chapter.

This chapter does not describe installing the Solaris software on a new system, nor does it describe installing or upgrading a new version of the Solaris software. For information on installing or upgrading Solaris software, see Solaris 9 Installation Guide.

What's New in Software Management in the Solaris 9 4/03 Release?

This section describes a new software management feature in the Solaris 9 4/03 release.

prodreg Command Enhancements

You can now use several options to the prodreg command to access and manage the Solaris Product Registry from the command line.

For information on using the prodreg command to administer software packages, see Managing Software With the Solaris Product Registry Command-Line Interface (Task Map).

What's New in Software Management in the Solaris 9 Release?

This section describes new software management features in the Solaris 9 release.

Signed Patches

All patches that are available for the Solaris 2.6, 7, 8, and 9 releases include a digital signature. A valid digital signature ensures that the patch has not been modified since the signature was applied.

Using signed patches is a secure method of downloading or applying patches because the patches include a digital signature that can be verified before the patch is applied to your system.

Signed patches are stored in Java archive format (JAR) files and are available from the SunSolve OnlineSM web site.

For overview information about signed patches, see Chapter 24, Managing Solaris Patches (Overview). For troubleshooting signed patch problems, go to http:sunsolve.Sun.COM/pub-cgi/show.pl?target=patches/spfaq.

Solaris Product Registry 3.0

The Solaris Product Registry 3.0 is a GUI tool that enables you to install and uninstall software packages.

For information on using this product to manage software packages, see Managing Software With the Solaris Product Registry GUI (Task Map).

Patch Analyzer

When you use the SolarisTM Web Start program to upgrade to a Solaris 9 Update Release, the patch analyzer performs an analysis on your system to determine which (if any) patches will be removed or downgraded by upgrading to the Solaris Update Release. You do not need to use the Patch Analyzer when you upgrade to the Solaris 9 release.

For information on using this tool when you are upgrading to a Solaris 9 update release, see “Upgrading to a Solaris Update Release (Tasks)” in Solaris 9 Installation Guide.

Solaris Management Console Patch Manager

The Solaris Management Console provides a new Patches Tool for managing patches. You can only use the Patches Tool to add patches to a system running the Solaris 9 release.

For information on starting the Solaris Management Console, see How to Start the Console as Superuser or as a Role.

Where to Find Software Management Tasks

Use this table to find step-by-step instructions for managing software.

Software Management Topics 

For More Information 

Installing Solaris software 

Solaris 9 Installation Guide

Adding or removing Solaris software packages after installation 

Chapter 23, Managing Software (Tasks)

Adding or removing Solaris patches after installation 

Chapter 25, Managing Solaris Patches (Tasks)

Troubleshooting software package problems 

“Troubleshooting Software Package Problems (Tasks)” in System Administration Guide: Advanced Administration

Overview of Software Packages

Software management involves installing or removing software products. Sun and its third-party vendors deliver products in a form called a software package. (The term packaging 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 operating environment provides a set of utilities that interpret this format and provide the means to install or remove a package or to verify its installation.

Tools for Managing Software Packages

The tools for adding and removing software packages from a system after the Solaris release is installed on a system are the following:

Table 22–1 Software Package Tools

Add, Remove, and Display Software Package Information With This Tool 

Additional Features 

The Solaris Web Start program 

Launch an installer to add products included in the Solaris 9 media pack. You cannot add individual software packages. 

Solaris Product Registry (GUI) 

Launch an installer to add, remove, or display software product information. Use Product Registry to remove or display information about software products that were originally installed by using the Solaris Web Start program or the Solaris pkgadd command.

Solaris Product Registry prodreg Viewer (command line interface)

Use the prodreg command to remove or display information about software products that were originally installed by using the Solaris Web Start program or the Solaris pkgadd command.

Package commands (pkgadd, pkgrm, pkginfo)

Incorporate these commands into scripts, set up optional files to avoid user interaction or perform special checks, and copy software packages to spool directories. 

Adding or Removing a Software Package

All the software management tools that are listed in Table 22–1 are used to add, remove, or query information about installed software. Admintool, the Solaris Product Registry prodreg viewer, and the Web Start program all access install data that is stored in the Solaris Product Registry. The package tools, such as the pkgadd and pkgrm commands, also access or modify install data.

When you add a package, the pkgadd command uncompresses and copies files from the installation media to a local system's disk. When you remove a package, the pkgrm command deletes all files associated with that package, unless those files are also shared with other packages.

Package files are delivered in package format and are unusable as they are delivered. The pkgadd command interprets the software package's control files, and then uncompresses and installs the product files onto the system's local disk.

Although the pkgadd and pkgrm commands do not log their output to a standard location, they do keep track of the product that is installed or removed. The pkgadd and pkgrm commands store information about a package that has been installed or removed in a software product database.

By updating this database, the pkgadd and pkgrm commands keep a record of all software products installed on the system.

Key Points for Adding or Removing Software Packages

Keep the following key points in mind before you install or remove packages on your system:

Guidelines for Removing Packages

You should use one of these tools to remove a package, even though you might be tempted to use the rm command instead. For example, you could use the rm command to remove a binary executable file, but that is not the same as using the pkgrm command to remove the software package that includes that binary executable. Using the rm 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 removef command, which will update the software product database correctly so that the file is no longer a part of the package. For more information, see removef(1M).

If you intend to keep multiple versions of a package (for example, multiple versions of a document processing application), install new versions into a different directory than the already installed package with the pkgadd command. The directory where a package is installed is referred to as the base directory. You can manipulate the base directory by setting the basedir keyword in a special file called an administration file. For more information on using an administration file and on setting the base directory, see Avoiding User Interaction When Adding Packages and admin(4).


Note –

If you use the upgrade option when installing the Solaris software, the Solaris installation software consults the software product database to determine the products that are already installed on the system.


Avoiding User Interaction When Adding Packages

Using an Administration File

When you use the pkgadd -a command, the command consults a special administration file for information about how the installation should proceed. Normally, the pkgadd 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 pkgadd command that it should bypass these checks and install the package without user confirmation.

The pkgadd command, by default, checks the current working directory for an administration file. If the pkgadd command doesn't find an administration file in the current working directory, it checks the /var/sadm/install/admin directory for the specified administration file. The pkgadd command also accepts an absolute path to the administration file.


Caution – Caution –

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 pkgadd command normally provides.


The following example shows an administration file that will prevent the pkgadd command from prompting the user for confirmation before installing the package.


mail=
instance=overwrite
partial=nocheck
runlevel=nocheck
idepend=nocheck
rdepend=nocheck
space=nocheck
setuid=nocheck
conflict=nocheck
action=nocheck
basedir=default

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 with the pkgrm command.

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 basedir keyword), which specifies where the package will be installed. For more information, see admin(4).

Using a Response File

A response file contains your answers to specific questions that are asked by an interactive package. An interactive package includes a request script that asks you questions prior to package installation, such as whether or not optional pieces of the package should be installed.

If prior to installation, you know that the package you want to install is an interactive package, and you want to store your answers to prevent user interaction during future installations of this package, you can use the pkgask command to save your response. For more information on this command, see pkgask(1M).

Once you have stored your responses to the questions asked by the request script, you can use the pkgadd -r command to install the package without user interaction.