System Administration Guide, Volume 1

How to Add a Package to a Spool Directory

  1. Log in as superuser to the server or standalone system.

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

    For information on removing spooled packages, see "How to Remove a Spooled Package".

  3. Add a software package to a spool directory.


    # pkgadd -d device-name -s spooldir pkgid ...

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

    -s spooldir

    Specifies the name of the spool directory where the package will be spooled. You must specify a spooldir.

    pkgid

    (Optional) Is the name of one or more packages (separated by spaces) to be added to the spool directory. If omitted, pkgadd copies all available packages.

  4. Verify that the package has been copied successfully to the spool directory, using the pkginfo command.


    $ pkginfo -d spooldir| grep pkgid
    

    If pkgid is copied correctly, the pkginfo command returns a line of information about it. Otherwise, pkginfo returns the system prompt.

Example--Setting Up a Spool Directory From a Mounted CD

The following example shows a command to copy the SUNWaudio and SUNWab2m packages from a mounted SPARC Solaris 8 CD to the default spool directory (/var/spool/pkg).


# pkgadd -d /cdrom/sol_8_sparc/s0/Solaris_8/Product -s /var/spool/pkg SUNWaudio
Transferring <SUNWaudio> package instance

Example--Setting Up a Spool Directory From a Remote Package Server

If packages you want to copy are available from a remote system, you can manually mount the directory containing the packages (in package format) and copy them to a local spool directory. The following example shows the commands to do this. In the following example, assume the remote system named package-server has software packages in the /latest-packages directory. The mount command mounts the package directory locally on /mnt, and the pkgadd command copies the SUNWman package from /mnt to the default spool directory (/var/spool/pkg).


# mount -F nfs -o ro package-server:/latest-packages /mnt
# pkgadd -d /mnt -s /var/spool/pkg SUNWman
Transferring <SUNWman> package instance

If the automounter is running at your site, you do not have 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 -s /var/spool/pkg SUNWman
Transferring <SUNWman> package instance

Example--Installing a Package From the Default Spool Directory

The following example shows a command to install the SUNWman package from the default spool directory. (When no options are used with pkgadd, it searches /var/spool/pkg for the named packages.)


# pkgadd SUNWman
	.
	.
	.
Installation of <SUNWman> was successful.