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?

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

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 Adding and Removing Software With the Product Registry.

Patch Analyzer

When you use the SolarisTM Web Start program to upgrade to a Solaris 8 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 8 update release, see “Upgrading to a Solaris Update Release” 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 24, 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:

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 

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.

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. 

Admintool 

View the online help that provides general information on using this GUI tool. It's probably easiest for you to use Admintool to add and remove software if you are: 

  • Unfamiliar with software package naming conventions

  • Uncomfortable using command line options

  • Managing software only on one system at time

The following table describes the software management tasks that you can perform with the GUI tools rather than the pkgadd and pkgrm commands.

Table 22–1 Software Management Capabilities

Software Management Tasks 

Performed With Admintool, Solaris Product Registry, Web Start program? 

Add and remove software packages on standalone or server systems 

Yes 

Easily view all installed software 

Yes  

Easily view and select packages from an installation media 

Yes 

Add packages to a spool directory 

No 

Eliminate user interaction by using an administration file 

No 

Adding or Removing a Software Package

All the software management tools listed in Table 23–1 are used to add and remove software. Admintool, Solaris Product Registry, and the Web Start program are GUI front-ends to the pkgadd and pkgrm commands.

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