Solaris 11 IPS pkg Command Examples
The Image Packaging System (IPS) is a framework that enables software lifecycle management, such as installation, upgrade and removal of packages. IPS also enables users to create their own software packages, create and manage package repositories, and copy and mirror existing package repositories. Packages can be installed only into file systems that are part of a boot environment (BE). For example, on a default Oracle Solaris 11 installation, only datasets under rpool/ROOT/BEname/ are supported for package operations.
The pkg command is the primary user interface in the Image Packaging System. The table below shows the pkg commands that are used to perform common package management tasks. It compares these commands with equivalent commands used in Oracle Solaris 10.
Package Management Task | IPS Command | Oracle Solaris 10 Equivalent |
---|---|---|
Install package. | pkg install | pkgadd -a |
Display package state and version information. | pkg list | pkginfo |
Verify package installation. | pkg verify | pkgchk -v |
Display package information. | pkg info | pkginfo -v |
Display the contents of a package. | pkg contents | pkgchk -l |
Search for a package. | pkg search | pkgchk -l -p |
Uninstall a package. | pkg uninstall | pkgrm |
Install package updates. | pkg update | pkgadd |
pkg Command Examples: search
Shown below are examples of searching for a package (apptrace).
pkg search apptrace INDEX ACTION VALUE PACKAGE pkg.description set Apptrace utility for application tracing, including shared objects pkg:/developer/apptrace@5.11-0.175.2.0.0.42.2 pkg.summary set Apptrace Utility pkg:/developer/apptrace@5.11-0.175.2.0.0.42.2 basename file usr/bin/apptrace pkg:/developer/apptrace@5.11-0.175.2.0.0.42.2 pkg.fmri set solaris/developer/apptrace pkg:/developer/apptrace@5.11-0.175.2.0.0.42.2
# pkg search basename:apptrace INDEX ACTION VALUE PACKAGE basename file usr/bin/apptrace pkg:/developer/apptrace@5.11-0.175.2.0.0.42.2
# pkg search -o pkg.name basename:apptrace PKG.NAME developer/apptrace
pkg Command Examples: info
Shown below is an example of displaying package information. The –r option retrieves the information data from the repositories of the image’s configured publishers.
# pkg info -r apptrace Name: developer/apptrace Name: developer/apptrace Summary: Apptrace Utility Description: Apptrace utility for application tracing, including shared objects Category: Development/System State: Not installed Publisher: solaris Version: 0.5.11 Build Release: 5.11 Branch: 0.175.2.0.0.42.2 Packaging Date: June 24, 2014 06:39:19 PM Size: 162.04 kB FMRI: pkg://solaris/developer/apptrace@0.5.11,5.11-0.175.2.0.0.42.2:20140624T183919Z
pkg Command Examples: install
Shown below are examples of performing a package (apptrace) installation dry run (-n) and a real package installation.
# pkg install -nv apptrace Packages to install: 1 Estimated space available: 36.11 GB Estimated space to be consumed: 19.83 MB Create boot environment: No Create backup boot environment: No Rebuild boot archive: No Changed packages: solaris developer/apptrace None -> 0.5.11,5.11-0.175.2.0.0.42.2:20140624T183919Z
# pkg install apptrace Packages to install: 1 Create boot environment: No Create backup boot environment: No DOWNLOAD PKGS FILES XFER (MB) SPEED Completed 1/1 10/10 0.1/0.1 81.7k/s PHASE ITEMS Installing new actions 29/29 Updating package state database Done Updating package cache 0/0 Updating image state Done Creating fast lookup database Done Updating package cache 1/1
pkg Command Examples: list, verify, and contents
This section shows examples of listing an installed package (apptrace), verifying package status, and displaying the contents of a package. The pkg contents command with no option just lists the directory, file, and link content. You can use the pkg contents command to find dependencies between packages.
# pkg list apptrace NAME (PUBLISHER) VERSION IFO developer/apptrace 0.5.11-0.175.2.0.0.42.2 i--
# pkg verify -v apptrace PACKAGE STATUS pkg://solaris/developer/apptrace OK
# pkg contents apptrace PATH usr usr/bin usr/bin/apptrace usr/lib usr/lib/abi usr/lib/abi/amd64 usr/lib/abi/amd64/apptrace.so.1 usr/lib/abi/apptrace.so.1 ... ...
pkg Command Examples: uninstall
Below is an example of uninstalling a package (apptrace) with pkg command.
# pkg uninstall apptrace Packages to remove: 1 Create boot environment: No Create backup boot environment: No PHASE ITEMS Removing old actions 25/25 Updating package state database Done Updating package cache 1/1 Updating image state Done Creating fast lookup database Done Updating package cache 1/1
No comments:
Post a Comment