Oracle has completely changed patching and packaging system on Solaris 11, now it's call as a (IPS)Image packaging system, we can install, update and search packages from repository locally or remotely.
We can design our repository one of the following method:
1. Local repository (server it self)
2. Remote repository in Internal network (with in our local network)
3. Internet(online)repository (http://pkg.oracle.com/solaris/release/)
Some of the key advantages of IPS - Image packaging system:
1. It will check and pickup dependency package automatically while installing any packages
2. It will creates automatically backup boot environment when demand
3. It will allows you to easily grep the information about packages like query ,list,update, install, uninstall the software packages.
Let's describe the steps to setup local repository:
1) Download latest repo from oracle website
2) Usually it is two parts ISO image, we have to combine it together
Setting up a Local IPS repository:
Combine both downloaded repo files together:
Copy all the files from /mnt/repo/ to our local directory /solrepo/:
Umount ISO image file /mnt:
We can design our repository one of the following method:
1. Local repository (server it self)
2. Remote repository in Internal network (with in our local network)
3. Internet(online)repository (http://pkg.oracle.com/solaris/release/)
Some of the key advantages of IPS - Image packaging system:
1. It will check and pickup dependency package automatically while installing any packages
2. It will creates automatically backup boot environment when demand
3. It will allows you to easily grep the information about packages like query ,list,update, install, uninstall the software packages.
Let's describe the steps to setup local repository:
1) Download latest repo from oracle website
2) Usually it is two parts ISO image, we have to combine it together
Setting up a Local IPS repository:
Combine both downloaded repo files together:
root@infravm:/hgfs/Solaris# cat sol-11_1-repo-full.iso-a sol-11_1-repo-full.iso-b > sol-11_1-repo-full.iso
root@infravm:/hgfs/Solaris#
Mount the ISO image as a /mnt:
root@infravm:/# mount -F hsfs /mnt/hgfs/Solaris/sol-11-repo-full.iso /mnt
root@infravm:/# df -h /mnt
Filesystem Size Used Available Capacity Mounted on
/mnt/hgfs/Solaris/sol-11_1-repo-full.iso
6.8G 6.8G 0K 100% /mnt
root@infravm:/#
Here actually I did not created dedicated files system but if you create separate pool / FS it will give you the good performance and space utilization.Copy all the files from /mnt/repo/ to our local directory /solrepo/:
root@infravm:/# mkdir /solrepo
root@infravm:/# rsync -aP /mnt/repo/ /solrepo/
sending incremental file list
created directory /solrepo
./
pkg5.repository
242 100% 0.00kB/s 0:00:00
242 100% 0.00kB/s 0:00:00 (xfer#1, to-check=1464/1466)
publisher/
publisher/solaris/
publisher/solaris/catalog/
publisher/solaris/catalog/catalog.attrs
606 100% 295.90kB/s 0:00:00
606 100% 295.90kB/s 0:00:00 (xfer#2, to-check=1455/1466)
publisher/solaris/catalog/catalog.base.C
32768 5% 1.95MB/s 0:00:00
619178 100% 16.87MB/s 0:00:00 (xfer#3, to-check=1454/1466)
publisher/solaris/catalog/catalog.dependency.C
32768 1% 711.11kB/s 0:00:03
2581594 100% 17.22MB/s 0:00:00 (xfer#4, to-check=1453/1466)
publisher/solaris/catalog/catalog.summary.C
32768 1% 209.15kB/s 0:00:07
1698356 100% 7.57MB/s 0:00:00 (xfer#5, to-check=1452/1466)
publisher/solaris/tmp/lock
0 100% 0.00kB/s 0:00:00 (xfer#315831, to-check=0/320497)
publisher/solaris/trans/
sent 6932390502 bytes received 6019468 bytes 6636451.43 bytes/sec
total size is 6903440144 speedup is 0.99
root@infravm:/#
root@infravm:/# umount /mnt
root@infravm:/#
Check the repo/publisher status:
root@infravm:/# pkg publisher
PUBLISHER TYPE STATUS P LOCATION
solaris origin online F http://pkg.oracle.com/solaris/release/
root@infravm:/#
Unsetup the default publisher / repo:
root@infravm:/# pkg unset-publisher solaris
root@infravm:/#
Check the repo/publisher status:
root@infravm:/# pkg publisher
PUBLISHER TYPE STATUS P LOCATION
root@infravm:/#
Setup local repo / publisher :
root@infravm:/# pkg set-publisher -g file:///solrepo/ solaris
Refreshing catalog 1/1 solaris
Refreshing catalog 1/1 solaris
Refreshing catalog 1/1 solaris
Caching catalogs ...
root@infravm:/#
Check the local repo/publisher status:
root@infravm:/# pkg publisher
PUBLISHER TYPE STATUS P LOCATION
solaris origin online F file:///solrepo/
root@infravm:/#
Check the status of the local repo:root@infravm:/# pkgrepo info -s /solrepo
PUBLISHER PACKAGES STATUS UPDATED
solaris 4401 online 2012-09-27T22:22:59.530981Z
root@infravm:/#
To see all the packages in the repository:
root@infravm:/# pkg search -p -s file:///solrepo/ '*'
PACKAGE PUBLISHER
pkg:/BRCMbnx@0.5.11-0.133 solaris
pkg:/BRCMbnxe@0.5.11-0.133 solaris
pkg:/CPQary3@0.5.11-0.133 solaris
pkg:/FSWfontconfig-devel-docs@0.5.11-0.130 solaris
pkg:/FSWxorg-client-docs@0.5.11-0.130 solaris
pkg:/FSWxorg-client-programs@0.5.11-0.130 solaris
pkg:/FSWxorg-clientlibs@0.5.11-0.130 solaris
pkg:/FSWxorg-data@0.5.11-0.130 solaris
root@infravm:/#
To see particular packages in the repository:
root@infravm:/# pkg search -s file:///solrepo solaris-desktop
INDEX ACTION VALUE PACKAGE
pkg.fmri set solaris/group/system/solaris-desktop pkg:/group/system/solaris-desktop@0.5.11-0.175.1.0.0.24.3
root@infravm:/#
Install a Package:
root@infravm:~# pkg install solaris-desktop
Packages to install: 370
Create boot environment: No
Create backup boot environment: Yes
Services to change: 14
DOWNLOAD PKGS FILES XFER (MB) SPEED
Completed 370/370 53216/53216 547.3/547.3 0B/s
PHASE ITEMS
Installing new actions 84196/85615
command output was:
------------------------------------------------------------
drvconfig: modctl failed to add major number binding.
------------------------------------------------------------
Installing new actions 85615/85615
Updating package state database Done
Updating image state Done
Creating fast lookup database Done
root@infravm:~#
Search for a Package:
root@infravm:/# pkg search Web browser
INDEX ACTION VALUE PACKAGE
pkg.summary set Mozilla Firefox Web browser pkg:/web/browser/firefox@10.0.6-0.175.1.0.0.22.0
pkg.summary set Multi User Desktop optimization for Mozilla Firefox Web browser pkg:/web/browser/firefox/multi-user-desktop@10.0.6-0.175.1.0.0.22.0
pkg.summary set A text-based web browser pkg:/web/browser/w3m@0.5.2-0.175.0.0.0.0.0
pkg.summary set Text based web browser pkg:/web/browser/links@1.0.3-0.175.1.0.0.24.0
pkg.summary set Text-mode web browser pkg:/web/browser/lynx@2.8.7-0.175.0.0.0.0.0
root@infravm:/#
Search for a File:
root@infravm:/# pkg search -o path,pkg.name -l /usr/bin/vim
PATH PKG.NAME
usr/bin/vim editor/vim/vim-core
root@infravm:/#
Search for Packages that Depend on the Specified:
root@infravm:~# pkg search -l depend::editor/vim
INDEX ACTION VALUE PACKAGE
group depend editor/vim pkg:/group/system/solaris-desktop@0.5.11-0.175.1.0.0.24.3
incorporate depend pkg:/editor/vim@7.3.600-0.175.1.0.0.24.0 pkg:/consolidation/userland/userland-incorporation@0.5.11-0.175.1.0.0.24.0
optional depend editor/vim@7.3.600 pkg:/editor/vim/vim-core@7.3.600-0.175.1.0.0.24.0
require depend editor/vim@7.3.600 pkg:/editor/gvim@7.3.600-0.175.1.0.0.24.0
root@infravm:~#
I will write more article about Solaris11 soon... Thank you for reading this article.
Good one Thanks
ReplyDelete