Solaris 11 – Image Packaging System Basics (IPS-1)

Solaris 11 – Image Packaging System (IPS)

Solaris 11 – Image Packaging System Basics (IPS-1)

Image packaging system which is main feature in Oracle Solaris 11, Its a network based package management (Repositories) and it provides complete software administration such as installation, upgrade and removal of Packages in easiest way.
Secure system upgrades with ZFS boot environments.
Automatic dependency checking and downloads efficiently.
Spacious package publishing methods.
No Patches concept here, as all system updates through one mechanism (IPS)
Configure and updating method of IPS
While configuring the IPS we have to take the consideration whether we required local IPS or sharing the IPS services to the Network clients. Let we start preparing with our high level plan and start configure the Local IPS.

High Level Plan
Create the ZFS file system to store the repository
Download the required repo from Oracle portal
Configuring the repository service
Start and Setting the Local repository service
Test the IPS service from local server.
Creating ZFS filesystem to store the repository
root@hans-karri:/# zfs create repo_pool/unixrepo
root@hans-karri:/# zfs set mountpoint=/unixrepo repo_pool/unixrepo
root@hans-karri:/#
root@hans-karri:/# zfs list |grep -i repo
repo_pool 31K 8.62G 31K /repo_pool
repo_pool/unixrepo 31K 8.62G 31K /unixrepo
root@hans-karri:/#
Download the required repositores from Oracle Portal from below link
http://www.oracle.com/technetwork/server-storage/solaris11/downloads/index.html
Then you might have two files as mentioned below
sol-11_1-repo-full.iso-a
sol-11_1-repo-full.iso-b
Concatenating the ISO
sol-11_1-repo-full.iso-a
sol-11_1-repo-full.iso-b
root@hans-karri:~#
root@hans-karri:~# cat sol-11_1-repo-full.iso-a sol-11_1-repo-full.iso-b > sol-11-repo-full.iso
root@hans-karri:~# ls /unixrepo
sol-11-repo-full.iso

lofiadm :—–> administer files available as block devices through lofi(the loopback file driver. allows a file to be associated with a block device. That file can then be accessed through the block device)
Mount the repository .iso image to make available to the local server
root@hans-karri:~# lofiadm -a /unixrepo/sol-11-repo-full.iso
/dev/lofi/1
root@hans-karri:~# mount -F hsfs /dev/lofi/1 /mnt/repo
root@hans-karri:~#
root@hans-karri:~# rsync -aP /mnt/repo /unixrepo
root@hans-karri:~#

Depending on the speed of your system, rsync may take time to complete.-a, –archive  archive mode; equals -rlptgoD (no -H,-A,-X) -P   same as –partial –progress
Currently IPS configuration service is disabled status and pkg/inst_root path is set to wrong repository locations.
root@hans-karri:/# svcs application/pkg/server
STATE STIME FMRI
disabled 0:30:06 svc:/application/pkg/server:default
root@hans-karri:/#
root@hans-karri:/# svcprop -p pkg/inst_root application/pkg/server
/var/pkgrepo
root@hans-karri:/#

Let we change to the correct repository path and enable read only mode and enable the IPS services
root@hans-karri:/# svccfg -s application/pkg/server setprop pkg/inst_root=/unixrepo
root@hans-karri:/# svccfg -s application/pkg/server setprop pkg/readonly=true
root@hans-karri:/# svcprop -p pkg/inst_root application/pkg/server
/unixrepo
root@hans-karri:/#
root@hans-karri:/# svcadm enable application/pkg/server
root@hans-karri:/# svcs /application/pkg/server
STATE STIME FMRI
online 0:45:52 svc:/application/pkg/server:default
root@hans-karri:/#

Refreshing the Package Repository as we are creating new package repository, so that pkg search will work correctly. This may take sevaral minutes.
root@hans-karri:/# pkgrepo refresh -s /unixrepo
Initiating repository refresh.
root@hans-karri:/#

from the below output shows that Current package Publisher is set as default URI is http://pkg.oracle.com/solaris/release/
root@hans-karri:/# pkg publisher
PUBLISHER TYPE STATUS P LOCATION
solaris origin online F http://pkg.oracle.com/solaris/release/
root@hans-karri:/#

Removing default entries and set the new URL with publisher name as Solaris
root@hans-karri:/# pkg set-publisher -G ‘*’ -g http://192.168.10.31 solaris
root@hans-karri:/# pkg publisher
PUBLISHER TYPE STATUS P LOCATION
solaris origin online F http://192.168.10.31/
root@hans-karri:/#

We can test our Local IPS services are set up correctly by searching the package.
root@hans-karri:~# pkg search entire
INDEX ACTION VALUE PACKAGE
pkg.fmri set solaris/entire pkg:/entire@0.5.11-0.175.1.0.0.24.2
root@hans-karri:~#
root@hans-karri:~#