Sun Microsystems Logo
Products & Services
 
Support & Training
 
 

Previous Previous     Contents     Index     Next Next

ProcedureHow to Add a Signed Package (pkgadd)

This procedure assumes that you have imported Sun's Root CA certificate. For more information, see How to Import a Trusted Certificate into the Package Keystore (pkgadm addcert).

For information about setting up a proxy server, see How to Set Up a Proxy Server (pkgadd).

  1. Become superuser or assume an equivalent role.

  2. Add a signed package.

    # pkgadd -d /pathname/package-name

    The -d device-name option specifies the device from which the package is installed. The device can be a directory, tape, diskette, or removable disk. The device can also be a data stream created by the pkgtrans command.

Examples--Adding a Signed Package (pkgadd)

The following example shows how to add a signed package that has already been downloaded.

# # pkgadd -d /tmp/signed_pppd
The following packages are available:
  1  SUNWpppd     Solaris PPP Device Drivers
                  (sparc) 11.10.0,REV=2003.05.08.12.24

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]: all
Enter keystore password:
## Verifying signature for signer <User Cert 0>
.
.
.

The following example shows how to install a signed package using an HTTP URL as the device name. The URL must point to a stream-formatted package.

# pkgadd -d http://install/signed-video.pkg

## Downloading...
..............25%..............50%..............75%..............100%
## Download Complete
.
.
.

Managing Software Packages With Package Commands (Task Map)

The following task map describes the software management tasks that you can do with the package commands for both signed and unsigned packages.

Task

Description

For Instructions

Add a software packages to the local system

You can add software packages to the local system with the pkgadd command.

How to Add Software Packages (pkgadd) 

Add software packages to a spool directory

You can add software packages to a spool directory without actually installing the software.

Adding a Software Package to a Spool Directory 

List information about all installed software packages

You can list information about installed packages with the pkginfo command.

How to List Information About All Installed Packages (pkginfo) 

Check the integrity of installed software packages

You can verify the integrity of install software packages with the pkgchk command.

How to Check the Integrity of Installed Software Packages (pkgchk) 

Remove software packages

You can remove unneeded software packages with the pkgrm command.

How to Remove Software Packages (pkgrm) 

ProcedureHow to Add Software Packages (pkgadd)

  1. Become superuser or assume an equivalent role.

  2. Remove any already installed packages with the same names as the ones you are adding.

    This step ensures that the system keeps a proper record of software that has been added and removed. There might be times when you want to maintain multiple versions of the same application on the system. For strategies on maintaining multiple software copies, see Guidelines for Removing Packages (pkgrm), and for task information, see How to Remove Software Packages (pkgrm).

  3. Add a software package to the system.

    # pkgadd -a admin-file -d device-name pkgid ... 

    -a admin-file

    (Optional) Specifies an administration file that the pkgadd command should consult during the installation. For details about using an administration file, see Using an Administration File in the previous chapter.

    -d device-name

    Specifies the absolute path to the software packages. device-name can be the path to a device, a directory, or a spool directory. If you do not specify the path where the package resides, the pkgadd command checks the default spool directory (/var/spool/pkg). If the package is not there, the package installation fails.

    pkgid

    (Optional) Is the name of one or more packages, separated by spaces, to be installed. If omitted, the pkgadd command installs all available packages.

    If the pkgadd command encounters a problem during installation of the package, it displays a message related to the problem, followed by this prompt:

    Do you want to continue with this installation?

    Respond with yes, no, or quit. If more than one package has been specified, type no to stop the installation of the package being installed. The pkgadd command continues to install the other packages. Type quit to stop the installation.

  4. Verify that the package has been installed successfully.

    # pkgchk -v pkgid

    If no errors occur, a list of installed files is returned. Otherwise, the pkgchk command reports the error.

Example--Adding Software Packages From a Mounted CD

The following example shows how install the SUNWpl5u package from a mounted Solaris 9 CD. The example also shows how to verify that the package files were installed properly.

# pkgadd -d /cdrom/cdrom0/s0/Solaris_9/Product SUNWpl5u
	.
	.
	.
Installation of <SUNWpl5u> was successful.
# pkgchk -v SUNWpl5u
/usr
/usr/bin
/usr/bin/perl
/usr/perl5
/usr/perl5/5.00503
.
.
.

Example--Installing Software Packages From a Remote Package Server

If the packages you want to install are available from a remote system, you can manually mount the directory that contains the packages (in package format) and install packages on the local system.

The following example shows how to install software packages from a remote system. In this example, assume that the remote system named package-server has software packages in the /latest-packages directory. The mount command mounts the packages locally on /mnt, and the pkgadd command installs the SUNWpl5u package.

# mount -F nfs -o ro package-server:/latest-packages /mnt
# pkgadd -d /mnt SUNWpl5u
	.
	.
	.
Installation of <SUNWpl5u> was successful.

If the automounter is running at your site, you do not need to mount the remote package server manually. Instead, use the automounter path, in this case, /net/package-server/latest-packages, as the argument to the -d option.

# pkgadd -d /net/package-server/latest-packages SUNWpl5u
	.
	.
	.
Installation of <SUNWpl5u> was successful.

The following example is similar to the previous example, except that it uses the -a option and specifies an administration file named noask-pkgadd, which is illustrated in Avoiding User Interaction When Adding Packages (pkgadd). In this example, assume that the noask-pkgadd administration file is in the default location, /var/sadm/install/admin.

# pkgadd -a noask-pkgadd -d /net/package-server/latest-packages SUNWpl5u
	.
	.
	.
Installation of <SUNWpl5u> was successful.

Previous Previous     Contents     Index     Next Next