JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Adding and Updating Oracle Solaris 11 Software Packages     Oracle Solaris 11 Information Library
search filter icon
search icon

Document Information

Preface

1.  Introduction to the Image Packaging System

2.  IPS Graphical User Interfaces

3.  Getting Information About Software Packages

4.  Installing and Updating Software Packages

5.  Configuring Installed Images

Configuring Publishers

Displaying Publisher Information

Adding, Modifying, or Removing Package Publishers

Locking Packages to a Specified Version

Marking Packages To Be Avoided

Controlling Installation of Optional Components

Displaying a Variant

Changing a Variant

Displaying a Facet

Changing a Facet

Updating an Image

Configuring Image and Publisher Properties

Boot Environment Policy Image Properties

Properties For Signing Packages

Image Properties for Signed Packages

Publisher Properties for Signed Packages

Configuring Package Signature Properties

Additional Image Properties

Setting Image Properties

Displaying the Values of Image Properties

Setting the Value of an Image Property

Resetting the Value of an Image Property

Creating an Image

Viewing Operation History

Configuring Publishers

To install and update software, you need to be able to contact a package repository.

Displaying Publisher Information

Use the pkg publisher command to display information about package publishers configured for this image. The publishers are listed in the order in which they are searched to find packages when the publisher is not specified in the package FMRI.

/usr/bin/pkg publisher [-HPn] [publisher ...]

By default, the solaris publisher is configured on a newly installed Oracle Solaris 11 system. Use the pkg publisher command to check the origin of your publisher.

$ pkg publisher
PUBLISHER                   TYPE    STATUS  URI
solaris                     origin  online  http://pkg.oracle.com/solaris11/release/
isv.com        (non-sticky) origin  online  file:/export/isv-repo/
example.com    (disabled)   origin  online  http://pkg.example.com/

Specify publishers by name to display detailed configuration for those publishers.

$ pkg publisher solaris
       Publisher: solaris
           Alias:
      Origin URI: http://pkg.oracle.com/solaris11/release/
         SSL Key: None
        SSL Cert: None
     Client UUID: 00000000-3db4-fcc2-0111-000000000000
 Catalog Updated: Thu Sep 22 21:06:03 2011
         Enabled: Yes
Signature Policy: verify

Use the -P option to display only the first publisher in the publisher search order. Use the -n option to display only enabled publishers. The -H option omits headers in the output.

Adding, Modifying, or Removing Package Publishers

Use the pkg set-publisher command to perform the following operations:

/usr/bin/pkg set-publisher [-Ped] [-k ssl_key] [-c ssl_cert]
    [-g origin_to_add | --add-origin origin_to_add ...]
    [-G origin_to_remove | --remove-origin origin_to_remove ...]
    [-m mirror_to_add | --add-mirror mirror_to_add ...]
    [-M mirror_to_remove | --remove-mirror mirror_to_remove ...]
    [-p repo_uri] [--enable] [--disable] [--no-refresh]
    [--reset-uuid] [--non-sticky] [--sticky]
    [--search-after publisher] [--search-before publisher] [--search-first]
    [--approve-ca-cert path_to_CA]
    [--revoke-ca-cert hash_of_CA_to_remove]
    [--unset-ca-cert hash_of_CA_to_remove]
    [--set-property name_of_property=value]
    [--add-property-value name_of_property=value_to_add]
    [--remove-property-value name_of_property=value_to_remove]
    [--unset-property name_of_property_to_delete]
    [publisher]

The following command adds a new publisher named data.com with an origin URI specified with the -g option and sets this publisher to be first in the search order. Use the -P option or the --search-first option to set the specified publisher first in the search order.

# pkg set-publisher -P -g http://pkg.data.com/release/ data.com

The following command enables the example.com publisher and sets it ahead of the isv.com publisher in the search order.

# pkg set-publisher --enable --search-before isv.com example.com

Use the -p option to retrieve publisher configuration information from the specified repository URI. If a publisher is specified, then only the matching publisher is added or updated. If no publisher is specified, all publishers are added or updated as appropriate. The -p option cannot be combined with the -g, --add-origin, -G, --remove-origin, -m, --add-mirror, -M, --remove-mirror, --disable, --enable, --no-refresh, or --reset-uuid options.

To change the origin URI for a publisher, add the new URI and remove the old URI. Use the -g option to add a new origin URI. Use the -G option to remove the old origin URI.

# pkg set-publisher -G '*' -g http://pkg.example.com/support/ example.com

Use the -m option to add a URI as a mirror for the specified publisher. See Repository Origins and Mirrors for an explanation of the difference between an origin and a mirror. Use the -M option to remove a URI as a mirror for the specified publisher.

# pkg set-publisher -m http://pkg.data.com/release2/ data.com
# pkg publisher
PUBLISHER                   TYPE    STATUS   URI
data.com                    origin  online   http://pkg.data.com/release/
data.com                    mirror  online   http://pkg.data.com/release2/

Use the -k option to specify the client SSL key. Use the -c option to specify the client SSL certificate. Use the --approve-ca-cert option to add the specified certificate as a CA certificate that is trusted. The hashes of the user approved CA certificates are listed in the output of the pkg publisher command for this publisher. See Displaying Publisher Information.

# pkg set-publisher -k /root/creds/example.key -c /root/creds/example.cert \
--approve-ca-cert /tmp/example_file.pem example.com

Use the --revoked-ca-cert option to treat the specified certificate as revoked. The hashes of the user revoked CA certificates are listed in the output of the pkg publisher command for this publisher.

Use the --unset-ca-cert option to remove the specified certificate from the list of approved and the list of revoked certificates.

When you specify the -no-refresh option, the repositories for the image's publishers are not contacted to retrieve the newest list of available packages and other metadata.

Use the --reset-uuid option to choose a new unique identifier that identifies this image to its publisher.

Use the pkg unset-publisher command to remove a publisher.

# pkg unset-publisher isv.com