Showing posts with label pkgrm. Show all posts
Showing posts with label pkgrm. Show all posts

Thursday, March 9, 2017

Solaris Package administration in Solaris 10

In this post, we will get the knowledage about the package administartion on Solaris operating system. As you aware that on solaris server the packages administration work is quite different from other Unix operating system. Solaris system has different architecture for this one.

So, we will discuss first which command is generally used on Solaris 10 server which are listed below.

pkginfo- It displays all software package information.
pkgadd- It installs all software packages to the system.
pkgrm- It removes a package from the system.
pkgchk- It checks package installation state.
pkgtrans- It translates packages from one server format to another.

Commands & Syntax for checking a package information:

For checking a packages information on Solaris 10 operating system we will used the "pkginfo" command. You can find the all command and syntax related to "pkginfo" is listed below.

  • Please use the below command to display information about installed software packages.

          sun# pkginfo | more

  • Please use the below command to view additional information.

          sun# pkginfo -l | more

  • Please use the below command to view information of a specific package.

          sun# pkginfo -l SUNWman

  • Please use the below command to find how many packages are currently installed.

          sun# pkginfo | wc -l

  • To list all installed software packages, please use the below command.

          sun# more /var/sadm/install/contents

These above commands with their syntax are daily used on Solaris 10 platform.

Commands & Syntax for checking a package installation:

For checking an information about packages are installed or not on the server , we need to use "pkgchk"  command. Please find the below example as describe below.

  • Please use the below command to check the contents & attributes of a currently installed package.

          sun# pkgchk SUNWpkgs

  • Please use the below command to list the all files contained in a software package.

          sun# pkgchk -v SUNWpkgs

  • Please use the below commands to find if the contents & attributes of a file have changed since it was installed with its software package.

          sun# pkgchk -p /etc/shadow  

  • Please use the below commands to list information about selected files that make up a package.

          sun# pkgchk -l -p /usr/bin/showrev

If the packages is installed already then in that case "pkgchk" command don't show any output that clear meaning is that packages is already installed on the server.

Commands & Syntax for adding a package software:

For adding a packages on the server, we will used the "pkgadd" command. Please find the below commands and their syntax which is daily used on Solaris operating system.

  • Please use the below command to add a software packages from DVD. For this you need to move on dvd directory where all the packages are listed.
          sun# pkgadd -d . SUNWpkgs

Using above command you can add the packages from DVD.

Commands & Syntax for removing a package software:

For removing the packages from the server, we will used "pkgrm" command. Please find the below commands and their syntax as listed below.

  • Please use the below command to remove the software packages.

          sun# pkgrm SUNWpkgs

  • Please use the below command to remove a package from the spool directory.

          sun# pkgrm -s /export/pkg SUNWldam

Commands & Syntax for translating a packages format:

For translating a packages format from one format to another , we will used the "pkgtrans" command for the same.

  • Please use the below command to translate a package from file system format in /var/tmp to data stream format.

          sun# pkgtrans /var/tmp /tmp/SUNWpkgs.pkg SUNWpkgs

  • Please use the below command to create a data streamed package.

          sun# pkgtrans -s Product /var/tmp/stream.pkg SUNWpkgg SUNWpkgs

 Using above commands and synatx we can easily translate their file format to stream format. If you have any doubt regarding this post please comment on the post.