Sunday, March 31, 2013

Solaris 11 Image Packaging System

I am loving Solaris 11 with each and everyday i am using it, the new Image packaging system (IPS) is really nice easy way for installing, updating the Solaris packages  of the server and it feels good to have the packages readily available on the network instead of searching for the solaris dvd/cd.

Lets just see how we can setup a IPS (Image Packaging system) server which will be used for this purpose.

* Create a zfs dataset for the repository

root@suntest:~# zfs create rpool/IPS
root@suntest:~# zfs set mountpoint=/IPS rpool/IPS
root@suntest:~# mkdir /IPS/Solaris11

* Mount the iso and copy all the files to the mountpoint

root@suntest:~# rsync -a /media/SOL_11_1_REPO_FULL/ /IPS/Solaris11/

* Set the path where the repository
root@suntest:~# svccfg -s application/pkg/server setprop pkg/inst_root=/IPS/Solaris11/repo
root@suntest:~# svccfg -s application/pkg/server setprop pkg/readonly=true
root@suntest:~# svcadm refresh application/pkg/server
root@suntest:~# svcadm enable application/pkg/server

* Set the publisher so that we can fetch the package from the IPS server
root@suntest:~# pkg publisher
PUBLISHER                   TYPE     STATUS P LOCATION
solaris                     origin   online F http://pkg.oracle.com/solaris/release

root@suntest:~# pkg unset-publisher solaris
root@suntest:~# pkg publisher
PUBLISHER                   TYPE     STATUS P LOCATION

root@suntest:~# pkg set-publisher -O http://192.168.174.5 solaris
root@suntest:~# pkg publisher
PUBLISHER                   TYPE     STATUS P LOCATION
solaris                     origin   online F http://192.168.174.5/

root@suntest:~# pkg list
NAME (PUBLISHER)                                  VERSION                    IFO
archiver/gnu-tar                                  1.26-0.175.1.0.0.24.0      i--
compress/bzip2                                    1.0.6-0.175.1.0.0.24.0     i--
compress/gzip                                     1.4-0.175.1.0.0.24.0       i--
compress/p7zip                                    9.20.1-0.175.1.0.0.24.0    i--
compress/unzip                                    6.0-0.175.1.0.0.24.0       i--
compress/xz                                       5.0.1-0.175.1.0.0.24.0     i--
compress/zip                                      3.0-0.175.1.0.0.24.0       i--


Looks good to install the package from the IPS server