Solaris 11 IPS Repository

By removing the need for an Internet connection for packaging operations, a Solaris 11 Local Image Packing Systems (IPS) Repository offers two major advantages: speed and security. A local IPS Repository allows administrators to manage and retrieve packages for Solaris systems on the local network.

Ensure the Oracle-recommended 15 GB of space is available for the repository which does not include the 7 GB download. The repository software can be obtained in 3 ways:

  1. Internet download via Solaris CLI
  2. Internet download via Oracle website (sol-11-1111-repo-full.iso-a and sol-11-1111-repo-full.iso-b from http://www.oracle.com/technetwork/server-storage/solaris11/downloads/index.html or as part of the Solaris 11 Media Kit downloadable at https://edelivery.oracle.com) burned to DVD or loaded directly from ISO
  3. Physical DVD Media Kit

ZFS Filesystem:

If using ZFS, it is recommended to create a ZFS file system for the repository. As root, create the file system for the repository using:

# zfs create -o mountpoint=/ipsrepo rpool/ipsrepo

To increase performance when updating the repository by disabling file access-time updates, set the atime to off using:

# zfs set atime=off rpool/ipsrepo

CLI:

Create the infrastructure for the Local Repository using the pkgrepo command:

# pkgrepo create /ipsrepo

Copy the repository files from Oracle’s website using the pkgrecv command:

# pkgrecv -s http://pkg.oracle.com/solaris/release/ -d /ipsrepo

To update the repository to match Oracle’s, run this same command.  Only incremental changes will be copied.

DVD / File Install:

Another option is to use the Solaris 11 Media Kit, or the two repository .iso files which are available online through Oracles software delivery cloud (https://edelivery.oracle.com/) or the Oracle Software Downloads for Solaris 11 site (http://www.oracle.com/technetwork/server-storage/solaris11/downloads/index.html).

Combine the two ISO downloads using cat

# cat sol-11-1111-repo-full.iso-a sol-11-1111-repo-full.iso-b > \
sol-11-1111-repo-full.iso

Mount the resulting iso file

# mount -F hsfs /IPSRepo/sol-11-1111-repo-full.iso /mnt

Copy the files to the dataset created above

# rsync -avz /mnt/repo /ipsrepo

Check the target directory to make sure all the files copied.  Then unmount the image.

# ls /ipsrepo
# umount /mnt

Make the Repository Available:

The repository can be made available to other networked systems via NFS or HTTP.

NFS Share:

Set a share name for the repository:

# zfs set share=name=ipsrepo,path=/ipsrepo,prot=nfs rpool/ipsrepo

Turn on the sharenfs property:

# zfs set sharenfs=on rpool/ipsrepo

Note: The /etc/dfs/dfstab is no longer used for NFS share definitions. Use share(1m) or zfs(1m) only.

Check to make sure an entry appears in your shared file system table:

 # grep repo /etc/dfs/sharetab
/ipsrepo        ipsrepo      nfs     sec=sys,rw

On a remote system, check to see if  the share is accessible

# dfshares
RESOURCE                              SERVER ACCESS    TRANSPORT
SolarisRepo:/ipsrepo                  SolarisRepo  -         -

On a client machine, run the command:

# pkg set-publisher –G ‘*’ –M ‘*’ –g /net/<hostname>/ipsrepo solaris

or

# pkg set-publisher –G ‘*’ –M ‘*’ –g /net/<IPaddress>/ipsrepo solaris

HTTP Interface:

Configure IPS HTTP services through Service Management Facility (SMF):

# svccfg -s application/pkg/server setprop pkg/inst_root=/ipsrepo
# svccfg -s application/pkg/server setprop pkg/readonly=true

Verify:

# svcprop -p pkg/inst_root application/pkg/server
/ipsrepo

Specify a port number (Default: 80):

# svccfg –s application/pkg/server setprop pkg/port=8080

Refresh the service and start it:

# svcadm refresh application/pkg/server
# svcadm enable application/pkg/server

On a client machine, run the command:

# pkg set-publisher –G ‘*’ –M ‘*’ –g http://<hostname>:8080/ solaris

or

# pkg set-publisher –G ‘*’ –M ‘*’ –g http://<IPaddress>:8080/ solaris

Verify with the pkg publisher command:

# pkg publisher
PUBLISHER           TYPE     STATUS   URI
solaris             origin   online   http://SolarisRepo:8080/

Clients should now be able to download packages from the repository. A good test is to install a fresh zone.  The zone will pull packages from the IPS Repository.

Related Articles:


ABOUT US
Seeds of Genius, Inc. offers a full range of IT solutions including hardware and software products in addition to consulting, installation and support services. For more information, please visit our main web site at http://www.seedsofgenius.com or contact our Technical Sales department at (410) 312-9806.