Site icon UnixArena

How to create IPS repository in Solaris 11.2 ?

Repo-Solaris 11.2

Image packaging system(IPS) repository is one of the important element from Solaris 11 onwards. For an example, to install any new package or install the zones, you need IPS repository.In Solaris 11.2 release, oracle automated the IPS little bit by providing the script to merge the piece  of repo files and performing the checksum automatically. We just need to download the repo files,md5checkum  and script in one location and follow the below article to create a IPS repository locally.

We can categories repertoires as, 

  1. Oracle Release repository
  2. Oracle Support Repository
  3. Oracle Local repository.
UA_SOL11# pkg publisher
PUBLISHER	TYPE	STATUS	URI
solaris		origin	online	http://pkg.oracle.com/solaris/release/
UA-SOL11#pkg publisher
PUBLISHER                   TYPE     STATUS P LOCATION
solaris                     origin   online F https://pkg.oracle.com/solaris/support/
UA-SOL11#

1. Download the repository files from oracle website.

Oracle Repo files

2.Keep all the downloaded files in same directory of solaris 11.1/11.2 server .  Make sure you have re-named the md5sum file like below.

UA-CLOUD@root#ls -lrt
total 14373947
-rwx------   1 root     root     1771800121 Aug  9 08:24 sol-11_2-repo-1of4.zip
-rwx------   1 root     root     1889867782 Aug  9 11:20 sol-11_2-repo-2of4.zip
-rwx------   1 root     root     1902167161 Aug  9 22:34 sol-11_2-repo-3of4.zip
-rwx------   1 root     root     1790358735 Aug 10 00:16 sol-11_2-repo-4of4.zip
-rwx------   1 root     root        5594 Aug 10 20:16 install-repo.ksh
-rwx------   1 root     root         228 Aug 10 20:17 sol-11_2-repo-md5sums.txt
drwxr-xr-x   2 root     root           2 Aug 10 20:40 repo
UA-CLOUD@root#

3.Set the executable bit for install-repo.ksh and execute like below. “-v” option will take more time to complete since its going to verify each package. If you don’t want to verify, just skip it  and that will save lot of time.

UA-CLOUD@root#./install-repo.ksh -d /UAIPS/repo/ -v -c
Comparing checksums of downloaded files...done. Checksums match.

Uncompressing sol-11_2-repo-1of4.zip...done.
Uncompressing sol-11_2-repo-2of4.zip...done.
Uncompressing sol-11_2-repo-3of4.zip...done.
Uncompressing sol-11_2-repo-4of4.zip...done.
Repository can be found in /UAIPS/repo/.
Initiating repository verification.
UA-CLOUD@root#

SCRIPT USAGE:

This script provides the option to create ISO repo as well. To create ISO, just give option  “-I” in the above command.

USAGE:
install-repo.ksh -d dest [-s zipsrc] [-i image-name] [-c] [-v] [-I]
-d dest   = destination directory to hold repository
-s zipsrc = full path to directory holding zip files. default: current
directory
-i image  = name of image: e.g. sol-11_2. default: name found in directory
-c        = compare checksums of downloaded zip files
-v        = verify repo after unzipping
-I        = create an ISO image

4. Navigate to the repo directory and see the newly created repository files.

UA-CLOUD@root#cd /UAIPS/repo
UA-CLOUD@root#ls -lrt
total 31
-rw-r--r--   1 root     root         347 Jun 25 05:25 pkg5.repository
-rwxr-xr-x   1 root     root        5970 Jun 25 10:15 README-repo-iso.txt
-rw-r--r--   1 root     root        1625 Jun 25 10:15 NOTICES
-rw-r--r--   1 root     root        3246 Jun 25 10:15 COPYRIGHT
drwxr-xr-x   3 root     root           3 Aug 10 20:41 publisher
UA-CLOUD@root#

5.Check the current publisher.

UA-CLOUD@root#pkg publisher
PUBLISHER                   TYPE     STATUS P LOCATION
solaris                     origin   online F http://pkg.oracle.com/solaris/release/
UA-CLOUD@root#

6.Set new publisher.  Path will be same as what we have given in step 3.

UA-CLOUD@root#pkg set-publisher -G '*' -M '*' -g file:///UAIPS/repo solaris
UA-CLOUD@root#pkg publisher
PUBLISHER                   TYPE     STATUS P LOCATION
solaris                     origin   online F file:///UAIPS/repo/
UA-CLOUD@root#

7.Make sure the system repository service is pointing to the local repo. If not just edit the SMF.

# svccfg -s application/pkg/server setprop pkg/inst_root=/UAIPS/repo

Check your work:

# svcprop -p pkg/inst_root application/pkg/server

Reload the pkg.depotd repository service.

# svcadm refresh application/pkg/server

We have successfully deployed the oracle Solaris 11.2 repository locally.This is very simple compare to Solaris 11.1 Repo creation since script does,everything here.

IPS commands usage with output

Share it ! Comment it !! Be Sociable !!!

Exit mobile version