Solaris 11 Command Cheat Sheet – Image Packaging System

What is Image the Packaging System?

  • The Image Packaging System (IPS) is a new network-centric software packaging and delivery system in Oracle Solaris 11. IPS allows efficient, observable, and controllable transitions between known configurations of software content providing administrators with safe system upgrade environments and better control over planned system downtime schedules.
  • The ZFS file system is integral to IPS, providing administrators the ability to perform updates on a file system clones on live production systems.
  • NOTE: While many IPS commands that query the system (list, info, contents, search, history) can be performed by any user, commands that make changes to the system image must be performed by adopting an appropriate administrative role.

Installing Packages and Updating a System

Installing new packages on your system does not require a new boot environment (BE) to be created.

However, creating a ZFS snapshot and clone initially consumes no additional space and is an instantaneous operation. So it should be considered as an administrative best practice.

Install a package called diagnostic/wireshark:

 pkg install diagnostic/wireshark

Uninstall a package called diagnostic/wireshark using a short form of the package name:

 pkg uninstall wireshark

Update all possible packages to the newest version, including all Oracle Solaris zones:

 pkg update

Do a dry run of an update of all possible packages to the newest version:

 pkg update -nv

Update all system packages to the newest version and require a new BE:

 pkg update –be-name fix-nfs-issue

 

Getting Information or Searching for Packages

List packages currently installed on a system:

pkg list

Show information about an installed package called wireshark:

 pkg info wireshark

Show information about an uninstalled package called xchat:

 pkg info -r xchat

Show the contents of an installed package called wireshark:

pkg contents wireshark

show all PNG files of an installed package called wireshark:

pkg contents -o path -a path=\*.png wireshark

Search all locally installed packages for the match gcc:

pkg search -l gcc

Search all packages in the configured repositories that contain dev header gcrypt-module.h:

pkg search ‘gcrypt-module.h’

Search for all packages in the configured repositories that have the classification Web Services/Application and Web Servers:

pkg search -o pkg.name ‘set:info.classification:*Application and Web Servers’

Search for all packages installed locally that have a dependency on library/libxml2:

 pkg search –l -o pkg.name ‘depend::library/libxml2’

 

Managing Repositories and Publishers

 

List currently associated publishers:

pkg publisher

Add a publisher at a specified repository URI:

pkg set-publisher -p http://www.example.com/solaris11

Add a publisher:

pkg set-publisher -g http://www.example.com/solaris11 siteapps

Remove a publisher:

pkg unset-publisher siteapps

Query a repository URI for publisher names and package counts:

pkgrepo -s http://pkg.oracle.com/solaris11/release info

Change to the Oracle Solaris support repository with pre-downloaded certificates and keys from the Oracle Solaris release repository:

pkg set-publisher -G http://pkg.oracle.com/solaris11/release \

 -g http://pkg.oracle.com/solaris11/support -k /path/to/ssl_key \

-c /path/to/ssl_cert solaris

 

Miscellaneous Commands

 

Browse package command history (includes graphical Package Manager client):

pkg history

Purge package command history:

pkg purge-history

Verify the integrity of the current system image:

pkg verify

Verify the integrity of installed package called wireshark:

pkg verify wireshark

Fix any errors reported by pkg verify on an installed package called wireshark:

pkg fix wireshark

Freeze a package called wireshark to prevent any accidental future updates:

 pkg freeze wireshark

Ramdev

Ramdev

I have started unixadminschool.com ( aka gurkulindia.com) in 2009 as my own personal reference blog, and later sometime i have realized that my leanings might be helpful for other unixadmins if I manage my knowledge-base in more user friendly format. And the result is today's' unixadminschool.com. You can connect me at - https://www.linkedin.com/in/unixadminschool/

2 Responses

  1. September 2, 2015

    […] Solaris 11 Command Cheat Sheet – Image Packaging System […]

  2. September 17, 2015

    […] Read Command Cheat Sheet – Image Packaging System […]

What is in your mind, about this post ? Leave a Reply

Close
  Our next learning article is ready, subscribe it in your email

What is your Learning Goal for Next Six Months ? Talk to us