Popular Posts

Dec 16, 2016

Solaris 11 IPS repository and update Latest SRU to Repository

Configure Solaris 11 IPS repository and update Latest SRU to Repository 

A Small introduction about IPS
         -  Image packaging system(IPS) repository is one of the important feature added in Solaris 11.
         -  To install package in Solaris 11.3 Clients, we you need IPS repository.
         -  A install-repo.sh script merge the piece  of repo files and performing the checksum automatically.
         -  We need to download the repo files,md5checkum file and script in one location

Local IPS Repositories
         -  Performance and security. You do not want your client systems to go to the Internet to retrieve new software packages or update existing packages.
         -  Replication. You want to ensure that you can perform the same installation next year that you perform today.
         -  Custom packages. You want to include your own IPS package in the same repository with Oracle Solaris OS packages.


1. Download the local repository image from the below link
     Download Local Repository Image
 
   -rwxr-x---   1 root     root       11612 Dec 16 11:35 install-repo.ksh
   -rwxr-x---   1 root     root     1540097274 Dec 16 11:35 sol-11_3-repo_1of5.zip
   -rwxr-x---   1 root     root     1730669364 Dec 16 11:36 sol-11_3-repo_2of5.zip
   -rwxr-x---   1 root     root     1717187368 Dec 16 11:37 sol-11_3-repo_3of5.zip
   -rwxr-x---   1 root     root     1871913207 Dec 16 11:37 sol-11_3-repo_4of5.zip
   -rwxr-x---   1 root     root     1570373423 Dec 16 11:38 sol-11_3-repo_5of5.zip
   -rwxr-x---   1 root     root         285 Dec 16 11:38 sol-11_3-repo_md5sums.txt

2. Download the latest SRU from the below link , ORACLE SOLARIS 11.3.14.6.0 (08-Dec-2016)
    Download the latest SRU from (Doc ID 2045311.1) MyOracleSupport
    The Current SRU is 11.3.15.4.0 (08-Dec-2016) Download the images and installation guide from (ISO) and (Guide)

   -rwxr-x---   1 root     root     1352426251 Dec 16 12:05 p24921515_1100_SOLARIS64_1of4.zip
   -rwxr-x---   1 root     root     1681754087 Dec 16 12:06 p24921515_1100_SOLARIS64_2of4.zip
   -rwxr-x---   1 root     root     1465622938 Dec 16 12:07 p24921515_1100_SOLARIS64_3of4.zip
   -rwxr-x---   1 root     root     1353700532 Dec 16 12:08 p24921515_1100_SOLARIS64_4of4.zip
   -rwxr-x---   1 root     root       54156 Dec 21 13:56 p25164979_1100_SOLARIS64.zip


3. Create a dedicated zpool / zfs with 100 GB for IPS repository
      zpool create -f -m /sol.11.3.repo sol.11.3.repo c6t0d0
      zfs create -o mountpoint=/sol.11.3.repo/repo sol.11.3.repo/repo
      zfs set dedup=on sol.11.3.repo
      zfs set compression=on sol.11.3.repo
      zfs set atime=off sol.11.3.repo


4. Create a repo
   pkgrepo create /sol.11.3.repo/repo

5. view the installation guide
      unzip -l p25164979_1100_SOLARIS64.zip

6.  Extract the script and checksum file alone from the installer guide zip file
     unzip p25164979_1100_SOLARIS64.zip install-repo.ksh
     unzip p25164979_1100_SOLARIS64.zip sol-11_3_15_4_0-incr-repo_md5sums.txt

7. Execute the install-repo.ksh script to create local repo,
      ./install-repo.ksh -s /var/tmp/SRU11.3.14.6.0/localrepo -d /sol.11.3.repo/repo -c -v -I
 

8. Verify the repo
      pkgrepo -s /sol.11.3.repo/repo info
      pkgrepo -s http://192.168.1.10/ info
      pkg list -af entire
      pkgrepo -s http://192.168.1.10 list  (To view all the packages)

9. Create a depot server instance.
    Use the add subcommand to add a new instance of the pkg/server service named solaris.
      svccfg -s pkg/server add solaris

10. Set the path to the repository.
      Set the path where this instance of the service can find the repository data.
        svccfg -s pkg/server:solaris setprop pkg/inst_root=/sol.11.3.repo/repo

11. Start the repository service.Restart the package depot server service.
        svcadm refresh pkg/server:solaris
        svcadm enable pkg/server:solaris

12. Set the publisher origin.
      To enable client systems to get packages from your local file repository, set the origin for the publisher.
       pkg set-publisher -G '*' -M '*' -g /sol.11.3.repo/repo solaris

13. Determine the name of the publisher.
      Use the following command to determine the names of publishers in your repository:
        pkgrepo info -s /sol.11.3.repo/repo
        pkgrepo info -s http://192.168.1.10/
        pkg list -af entire

        pkgrepo -s http://192.168.1.10 list  (To view all the packages)

