1. Create partition to store the packages. I have been told a complete will be around 65GB, but I am using a cut down version.
$ pfexec zfs create -o atime=off rpool/export/pkg
2. Create repository3. Obtain list of packages you want. In this case everything currently install and the release (134) I am interested in.pfexec pkgsend -s file:///export/pkg create-repository -–set-property publisher.prefix=opensolaris.org
$ cd /export/pkg $ pfexec pkg list -Hva | egrep “134:|install” > /tmp/pkglist.txt $ head -1 /tmp/pkglist.txt pkg://opensolaris.org/SUNWcs@0.5.11,5.11-0.134:20100302T005446Z $ pfexec cat /tmp/pkglist.txt | sed 's/pkg:\/\/opensolaris\.org\///' \ | cut -f 1 -d ' ' > /tmp/packages.txt $ head -1 /tmp/packages.txt SUNWcs@0.5.11,5.11-0.134:20100302T005446Z
4.Now download IPS package and place it into local repository.
5. You can test it to see all is there (http://localhost:80)$ for i in $(cat /tmp/packages.txt); do pfexec pkgrecv -s http://pkg.opensolaris.org/dev -d file:///export/pkg "$i" done
$ pfexec /usr/lib/pkg.depotd -d /export/pkg -p 80
6. To make sure the repository is always available.
$ pfexec svccfg -s application/pkg/server setprop pkg/inst_root=/export/pkg $ pfexec svcadm refresh pkg/server $ pfexec svcadm enable pkg/server