Previous Table of Contents Next



CAUTION! Do not edit the /var/sadm/install/admin/default file. If you want to change the defaults, create your own admin file.

If you create a custom admin file and specify it from the command line using the -a admin option, the pkgadd and pkgrm commands automatically look for the file first in the current working directory and then in the /var/sadm/install/admin directory. If you put the admin file in another directory, you must specify the absolute pathname for the file as part of the command-line argument. The following example specifies an admin file in the /var/tmp directory:

# pkgadd -a /var/tmp/admin -d /cdrom/cdrom0

To create an admin file, use any editor. Define each parameter=value pair on a single line. You do not need to assign values to all 11 parameters. If you do not assign a value and pkgadd needs one, it uses the default value ask.


CAUTION! You cannot define the value ask in an admin file for use with noninteractive installation. Installation will fail when a problem occurs.

The following example shows an admin file created to automatically install files in the /usr/apps/pkgs directory and to use the default values for other parameters:

oak% more /var/sadm/install/admin/admin
mail=
instance=unique
partial=ask
runlevel=ask
idepend=ask
rdepend=ask
space=ask
setuid=ask
conflict=ask
action=ask
basedir=/usr/apps/pkgs/$PKGINST
oak%

Setting Up the Installation Base Directory

Before you begin software installation, decide where you want to install the software. If you want to install in a directory other than /opt, create an admin file in the /var/sadm/install/admin directory and set the basedir parameter to the directory where you want to install the software. If basedir is the only parameter you want to change, you can create an admin file that contains only one parameter. All other parameters use the default values. Refer to Table 13-2 on 285-286 for a description of the other parameters you can customize.

The following steps show how to create an admin file that installs files in the /usr/apps/pkgs directory and uses the name of the package as the directory name, and how to use the admin file to control installation:

1.  Become superuser.
2.  Type cd /var/sadm/install/admin and press Return.
3.  Use any editor to create a file. Assign the file any name you like, other than the name "default." A suggested filename is "admin."
4.  Type basedir=/usr/apps/pkgs/$PKGINST to the file.
5.  Save the changes and quit.

Installing a Package with an Alternative Admin File

Unless you specify a different administrative file, the pkgadd command uses the /var/sadm/install/admin/default file, which specifies the base directory as /opt. To use an alternative admin file, use the following syntax:

pkgadd -d device -a admin-file pkgid

The following example installs the package SUNWssser from the CD-ROM device using an admin file named admin:

# pkgadd -d /cdrom/cdrom0 -a admin SUNWssser

Adding Packages

Use the pkgadd command to install software packages. The default pkgadd command is interactive and can inform you of potential problems in the installation as they occur.


NOTE:  You must have superuser privileges to use the pkgadd command.

The syntax of the pkgadd command is as follows:

pkgadd -d device-name [ -a admin-file ] pkgid

For example, to interactively install a software package named SUNWpkgA from a directory named /cdrom/cdrom0, you would type /usr/sbin/pkgadd -d /cdrom/cdrom0 SUNWssser and press Return. To install the same software package using an alternative administrative file named admin, type /usr/sbin/pkgadd -d /cdrom/cdrom0 -a admin SUNWssser and press Return. See “Setting Up Package Configuration Files” on page 284 for information about package administrative files.


Previous Table of Contents Next