Package Mangement in Solaris

November 22, 2009

Here are the list of useful commands frequently used during package management.

pkgadd

Adds software packages to the system

pkgrm

Removes software packages from the system

pkginfo

Displays software package information

pkgchk

Checks the accuracy of a software package installation

So, we’ll take an example to use above commands. I’ve a package called SUNWant.Z, which I want to install.

So I use the following syntax to add a package.

pkgadd -d SUNWant.Z

To check whether your package has been installed, you can use pkginfo and grep the output to find a specific package.

pkginfo | grep SUNWant

To check the accuracy of the package, you can use pkgchk command as:

pkgchk SUNWant

To remove above package, we have the pkgrm command to use:

pkgrm SUNWant

Refer the Sun documentation for further details.


How to create a Solaris Flash Archive (Flar)

October 22, 2009

A solaris filesystem can be copied into an flash archive. This archive can then be used to install the Solaris OS on another system. Installation through flar is fast and efficient.

The format of the command is as follows:

# flarcreate -n name options path/filename

name
The name that you give the archive.

options
For a description of options, see The flar Command.

path
The path to the directory in which you want to save the archive file. If you do not specify a path, flarcreate saves the archive file in the current directory.

filename
The name of the archive file.

So for example I wan to create a flar with the name Solaris9 and the filename as myarchive.flar, the command will look like as mentioned below:

# flarcreate -n solaris9 -c myarchive.flar

where -c is an option to create compressed flar.

See the manpages for more options.