pkgadd
Install software packages (primarily Solaris)
TLDR
Install a local software package
Update an already installed package from a local package
SYNOPSIS
pkgadd [-d device] [-n] [-s spool_directory] [-w ask] [-r response_file] [-a admin_file] [-q] package...
PARAMETERS
-d device
Specifies the device from which to retrieve the package. This can be a directory, a tape drive, or another type of storage device.
-n
Non-interactive mode. Installs the package without prompting the user for input. Requires pre-defined responses via the -r option, or the default values are used.
-s spool_directory
Specifies a directory to spool the package to before installing it. This is useful for staging the package before installation.
-w ask
Prompts the user for confirmation before writing any files.
-r response_file
Specifies a file containing responses to questions asked during the installation process. Used for automated installations.
-a admin_file
Specifies an administration file that controls the installation process, overriding default behaviors. This file can customize the installation process.
-q
Quiet mode. Suppresses most output during the installation process.
package
The name of the package to install. This can be a full pathname to a package file or the name of a package in the specified device.
DESCRIPTION
The pkgadd command is a Solaris utility used to install software packages from a variety of media such as local directories, mounted file systems, or removable media. It manages the installation process, prompting for information when necessary, ensuring dependencies are met, and configuring the software. It typically works with package files in the `.pkg` format. While primarily used on Solaris-based systems, its functionality is similar to package managers found on other Unix-like operating systems (e.g., apt, yum, pacman).
The command handles tasks like checking for existing versions of the software, creating directories, setting file permissions, and updating system configuration files. It maintains a database of installed packages, allowing for easy removal or upgrade of software later. The package metadata contains crucial information about the package, including dependencies, installation scripts, and configuration files. The pkgadd command has largely been supplanted by IPS (Image Packaging System) in newer Solaris releases.
CAVEATS
The pkgadd command is specific to Solaris and older versions of similar systems. It is not used on modern Linux distributions. The newer IPS (Image Packaging System) is the recommended package management system for current Solaris releases. Understanding the dependencies within the package is crucial to avoid conflicts with other installed software.
ADMINISTRATION FILE
The administration file (specified with the -a option) is a powerful tool for customizing the installation process. It can be used to specify installation directories, set file permissions, and perform other tasks before, during, or after the package is installed.
ERROR HANDLING
If pkgadd encounters an error during installation, it will attempt to rollback any changes that were made. However, it is always a good practice to back up your system before installing any new software.
HISTORY
The pkgadd command originated with SunOS and Solaris and was the primary package management tool for those operating systems for a long time. It was designed to provide a consistent and reliable method for installing and managing software packages. It aimed to handle dependencies and configuration automatically. Over time, with the introduction of IPS (Image Packaging System), pkgadd has become less relevant in newer Solaris environments.