14. Now Update the latest SRU Packages SRU11.3.14.6.0 to IPS repository
    cd /var/tmp/SRU11.3.14.6.0

    -rwxr-x---   1 root     root     1352426251 Dec 16 12:05 p24921515_1100_SOLARIS64_1of4.zip
    -rwxr-x---   1 root     root     1681754087 Dec 16 12:06 p24921515_1100_SOLARIS64_2of4.zip
    -rwxr-x---   1 root     root     1465622938 Dec 16 12:07 p24921515_1100_SOLARIS64_3of4.zip
    -rwxr-x---   1 root     root     1353700532 Dec 16 12:08 p24921515_1100_SOLARIS64_4of4.zip
    -rwxr-x---   1 root     root     54156 Dec 16 12:08 p24921515_1100_SOLARIS64_4of4.zip


15. Update the latest SRU Packages SRU11.3.14.6.0 to IPS repository (will take huge time)
        unzip p24921515_1100_SOLARIS64_4of4.zip
        ./install-repo.ksh -s /var/tmp/SRU11.3.14.6.0 -d /sol.11.3/repo -c -v

16. Set publisher in client machines
       pkg set-publisher -G '*' -M '*' -g http://192.168.1.10 solaris

17. From Client machine, check entire package version details
        pkgrepo list -s http://192.168.1.10/ | grep entire
             solaris   entire                                          0.5.11,5.11-0.175.3.14.0.6.0:20161110T164958Z
             solaris   entire                                          0.5.11,5.11-0.175.3.1.0.5.0:20151006T140051Z
         pkg list -af entire

18. Upgrade the client machine to latest SRU
        pkg update --accept entire

19. Install a package from latest SRU in Client machine
        pkg install system/display-manager/gdm
 

20. Update a package from latest SRU in Client machine
        pkg update system/display-manager/gdm

                 - Every package that is part of the Oracle Solaris 11 OS has a dependency on an incorporation package.
                 - Some incorporated packages might be safe to downgrade or upgrade at a version different from the version specified by the incorporation.
                 - Such incorporated packages have a version-lock.pkg_name facet attribute specified in the incorporation package.
                 - The default value of the version-lock.pkg_name facet is true.
                 - To relax the version constraint on a package, set the value of its version-lock.pkg_name facet to false.

Example : Upgrade ntp package in client machine
The installed ntp version in server is :
service/network/ntp                               4.2.8.8-0.175.3.12.0.1.0   i--

21. A higher version is available in IPS Repository
judi-dev-01 # pkgrepo list -s http://192.168.1.10 | grep "network/ntp"
solaris   service/network/ntp                             4.2.8.9,5.11-0.175.3.17.0.1.0:20170117T191858Z
solaris   service/network/ntp                             4.2.8.8,5.11-0.175.3.12.0.1.0:20160818T005350Z
solaris   service/network/ntp                             4.2.8.2,5.11-0.175.3.0.0.30.0:20150821T172046Z
judi-dev-01 #

22. when we upgrade a singe package, the following error may appear if the version lock is in place.
judi-dev-01 # pkg update service/network/ntp@4.2.8.9,5.11-0.175.3.17.0.1.0
Creating Plan (Solver setup): |
pkg install: No matching version of service/network/ntp can be installed:
  Reject:  pkg://solaris/service/network/ntp@4.2.8.9-0.175.3.17.0.1.0
  Reason:  This version is excluded by installed incorporation consolidation/userland/userland-incorporation@0.5.11-0.175.3.15.0.4.0
judi-dev-01 #

23. The pkg contents command shows how this version constraint is set.
judi-dev-01 # pkg contents -m userland-incorporation | grep "service/network/ntp"
depend facet.version-lock.service/network/ntp=true fmri=service/network/ntp@4.2.8.8,5.11-0.175.3.12.0.1.0 type=incorporate
judi-dev-01 #

24. To relax the version constraint on this package, set its version-lock facet to false from true.
judi-dev-01 # pkg change-facet facet.version-lock.service/network/ntp=false
            Packages to change:   1
     Variants/Facets to change:   1
       Create boot environment:  No
Create backup boot environment: Yes

PHASE                                          ITEMS
Removing old actions                             1/1
Updating package state database                 Done
Updating package cache                           0/0
Updating image state                            Done
Creating fast lookup database                   Done
Updating package cache                           1/1
judi-dev-01 #



25. Then try the upgrade again.
pkg update service/network/ntp@4.2.8.9,5.11-0.175.3.17.0.1.0  (To a Specific version)  OR to latest Version
judi-dev-01 # pkg update service/network/ntp
            Packages to update:   1
            Services to change:   2
       Create boot environment:  No
Create backup boot environment: Yes

DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
Completed                                1/1         24/24      1.4/1.4  1.1M/s

PHASE                                          ITEMS
Removing old actions                             2/2
Installing new actions                           2/2
Updating modified actions                      27/27
Updating package state database                 Done
Updating package cache                           1/1
Updating image state                            Done
Creating fast lookup database                   Done
Updating package cache                           1/1
judi-dev-01 #







===================================
===================================
===================================
Verify the checksum values
====================
judi-dev-01# cat 'MD5 Checksums.txt'
62384c43cfb71c459e8e08c98f410c43  sol-11_3-repo_1of5.zip
1a1d2139d9b4c0ddbf7d49bcfe2bdede  sol-11_3-repo_2of5.zip
ea3552c45d530258cf05d94fe7807005  sol-11_3-repo_3of5.zip
d1330a49ff181356273bbd7c647e2fee  sol-11_3-repo_4of5.zip
68226843f6388f475314a0a1dd567245  sol-11_3-repo_5of5.zip
judi-dev-01#


judi-dev-01# digest -a md5 sol-11_3-repo_1of5.zip
62384c43cfb71c459e8e08c98f410c43
judi-dev-01#
judi-dev-01#
judi-dev-01# digest -a md5 sol-11_3-repo_2of5.zip
1a1d2139d9b4c0ddbf7d49bcfe2bdede
judi-dev-01#
judi-dev-01#
judi-dev-01# digest -a md5 sol-11_3-repo_3of5.zip
ea3552c45d530258cf05d94fe7807005
judi-dev-01#
judi-dev-01#
judi-dev-01# digest -a md5 sol-11_3-repo_4of5.zip
d1330a49ff181356273bbd7c647e2fee
judi-dev-01#
judi-dev-01#
judi-dev-01# digest -a md5 sol-11_3-repo_5of5.zip
68226843f6388f475314a0a1dd567245
judi-dev-01#


-I Optional. Creates an ISO image of the repository in the source directory. Also leaves a mkiso.log log file in the source directory.
-v Optional. Verifies the final repository.
-c Optional. Compares the checksums of the .zip files with the checksums in the specified file. If you specify -c with no argument, the default file used is the .md5 file for the -i image in the source directory.
-d Required. Specifies the full path to the directory where you want the repository.
-s Optional. Specifies the full path to the directory where the .zip files are located. Default: The current directory.


Execute the install-repo.ksh script to create local repo,
======================================
judi-dev-01# ./install-repo.ksh -s /var/tmp/SRU11.3.14.6.0/localrepo -d /sol.11.3.repo/repo -c -v -I
Using sol-11_3-repo download.

Comparing checksums of downloaded files...done. Checksums match.

Uncompressing sol-11_3-repo_1of5.zip...done.
Uncompressing sol-11_3-repo_2of5.zip...done.
Uncompressing sol-11_3-repo_3of5.zip...done.
Uncompressing sol-11_3-repo_4of5.zip...done.
Uncompressing sol-11_3-repo_5of5.zip...done.
Repository can be found in /solaris_IPS_repo/solaris.11.3.
Initiating repository verification.
Scanning repository (this could take some time)                     0/5480 /
         WARNING: Restrictive permissions.
            Path: /solaris_IPS_repo
          Detail:
Some repository content for publisher 'solaris' or paths leading to
the repository were not world-readable or were not readable by
'pkg5srv:pkg5srv', which can cause access errors if the repository
contents are served by the following services:
svc:/application/pkg/server  svc:/application/pkg/system-repository.
Only the first path found with restrictive permissions is shown.



judi-dev-01#




Updating the latest SRU
==================
judi-dev-01# ./install-repo.ksh -s /var/tmp/SRU11.3.14.6.0 -d /sol.11.3/repo -v
Using p24921515_1100_SOLARIS64 files for sol-11_3_13_4_0-incr-repo download.
IPS repository exists at destination /sol.11.3/repo
Current version: 0.175.3.1.0.5.0
Do you want to add to this repository? (y/n)[n]: y
Uncompressing p24921515_1100_SOLARIS64_1of4.zip...done.
Uncompressing p24921515_1100_SOLARIS64_2of4.zip...done.
Uncompressing p24921515_1100_SOLARIS64_3of4.zip...done.
Uncompressing p24921515_1100_SOLARIS64_4of4.zip...done.
Repository can be found in /sol.11.3/repo.
Initiating repository rebuild.
Initiating repository verification.
Scanning repository (this could take some time)                     0/6694 /
         WARNING: Restrictive permissions.
            Path: /sol.11.3/repo/publisher
          Detail:
Some repository content for publisher 'solaris' or paths leading to
the repository were not world-readable or were not readable by
'pkg5srv:pkg5srv', which can cause access errors if the repository
contents are served by the following services:
svc:/application/pkg/server  svc:/application/pkg/system-repository.
Only the first path found with restrictive permissions is shown.


judi-dev-01#


Update a package from latest SRU in Client machine
======================================
judi-dev-01 # pkg update service/network/ntp
            Packages to update:   1
            Services to change:   2
       Create boot environment:  No
Create backup boot environment: Yes

DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
Completed                                1/1         24/24      1.4/1.4  1.1M/s

PHASE                                          ITEMS
Removing old actions                             2/2
Installing new actions                           2/2
Updating modified actions                      27/27
Updating package state database                 Done
Updating package cache                           1/1
Updating image state                            Done
Creating fast lookup database                   Done
Updating package cache                           1/1
judi-dev-01 #


~
solaris 11 IPS repository
sru update in IPS repository
setup IPS repository
IPS repository in solaris 11
setup IPS repository in solaris 11
how to setup IPS repository in solaris 11
solaris 11.3 sru download
download solaris 11.3 iso
~


No comments:

Post a Comment

Popular Posts