Create local repository

Configure the server

zfs create rpool/export/IPS
zfs set atime=off rpool/export/IPS

Download all files from http://www.oracle.com/technetwork/server-storage/solaris11/downloads/local-repository-2245081.html

./install-repo.ksh -d /export/IPS/repo -v -c
svccfg -s application/pkg/server setprop pkg/inst_root=/export/IPS/repo
svccfg -s application/pkg/server setprop pkg/readonly=true
svcadm refresh application/pkg/server
svcadm enable application/pkg/server
svcs application/pkg/server
pkgrepo refresh -s /export/IPS/repo

Configure the client

pkg set-publisher -G '*' -g http://192.168.1.40/ solaris
pkg publisher

Populate the repository with monthly SRU

Download the repo and the installation guide

./install-repo.ksh -c -v -d /export/IPS/repo
svcadm restart svc:/application/pkg/server
pkg update --accept

Update the OS without a remote repository

./install-repo.ksh -c -v -d /export/IPS/repo
pkg set-publisher -g file:///export/IPS/repo solaris
pkg update --accept

Commands

  • Check the status of the local repo: pkgrepo info -s http://192.168.1.40
  • Check the repo status: pkg publisher
  • Unsetup the default publisher: pkg unset-publisher solaris
  • List all packages in the repository: pkg search -p -s http://192.168.1.40 '*'
  • Search for a file: pkg search -o path,pkg.name -l /usr/bin/screen
  • Rebuild the search index to improve search speed: pkg rebuild-index