Setting up a local IPS Repository to be used by clients on a LAN is simpler than I thought with Solaris 11 Express and can be done using the following steps:
- Download Oracle Solaris Express 11 Express Repository Images
- Copy Repository data from ISO locally
- Configure the Solaris 11 IPS Repository Server
- Configure Client(s) to use the Repository Server
I will not go into much detail on how to download and mount the ISO image, but the image repository iso may be downloaded from the Oracle Website. The repository image may be split and should be concatenated before the ISO is configured with lofiadm and mounted with mount respectively.
Download Oracle Solaris Express 11 Express Repository Images
The images are downloaded from the Oracle website and can be prepared for mounting by doing:
$ unzip sol-11-exp-201011-repo-full-iso-a.zip $ unzip sol-11-exp-201011-repo-full-iso-b.zip $ cat sol-*[ab] > sol-11-exp-201011-repo-full.iso
Copy Repository data from ISO locally
First create a location to store the repository data (i.e., /ips/sol11exp), then rsync the ISO contents. Provided the ISO has been mounted under /mnt/ copy the repo/ sub-folder under /ips/sol11exp/
# zfs create rpool/ips # zfs set mountpoint=/ips rpool/ips # mkdir /ips/sol11exp # rsync -avz /mnt/repo /ips/sol11exp/
Configure the Solaris 11 IPS Repository Server
Once the full repository from ISO/DVD has been copied locally we need to configure the ‘pkg/server’ service which will listen on the default HTTP port (80) for client requests.
# svccfg -s application/pkg/server setprop pkg/inst_root=/ips/sol11exp/repo # svccfg -s application/pkg/server setprop pkg/readonly=true
Refresh and start pkg.depotd
# svcs -a | grep pkg/server disabled 9:40:28 svc:/application/pkg/server:default # svcadm refresh application/pkg/server # svcadm enable application/pkg/server # svcs -a | grep pkg/server online 7:05:34 svc:/application/pkg/server:default
Configure Client(s) to use the Repository Server
Add our new publisher, using the ORIGIN, http://blackice.goldcoast.com, and make it Preferred
# pkg set-publisher -P -g http://blackice.goldcoast.com solaris
Our list of publishers should now like:
# pkg publisher PUBLISHER TYPE STATUS URI solaris (preferred) origin online http://blackice.goldcoast.com/ solaris (preferred) origin online http://pkg.oracle.com/solaris/release/ # pkg publisher solaris Publisher: solaris Alias: Origin URI: http://blackice.goldcoast.com/ SSL Key: None SSL Cert: None Origin URI: http://pkg.oracle.com/solaris/release/ SSL Key: None SSL Cert: None Client UUID: 3h734564-80i4-11e0-bfb6-102219147c44 Catalog Updated: November 12, 2010 07:24:25 PM Enabled: Yes
Oh, and rebuild the index!
# pkg rebuild-index PHASE ITEMS Indexing Packages 73/496
Note: With this current version of Solaris 11 Express the local repository is not not searchable. For example you cannot, yet, perform on the local repository just added. :
# pkg search zsh pkg: Some repositories failed to respond appropriately: solaris: http protocol error: code: 503 reason: Service Unavailable URL: 'http://blackice.goldcoast.com/search/1/False_2_None_None_%3A%3A%3Azsh'.
The remote Oracle repository is searchable.