To enable clients to access the local repository by using NFS, create and publish an NFS share.
$ zfs share -o share.nfs=on rpool/export/IPSpkgrepos%ipsrepo
See the zfs_share(1M) man page for more information, such as additional share.nfs properties that you could set.
Use one of the following tests to confirm that the share is published:
$ grep repo /etc/dfs/sharetab /export/IPSpkgrepos ipsrepo nfs sec=sys,rw
$ dfshares solaris RESOURCE SERVER ACCESS TRANSPORT solaris:/export/IPSpkgrepos solaris - -
To enable client systems to get packages from your local file repository, set the origin for the publisher.
Use the following command to determine the names of publishers in your repository:
$ pkgrepo info -s /export/IPSpkgrepos/Solaris PUBLISHER PACKAGES STATUS UPDATED solaris 4768 online 2014-04-02T18:11:55.640930Z
To update installed packages, install packages that depend on installed packages, or install a non-global zone, the repository that you set as the publisher origin must contain at least the same software that is installed in the image where you are setting the publisher. The repository can also contain older or newer software, but it must contain the same software that is installed in the image.
The following command shows that the specified repository is a not suitable publisher origin for this image:
$ pkg list entire NAME (PUBLISHER) VERSION IFO entire 0.5.11-0.175.2.0.0.36.0 i-- $ pkgrepo list -Hs http://pkg.oracle.com/solaris/release email@example.com pkgrepo list: The following pattern(s) did not match any packages: firstname.lastname@example.org
The following command shows that the specified repository is a suitable publisher origin for this image:
$ pkgrepo list -Hs /export/IPSpkgrepos/Solaris email@example.com solaris entire 0.5.11,5.11-0.175.2.0.0.36.0:20140401T190148Z
Using the repository location and publisher name from the previous steps, run the following command to set the origin for the publisher:
$ pkg set-publisher -G '*' -M '*' -g /export/IPSpkgrepos/Solaris/ solaris
Removes all existing origins for the solaris publisher.
Removes all existing mirrors for the solaris publisher.
Adds the URI of the newly-created local repository as the new origin for the solaris publisher.
See Configuring Publishers in Adding and Updating Software in Oracle Solaris 11.2 for more information about configuring publishers.
If you reset the publisher origin in other images, perform the suitability test again: Other images might have a different version of software installed and might not be able to use this repository. If you reset the publisher origin in images on other systems, use a full path for the -g argument.