Solaris 11 has new features is the repository based Image Packaging system. IPS very tightly integrated with our zones, boot environment and ZFS file systems to provide a safe, easy and fast way to perform system updates.IPS introduces new cloud based package installation service.
Here i am going to show you that how to create repository without internet connection using Solaris 11 repository files and how to add other publishers packages in to repo. We can also see how to install packages and how to remove from the system in this post.
Prepare the system for local IPS Repository:
1. Create dedicated zpool to get better performance. Here i am using zpool “solrepo”
root@RDSOL11:/solrepo# zpool list NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT rpool 15.6G 10.8G 4.86G 68% 1.00x ONLINE - solrepo 17.9G 13.8k 17.9G 1% 1.00x ONLINE - root@RDSOL11:/solrepo# df -h /solrepo Filesystem Size Used Available Capacity Mounted on solrepo 18G 0G 18G 1% /solrepo
Tip – For better performance when updating the repository, set atime to off
# zfs set atime=off solrepo
Note:The atime property controls whether the access time for files is updated when the files are read.Turning this property off avoids producing write traffic when reading files.
2. Create the infrastructure for the Local Repository.
# pkgrepo create /solrepo
Copy the Repository files to the system.
Download the following files from oracle downloads and keep it in /var/tmp
sol-11_1-repo-full.iso-a
sol-11_1-repo-full.iso-b
1.Get the Package Repository Files and validate the download using digest.
root@RDSOL11:/var/tmp# digest -a md5 sol-11_1-repo-full.iso-a a2bd06ac74b288aadc3299fc50cb887b root@RDSOL11:/var/tmp# digest -a md5 sol-11_1-repo-full.iso-b 3d278c6726a249f9a453fac9d75bb7fa
2.Combine those iso files as below
# cat sol-11_1-repo-full.iso-a sol-11_1-repo-full.iso-b > /solrepo/sol-11_1-repo-full.iso
3.Mount the ISO file.
mount -F hsfs /solrepo/sol-11_1-repo-full.iso /mnt
4.Copy the Repository Files to /solrepo.
# rsync -aP /mnt/repo/ /solrepo/
5.Once the sync has been completed, you can Un-mount the Image.
# umount /mnt
6.Build a Search Index
# pkgrepo -s /solrepo refresh
7.Set the Publisher Origin To the File Repository URI
root@RDSOL11:/var/tmp# pkg set-publisher -G '*' -M '*' -g /solrepo solaris
-G ’*’ Removes all existing origins for the solaris publisher.
-M ’*’ Removes all existing mirrors for the solaris publisher.
-g Adds the URI of the newly-created local repository as the new origin for the “solaris” publisher.
8.Make sure that system repository service is online.
# svcs application/pkg/system-repository:default online svc:/application/pkg/system-repository:default
Configure the Repository Server Service for remote package installation:
If you want to use this local repository on other Solaris 11 systems , you need to configure the pkg/server SMF like below.
# svccfg -s application/pkg/server setprop pkg/inst_root=/solrepo # svccfg -s application/pkg/server setprop pkg/readonly=true
Check your work:
# svcprop -p pkg/inst_root application/pkg/server
Start the pkg server Service
Restart the pkg.depotd repository service.
# svcadm refresh application/pkg/server # svcadm enable application/pkg/server
On the Solaris 11 clients systems,you need to set the publisher like below.
root@UA-SOL11:~# pkg set-publisher -O http://192.168.2.49 solaris
How to update the Solaris IPS repository ?
root@RDSOL11:~# pkgrecv -s http://pkg.oracle.com/solaris/release/ -d /solrepo '*' Processing packages for publisher solaris ... Retrieving and evaluating 4401 package(s)... Download Manifests ( 4401/4401) / PROCESS ITEMS GET (MB) SEND (MB) OSOLvpanels-sharemgr 35/4401 0/6622 0/21718 root@RDSOL11:~# pkgrecv -s http://pkg.oracle.com/solaris/release/ -d /solrepo '*' Processing packages for publisher solaris ... Retrieving and evaluating 4401 package(s)...
Once you have updated the repository, run the following command to catalog to update all search indexes.
# pkgrepo -s /solrepo refresh Initiating repository refresh. root@RDSOL11:~# pkgrepo get -p solaris -s /solrepo/ PUBLISHER SECTION PROPERTY VALUE solaris publisher alias solaris publisher prefix solaris solaris repository collection-type core solaris repository description "" solaris repository legal-uris () solaris repository mirrors () solaris repository name "" solaris repository origins () solaris repository refresh-seconds "" solaris repository registration-uri "" solaris repository related-uris () root@RDSOL11:~# pkgrepo get -s /solrepo/ SECTION PROPERTY VALUE publisher prefix solaris repository description This\ repository\ serves\ a\ copy\ of\ the\ Oracle\ Solaris\ 11.1\ Build\ 24b\ Package\ Repository. repository name Oracle\ Solaris\ 11.1\ Build\ 24b\ Package\ Repository repository version 4 root@RDSOL11:~#
Customizing Your Local Repository
You can also add the packages from different publishers to your repository. The following “pkgrecv” command adds all the packages from specific location.For an example, Here i have downloaded the storage foundation HA from Symantec and I am going to add it to existing repository.
Here is the Symantec storage foundation package information which i have downloaded from internet.
root@RDSOL11:~/dvd2-sol11_x64/pkgs# pkg list -g /root/dvd2-sol11_x64/pkgs/VRTSpkgs.p5p NAME (PUBLISHER) VERSION IFO VRTSamf (Symantec) 6.0.10.0 --- VRTSaslapm (Symantec) 6.0.10.0 --- VRTScavf (Symantec) 6.0.10.0 --- VRTScps (Symantec) 6.0.10.0 --- VRTSdbed (Symantec) 6.0.10.0 --- VRTSfssdk (Symantec) 6.0.10.0 --- VRTSgab (Symantec) 6.0.10.0 --- VRTSglm (Symantec) 6.0.10.0 --- VRTSgms (Symantec) 6.0.10.0 --- VRTSllt (Symantec) 6.0.10.0 --- VRTSodm (Symantec) 6.0.10.0 --- VRTSperl (Symantec) 5.12.2.8 --- VRTSsfcpi60 (Symantec) 6.0.10.0 --- VRTSsfmh (Symantec) 4.1 --- VRTSspt (Symantec) 6.0.10.0 --- VRTSsvs (Symantec) 6.0.10.0 --- VRTSvbs (Symantec) 6.0.10.0 --- VRTSvcs (Symantec) 6.0.10.0 --- VRTSvcsag (Symantec) 6.0.10.0 --- VRTSvcsea (Symantec) 6.0.10.0 --- VRTSvlic (Symantec) 3.2.61.1 --- VRTSvxfen (Symantec) 6.0.10.0 --- VRTSvxfs (Symantec) 6.0.10.0 --- VRTSvxvm (Symantec) 6.0.10.0 ---
Using “pkgrecv” command , you can add the packages to local repository.
root@RDSOL11:~/dvd2-sol11_x64/pkgs# pkgrecv -s /root/dvd2-sol11_x64/pkgs/VRTSpkgs.p5p -d /solrepo '*' Processing packages for publisher Symantec ... Retrieving and evaluating 24 package(s)... PROCESS ITEMS GET (MB) SEND (MB) VRTScps 3/24 12.1/351.6 38/1063 root@RDSOL11:~/dvd2-sol11_x64/pkgs# pkgrecv -s /root/dvd2-sol11_x64/pkgs/VRTSpkgs.p5p -d /solrepo '*' Processing packages for publisher Symantec ... Retrieving and evaluating 24 package(s)... PROCESS ITEMS GET (MB) SEND (MB) Completed 24/24 351.6/351.6 1063/1063 root@RDSOL11:~# pkgrepo get -p Symantec -s /solrepo/ PUBLISHER SECTION PROPERTY VALUE Symantec publisher alias Symantec publisher prefix Symantec Symantec repository collection-type core Symantec repository description "" Symantec repository legal-uris () Symantec repository mirrors () Symantec repository name "" Symantec repository origins () Symantec repository refresh-seconds "" Symantec repository registration-uri "" Symantec repository related-uris () root@RDSOL11:~# pkg publisher PUBLISHER TYPE STATUS P LOCATION solaris origin online F file:///solrepo/
You need to set the new publisher to use the storage foundation packages.Here “Symantec” is the publisher name for storage foundation packages.
root@RDSOL11:~# pkg set-publisher -G '*' -M '*' -g /solrepo Symantec root@RDSOL11:~# pkg publisher PUBLISHER TYPE STATUS P LOCATION solaris origin online F file:///solrepo/ Symantec origin online F file:///solrepo/ root@RDSOL11:~#
Let us install Symantec package from repo:
Note:This is not a way to install SFHA packages, i have just shown here for an example.Normally we will do it via SFHA scripts.
root@RDSOL11:~# pkg install VRTSvxvm Creating Plan (Evaluating mediators): - <<<<<<<<<<<<<<<<<<<<<<<<some lines are removed>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> To indicate that you agree to and accept the terms of the licenses of the packages listed above, use the --accept option. To display all of the related licenses, use the --licenses option. Let me accept the license using --accept option. root@RDSOL11:~# pkg install --accept VRTSvxvm ------------------------------------------------------------ Package: pkg://Symantec/VRTSperl@5.12.2.8,5.11:20120118T055202Z License: SYMC Copyright (c) 2012 Symantec Corporation. All rights reserved. Symantec, the Symantec Logo are trademarks or registered trademarks of Symantec Corporation or its affiliates in the U.S. and other countries. Other names may be trademarks of their respective owners. This is Perl version 5.12.2 compiled on SunOS This fileset contains perl binaries. Perl source files can be obtained from http://www.perl.com/download.csp This distribution also includes the following CPAN modules: Algorithm-Diff-1.1902 Archive-Tar-1.29 Compress-Zlib-2.004 Compress-Raw-Zlib-2.004 Crypt-CBC-2.18 Crypt-OpenSSL-AES-0.02 Crypt-SSLeay-0.57 Expect-1.21 HTML-Parser-3.55 HTML-Tagset-3.10 IO-Compress-Base-2.004 IO-Compress-Zlib-2.004 IO-String-1.08 IO-Tty-1.05 List-Compare-0.33 Log-Dispatch-2.11 Logfile-Rotate-1.04 libwww-perl-5.805 MIME-Base64-3.07 Module-Build-0.2801 Net-DNS-0.59 Net-DNS-SEC-0.14 Net-FTP-Common-7.0.d Net-IP-1.25 Net-Netmask-1.9012 Net-Telnet-3.03 Net-SNMP-5.2.0 Params-Validate-0.86 Proc-Background-1.08 Proc-ProcessTable-0.45 Test-Plan-0.03 Test-Simple-0.88 TimeDate-1.16 Time-ZoneInfo-0.3 URI-1.35 XML-Parser-2.34 XML-Simple-2.16 XML-RegExp-0.03 XML-DOM-1.44 Test-Exception-0.27 Sub-Uplevel-0.21_01 Socket-GetAddrInfo-0.11 Socket6-0.23 IO-Socket-INET6-2.56 Params-Util-1.03 Sys-Filesystem-1.30 Text-CSV-1.20 Devel-Trace-0.10 JSON-2.27 common-sense-3.4 JSON-XS-2.3 DBI-1.615 DBD-SQLite-1.31 DBD-Oracle-1.27 Switch-2.16 Parse-RecDescent-1.965001 IPC-Run-0.89 Email-MIME-1.907 Email-Simple-2.100 Email-MessageID-1.402 Email-Address-1.892 Email-MIME-ContentType-1.015 Email-MIME-Encodings-1.313 Class-Accessor-0.34 HTTP-Request-Params-1.01 ------------------------------------------------------------ Package: pkg://Symantec/VRTSvlic@3.2.61.1,5.11:20120314T141149Z License: VRTSvlic.copyright Copyright (c) 2012 Symantec Corporation. All rights reserved. Symantec, the Symantec Logo are trademarks or registered trademarks of Symantec Corporation or its affiliates in the U.S. and other countries. Other names may be trademarks of their respective owners. ------------------------------------------------------------ Package: pkg://Symantec/VRTSvxvm@6.0.10.0,5.11:20120320T145531Z License: VRTSvxvm.copyright Copyright (c) 2012 Symantec Corporation. All rights reserved. Symantec, the Symantec Logo are trademarks or registered trademarks of Symantec Corporation or its affiliates in the U.S. and other countries. Other names may be trademarks of their respective owners. Packages to install: 3 Create boot environment: No Create backup boot environment: No Services to change: 11 DOWNLOAD PKGS FILES XFER (MB) SPEED Completed 3/3 3244/3244 71.3/71.3 0B/s PHASE ITEMS Installing new actions 4084/4084 Updating package state database Done Updating image state Done Creating fast lookup database Done root@RDSOL11:~#
root@RDSOL11:~# pkg list -g /solrepo |grep -i vrts VRTSamf (Symantec) 6.0.10.0 --- VRTSaslapm (Symantec) 6.0.10.0 --- VRTScavf (Symantec) 6.0.10.0 --- VRTScps (Symantec) 6.0.10.0 --- VRTSdbed (Symantec) 6.0.10.0 --- VRTSfssdk (Symantec) 6.0.10.0 --- VRTSgab (Symantec) 6.0.10.0 --- VRTSglm (Symantec) 6.0.10.0 --- VRTSgms (Symantec) 6.0.10.0 --- VRTSllt (Symantec) 6.0.10.0 --- VRTSodm (Symantec) 6.0.10.0 --- VRTSperl (Symantec) 5.12.2.8 i-- VRTSsfcpi60 (Symantec) 6.0.10.0 --- VRTSsfmh (Symantec) 4.1 --- VRTSspt (Symantec) 6.0.10.0 --- VRTSsvs (Symantec) 6.0.10.0 --- VRTSvbs (Symantec) 6.0.10.0 --- VRTSvcs (Symantec) 6.0.10.0 --- VRTSvcsag (Symantec) 6.0.10.0 --- VRTSvcsea (Symantec) 6.0.10.0 --- VRTSvlic (Symantec) 3.2.61.1 i-- VRTSvxfen (Symantec) 6.0.10.0 --- VRTSvxfs (Symantec) 6.0.10.0 --- VRTSvxvm (Symantec) 6.0.10.0 i--
You need to pass the “accept” argument to install the packages.
root@RDSOL11:~# pkg install --accept VRTSvxfs ------------------------------------------------------------ Package: pkg://Symantec/VRTSvxfs@6.0.10.0,5.11:20120319T130703Z License: VRTSvxfs.copyright Copyright (c) 2012 Symantec Corporation. All rights reserved. Symantec, the Symantec Logo are trademarks or registered trademarks of Symantec Corporation or its affiliates in the U.S. and other countries. Other names may be trademarks of their respective owners.The Licensed Software and Documentation are deemed to be commercial computer software as defined in FAR 12.212 and subject to restricted rights as defined in FAR Section 52.227-19 "Commercial Computer Software - Restricted Rights" and DFARS 227.7202, et seq. "Commercial Computer Software and Commercial Computer Software Documentation", as applicable, and any successor regulations. Any use, modification,reproduction release, performance, display or disclosure of the Licensed Software and Documentation by the U.S. Government shall be solely in accordance with the terms of this Agreement. Packages to install: 1 Create boot environment: No Create backup boot environment: No Services to change: 1 DOWNLOAD PKGS FILES XFER (MB) SPEED Completed 1/1 179/179 15.1/15.1 0B/s PHASE ITEMS Installing new actions 315/315 Updating package state database Done Updating image state Done Creating fast lookup database Done
You can get the installed packages using the below command as well.(i–)
root@RDSOL11:~# pkg list |grep VRTS VRTSperl (Symantec) 5.12.2.8 i-- VRTSvlic (Symantec) 3.2.61.1 i-- VRTSvxfs (Symantec) 6.0.10.0 i-- VRTSvxvm (Symantec) 6.0.10.0 i--
Using the below command you can see detailed information about package as like solaris 10.
root@RDSOL11:~# pkginfo -l VRTSvxfs PKGINST: VRTSvxfs NAME: Veritas File System by Symantec CATEGORY: system,utilities ARCH: i386 VERSION: 6.0.10.0,REV=6.0.10.0 BASEDIR: / VENDOR: Symantec Corporation DESC: Commercial File System INSTDATE: Feb 10 2013 03:58 HOTLINE: http://www.symantec.com/business/support/assistance_care.jsp STATUS: completely installed
You can see the below packages were not installed (you can come to know by looking the last column “—“)
root@RDSOL11:~# pkg list -g /solrepo/ |grep VRTSvcs VRTSvcs (Symantec) 6.0.10.0 --- VRTSvcsag (Symantec) 6.0.10.0 --- VRTSvcsea (Symantec) 6.0.10.0 ---
How to remove package from the system ?
root@RDSOL11:~# pkg uninstall VRTSvcs pkg uninstall: 'VRTSvcs' matches no installed packages
root@RDSOL11:~# pkg uninstall VRTSvxvm Creating Plan (Checking for conflicting actions): | ......................................................... Packages to remove: 1 Create boot environment: No Create backup boot environment: No Services to change: 11 PHASE ITEMS Removing old actions 964/964 Updating package state database Done Updating package cache 1/1 Updating image state Done Creating fast lookup database Done The following unexpected or editable files and directories were salvaged while executing the requested package operation; they have been moved to the displayed location in the image: var/adm/vx -> /var/pkg/lost+found/var/adm/vx-20130210T144703Z
I will post more about Solaris11 IPS soon ……Thank you for reading this article.
Please leave a comment if you have any doubt ,i will get back to you as soon as possible.
Manoj says
HI,
I have one confusion here… i have already with one respository for april month 11.3.31.6.0 and would like to update to 11.3.35
please provide me steps
Lingeswaran R says
If you have already configured the IPS, client can be configured using “http”
root@solarisdil9:~# pkg publisher
PUBLISHER TYPE STATUS P LOCATION
root@solarisdil9:~# pkg set-publisher -O http://172.16.30.44 solaris
root@solarisdil9:~# pkg publisher
PUBLISHER TYPE STATUS P LOCATION
solaris origin online F http://172.16.30.44/
root@solarisdil9:~#
Lingeswaran R says
You can also use the ISO image as solaris “repo”
Just mount the ISO
root@ua1:/# mount -F hsfs /sol-11_1-repo-full.iso /solrepo
root@ua1:/#
Refresh may fail due to read only FS.(ISO)
root@ua1:/# pkgrepo -s /solrepo/repo refresh
Initiating repository refresh.
pkgrepo: Could not complete the operation on /solrepo/repo/publisher/solaris/tmp/lock: read-only filesystem.
With “-M” option ,it may file.
root@ua1:/# pkg set-publisher -G .*. -M .*. -g /solrepo/repo solaris
pkg set-publisher: Unknown repository mirror ‘file:///’.
root@ua1:/# pkg publisher
PUBLISHER TYPE STATUS P LOCATION
You can set the publisher without “-M” option for readonly ISO image
root@ua1:/# pkg set-publisher -G ‘*’ -g file:///solrepo/repo/ solaris
root@ua1:/# pkg publisher
PUBLISHER TYPE STATUS P LOCATION
solaris origin online F file:///solrepo/repo/
root@ua1:/#
Hari Naidu says
Hai Lingesh,
Am getting below eror while sending packages to repository…..
solaris origin online F file:///sol_11_repo/
root@hari:/# pkgrecv -s /opt/dvd2-sol_x64/sol11_x64/pkgs/VRTSpkgs.p5p -d /sol_11_repo/
Processing packages for publisher Symantec …
pkgrecv: must specify at least one pkgfmri
Usage:
pkgrecv [-s src_uri] [-a] [-d (path|dest_uri)] [-c cache_dir]
[-kr] [-m match] [-n] [–raw] [–key keyfile –cert certfile]
(fmri|pattern) …
pkgrecv [-s src_repo_uri] –newest
Options: