You are here

IPS - Image Packaging System

 

IPS  →  Nachfolger von pkadd  vergleichbar mit “yums” bei Redhat

 

-- Alternative zum Anlegen eines Local Repository.
   
   - ISO Datei mounten.
pkg set-publisher -G <zu entfernen Pfad>
-g file://<Pfad iso-datei>/repro solaris


   - Zweite möglichkeit
pkg create <pfad>
pkgrecv -s <quelle> -d <destinatio>

 


Info:  Mirror holt die Metadaten von origin (oracle)
 http://pkg.oracle.com/solaris/release
 http://pkg.oracle.com/solaris/support
 

"s11-serv" ist der Repository Server.


s11-serv1# uname -a
SunOS s11-serv1 5.11 11.0 i86pc i386 i86pc
 
 
s11-serv1# pkg publisher
PUBLISHER                             TYPE     STATUS   URI
solaris                               origin   online   http://192.168.2.188:8888/
 
s11-serv1# domainname
 
s11-serv1# hostname
s11-serv1
 
s11-serv1# df -k
Filesystem           1024-blocks        Used   Available Capacity  Mounted on

[...]

rpool/export             16386048          33     6809947     1%    /export 
rpool/export/IPS         16386048     6024865     6809947    47%    /export/IPS
rpool/export/home        16386048          32     6809947     1%    /export/home
rpool/export/home/oracle 16386048          87     6809947     1%    /export/home/oracle
rpool                    16386048          39     6809947     1%    /rpool
/export/home/oracle      6810034           87     6809947     1%    /home/oracle

 
 
s11-serv1# zpool list
NAME    SIZE  ALLOC   FREE  CAP  DEDUP  HEALTH  ALTROOT
rpool  15,9G  9,08G  6,80G  57%  1.00x  ONLINE  -
 
 
s11-serv1# nslookup s11-serv1
Server:               192.168.0.112
Address:              192.168.0.112#53
 
Name:                 s11-serv1.mydomain.com
Address:              192.168.0.112
 
 
s11-serv1# svcs application/pkg/server
STATE          STIME    FMRI
disabled       11:53:20 svc:/application/pkg/server:default
 
 
s11-serv1# svccfg -s application/pkg/server setprop pkg/inst_root=/export/IPS/repo

-- true =  man kann repository lesen.
-- false
=  man kann nicht repository lesen.
 
s11-serv1# svccfg -s application/pkg/server setprop pkg/readonly=true
 
s11-serv1# svcprop -p pkg/inst_root application/pkg/server /export/IPS/repo
 
 
s11-serv1# svcadm refresh application/pkg/server
 
 
s11-serv1# svcs -a |grep server
disabled       11:53:20 svc:/application/pkg/server:default
 
s11-serv1# svcadm enable application/pkg/server
 
s11-serv1# svcs -a |grep server
online         14:50:25 svc:/application/pkg/server:default
 
s11-serv1# svcs -xv
 
s11-serv1# pkgrepo refresh -s /export/IPS/repo
Initiating repository refresh.
 
s11-serv1# pkg publisher
PUBLISHER                             TYPE     STATUS   URI
solaris                               origin   online   http://192.168.2.188:8888/
                                                          
   
-- Alter Publisher (192.168.2.188) wird durch neuen Publisher (s11-serv1…) ersetzt.

s11-serv1# pkg set-publisher -G http://192.168.2.188:8888/ -g http://s11-serv1.mydomain.com/ solaris

 
 
s11-serv1# pkg publisher
PUBLISHER                             TYPE     STATUS   URI
solaris                               origin   online   http://s11-serv1.mydomain.com/
 
 
s11-serv1# pkg search entire
INDEX      ACTION VALUE          PACKAGE
pkg.fmri   set    solaris/entire pkg:/entire@0.5.11-0.175.0.0.0.2.0



-- Client einrichten siehe kapitel 3 seite 8

 
-- auf Client pkg  “gimp” installieren.
s11-desktop# pkg list gimp
pkg list: no packages matching 'gimp' installed
 
s11-desktop# pkg search gimp
INDEX       ACTION VALUE                                                  PACKAGE
pkg.summary set    GTK+ - GIMP toolkit libraries                          pkg:/library/desktop/gtk2@2.20.1-0.175.0.0.0.1.0
pkg.summary set    GTK+ - GIMP toolkit libraries - CUPS Print Backend     pkg:/library/desktop/gtk2/gtk-backend-cups@2.20.1-0.175.0.0.0.1.0
pkg.summary set    GNOME digital camera tool plugin for Gimp image editor pkg:/image/editor/gimp/plugin/gimp-gtkam@2.30.0-0.175.0.0.0.0.0
pkg.summary set    The Gimp image editor                                  pkg:/image/editor/gimp@2.6.10-0.175.0.0.0.2.0
pkg.summary set    The Gimp image editor - on-line help documents         pkg:/image/editor/gimp/gimp-help@2.4.2-0.175.0.0.0.0.0
basename    dir    usr/share/gimp                                         pkg:/image/editor/gimp/gimp-help@2.4.2-0.175.0.0.0.0.0
basename    dir    usr/lib/gimp                                           pkg:/image/editor/gimp/plugin/gimp-gtkam@2.30.0-0.175.0.0.0.0.0
basename    dir    usr/lib/gimp                                           pkg:/image/scanner/xsane@0.997-0.175.0.0.0.0.0
basename    dir    etc/gimp                                               pkg:/image/editor/gimp@2.6.10-0.175.0.0.0.2.0
basename    dir    usr/lib/gimp                                           pkg:/image/editor/gimp@2.6.10-0.175.0.0.0.2.0
basename    dir    usr/share/gimp                                         pkg:/image/editor/gimp@2.6.10-0.175.0.0.0.2.0
basename    link   usr/bin/gimp                                           pkg:/image/editor/gimp@2.6.10-0.175.0.0.0.2.0
pkg.fmri    set    solaris/image/editor/gimp                              pkg:/image/editor/gimp@2.6.10-0.175.0.0.0.2.0
 
 
s11-desktop# pkg install gimp   
           Packages to install:  5
       Create boot environment: No
Create backup boot environment: No
            Services to change:  2
 
DOWNLOAD                                  PKGS       FILES    XFER (MB)
Completed                                  5/5   2241/2241    13.0/13.0
 
PHASE                                        ACTIONS
Install Phase                              2579/2579
 
PHASE                                          ITEMS
Package State Update Phase                       5/5
Image State Update Phase                         2/2
 
 
s11-desktop# pkg list gimp  
NAME (PUBLISHER)                                  VERSION                    IFO
image/editor/gimp                                 2.6.10-0.175.0.0.0.2.0     i--
s11-desktop#
 
s11-desktop# pkg info gimp
          Name: image/editor/gimp
       Summary: The Gimp image editor
      Category: Applications/Graphics and Imaging
         State: Installed
     Publisher: solaris
       Version: 2.6.10
 Build Release: 5.11
        Branch: 0.175.0.0.0.2.0
Packaging Date: Wed Oct 19 13:36:15 2011
          Size: 29.86 MB
          FMRI: pkg://solaris/image/editor/gimp@2.6.10,5.11-0.175.0.0.0.2.0:20111019T133615Z
 

 

–- Undokumentierte Befehl, repo Verzeichnis im Command mit angeben.
pkgrep info -s /export/IPS/repo
pkgrep get -s /export/IPS/repo
 


-- Student Guide

Seite 57   (3-19) Auflistung alte und neu Befehle.
 


 

 

-- in welche pkg steckt die Datei "hosts".

s11-desktop# pkg search hosts     
–             INDEX       ACTION VALUE                                         PACKAGE
–             basename    dir    usr/ruby/1.8/share/ri/1.8/system/Resolv/Hosts pkg:/runtime/ruby-18@1.8.7.334-0.175.0.0.0.2.537
–             basename    dir    usr/lib/ocm/ccr/hosts                         pkg:/system/management/ocm@10.3.5.0-0.175.0.0.0.1.0
–             basename    file   etc/inet/hosts                                pkg:/system/network@0.5.11-0.175.0.0.0.2.1
–             basename    file   etc/net/ticlts/hosts                          pkg:/system/network@0.5.11-0.175.0.0.0.2.1
–             basename    file   etc/net/ticots/hosts                          pkg:/system/network@0.5.11-0.175.0.0.0.2.1
–             basename    file   etc/net/ticotsord/hosts                       pkg:/system/network@0.5.11-0.175.0.0.0.2.1
–             basename    link   etc/hosts                                     pkg:/system/network@0.5.11-0.175.0.0.0.2.1
–             pkg.summary set    fping - a program to ping hosts in parallel   pkg:/diagnostic/fping@2.4.2-0.175.0.0.0.2.537
–             s11-desktop#
 
 
–- inhalt eines pkg “network”
s11-desktop# pkg contents network
PATH
etc
etc/default
etc/default/dhcpagent
etc/default/inetinit
etc/default/ipsec
etc/default/mpathd
etc/dhcp
[…]
 


–- alle Befehle
s11-desktop#
pkg
add-property-value     list                   unavoid
avoid                  mediator               unfreeze
change-facet           property               uninstall
change-variant         publisher              unset-mediator
contents               purge-history          unset-property
facet                  rebuild-index          unset-publisher
fix                    refresh                update
freeze                 remove-property-value  update-format
help                   revert                 variant
history                search                 verify
image-create           set-mediator           version
info                   set-property          
install                set-publisher      
 
 

 

 

– -m menifast anzeigen
s11-serv1# pkg list -a 'group/system/*'
NAME (PUBLISHER)                                  VERSION                    IFO
group/system/solaris-auto-install                 0.5.11-0.175.0.0.0.2.2576  ---
group/system/solaris-desktop                      0.5.11-0.175.0.0.0.2.2576  ---
group/system/solaris-large-server                 0.5.11-0.175.0.0.0.2.2576  i--
group/system/solaris-small-server                 0.5.11-0.175.0.0.0.2.2576  ---

 
s11-serv1# pkg contents -m solaris-large-server |more
set name=pkg.fmri value=pkg://solaris/group/system/solaris-large-server@0.5.11,5.11-0.1
75.0.0.0.2.2576:20111020T063610Z
set name=variant.arch value=sparc value=i386
set name=org.opensolaris.consolidation value=ips
set name=pkg.summary value="Oracle Solaris Large Server"
set name=pkg.description value="Provides an Oracle Solaris large server environment"
set name=info.classification value="org.opensolaris.category.2008:Meta Packages/Group P
ackages"
set name=variant.opensolaris.zone value=global value=nonglobal
depend fmri=compress/gzip type=group
depend fmri=compress/bzip2 type=group
depend fmri=archiver/gnu-tar type=group
depend fmri=compress/unzip type=group
depend fmri=compress/zip type=group
depend fmri=crypto/pwgen type=group
depend fmri=developer/build/gnu-make type=group
depend fmri=developer/build/make type=group
depend fmri=developer/debug/mdb type=group
[…]