Relocating Solaris packages

The easiest way to relocate a Solaris package from its default package base directory (basedir) is to specify an admin file (i.e., the installation administration file) of none when installing the package. You will then be prompted for the package's basedir.

pkgadd example using /opt as package base directory:
# pkgadd -a none -d ./rsync-2.6.9-sol8-sparc-local


Enter path to package base directory [?,q] /opt
Using </opt> as the package base directory.


If you would like to create an alternate admin file and refer to it in pkgadd and pkgrm commands, place it in /var/sadm/install/admin, and refer to it using pkgadd or pkgrm's -a flag.

In this example, I create an alternate admin file named opt with a basedir of /opt.

# cd /var/sadm/install/admin
# sed 's#basedir=default/basedir=/opt#' default > opt

You may then refer to the opt package administration file when adding or removing a package.

# pkgadd -a none -d ./rsync-2.6.9-sol8-sparc-local

More information:

Back to
Last modified: 2007/06/22