Skip Navigation Links | |
Exit Print View | |
Adding and Updating Oracle Solaris 11.1 Software Packages Oracle Solaris 11.1 Information Library |
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
Controlling Installation of Optional Components
Showing and Changing Variant Values
Showing and Changing Facet Values
Locking Packages to a Specified Version
Relaxing Version Constraints Specified by Incorporations
Specifying a Default Application Implementation
Avoiding Installing Some Packages in a Group Package
Specifying the Version to Install
Specifying a Version Constraint Prior to Updating
Constraining the Available Packages
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
Displaying the Values of Image Properties
Setting the Value of an Image Property
To install and update software, you need to be able to contact a package repository.
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] [-F format] [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 P LOCATION solaris origin online F http://pkg.oracle.com/solaris/release/ isvpub (non-sticky) origin online F file:///export/isvrepo/ devtool (disabled) origin online F http://pkg.example1.com/
The TYPE column indicates whether the LOCATION value is an origin or a mirror. See Repository Origins and Mirrors for descriptions.
Between the STATUS and LOCATION columns, the P column specifies whether the location is proxied. Values in this column are true (T) or false (F). File repositories are never proxied. HTTP repositories with the value F are not proxied, unless an $http_proxy environment variable is currently set (the pkg publisher output still shows F). HTTP repositories with the value T are proxied using the proxy specified with the --proxy option when the origin was added with pkg set-publisher. When you specify the -F tsv option to pkg publisher, the P column contains any proxy that is set for that mirror or origin. See Installing Packages in Non-Global Zones for an example.
Specify publishers by name to display detailed configuration for those publishers.
$ pkg publisher solaris Publisher: solaris Alias: Origin URI: http://pkg.oracle.com/solaris/release/ SSL Key: None SSL Cert: None Client UUID: e15e3228-eada-11df-80ab-8023183d954b Catalog Updated: July 25, 2012 11:40:03 PM Enabled: Yes Properties: proxied-urls = []
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.
$ pkg publisher -P PUBLISHER TYPE STATUS P LOCATION solaris origin online F http://pkg.oracle.com/solaris/release/
Use the pkg set-publisher command to perform the following operations:
Configure a new publisher.
Set publisher origins and mirrors.
Enable or disable a publisher. A newly-added publisher is enabled by default. A disabled publisher is not used when populating the package list or in install, uninstall, or update package operations. The properties for a disabled publisher can still be set and viewed. If only one publisher is enabled, that publisher cannot be disabled.
Set publisher stickiness. A newly-added publisher is sticky by default. If a publisher is non-sticky, then a package that was installed from this publisher could be updated from another publisher.
Set publisher search order. A newly-added publisher is last in the search order by default. The publisher search order is used to find packages to install. The publisher search order is used to find packages to update if the publisher that the package was originally installed from is non-sticky.
The first publisher that provides a matching package is used as the installation source. If that publisher does not provide a version of the package that can be installed in this image, then the installation operation fails. To install from a publisher further down the search order, provide more information in the package FMRI, such as the publisher name or the package version string.
Specify SSL keys and certificates for a publisher.
Set and unset a publisher property, and add and remove a publisher property value. See Configuring Package Signature Properties.
The pkg set-publisher command has two forms. In the following form, the name of the publisher is required:
/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 ...] [--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] [--proxy proxy_to_use] publisher
In the following form, the name of the publisher is optional because you have specified the repository URI:
/usr/bin/pkg set-publisher -p repo_uri [-Ped] [-k ssl_key] [-c ssl_cert] [--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] [--proxy proxy_to_use] [publisher]
The following command adds a new publisher named devtool 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.
$ pfexec pkg set-publisher -P -g http://pkg.example1.com/release/ devtool
The following command enables the isvpub publisher and sets it ahead of the devtool publisher in the search order.
$ pfexec pkg set-publisher --enable --search-before devtool isvpub
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.
$ pfexec pkg set-publisher -G '*' -g file:///export/isvrepo/ isvpub
The following commands show adding an origin to the solaris publisher. If multiple origins are configured for a given publisher in an image, the IPS client attempts to choose the best origin from which to retrieve package data.
$ pkg publisher PUBLISHER TYPE STATUS P LOCATION solaris origin online F file:///export/repoSolaris11/ $ pfexec pkg set-publisher -g http://pkg.oracle.com/solaris/release/ solaris $ pkg publisher PUBLISHER TYPE STATUS P LOCATION solaris origin online F file:///export/repoSolaris11/ solaris origin online F http://pkg.oracle.com/solaris/release/
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.
$ pfexec pkg set-publisher -m http://pkg.example3.com/ devtool $ pkg publisher PUBLISHER TYPE STATUS P LOCATION devtool origin online F http://pkg.example1.com/ devtool mirror online F http://pkg.example3.com/
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.
$ pfexec pkg set-publisher -k /root/creds/example.key -c /root/creds/example.cert \ --approve-ca-cert /tmp/example_file.pem isvpub
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 --proxy option to specify a persistent web proxy URI from which to retrieve content for the specified origin (-g) or mirror (-m). The proxy value is stored as part of the publisher configuration. At run time, $http_proxy or related environment variables override this proxy setting. See the ENVIRONMENT section of the curl(1) man page for additional information about proxy environment variables.
Use the pkg unset-publisher command to remove a publisher.
$ pfexec pkg unset-publisher devtool