IPS cheat sheet: Difference between revisions

From Lolly's Wiki
Jump to navigationJump to search
No edit summary
Line 3: Line 3:
=Examples=
=Examples=
== Switching to Oracle Support Repository ==
== Switching to Oracle Support Repository ==
1. Auf der Webseite https://pkg-register.oracle.com/ ein Zertifikat
1. Get the client certificate at https://pkg-register.oracle.com/
herunterladen
 
  (x) Oracle Solaris 11 Support -> Submit
  (x) Oracle Solaris 11 Support -> Submit
  Comment: Rechnername -> Accept
  Comment: Rechnername -> Accept
Line 11: Line 11:
  -> Download Certificate
  -> Download Certificate


2. Per SCP auf Rechner kopieren.
2. Copy it to your Solaris 11 host into /var/pkg/ssl.
3. Einloggen per SSH, dann:
<pre>
# mv Oracle_Solaris_11_Support.key.pem /var/pkg/ssl
# mv Oracle_Solaris_11_Support.key.pem /var/pkg/ssl
# mv Oracle_Solaris_11_Support.certificate.pem /var/pkg/ssl
# mv Oracle_Solaris_11_Support.certificate.pem /var/pkg/ssl
</pre>


4. Bei Bedarf Proxy für http UND https setzen
4. Set you proxy environment if needed:
# http_proxy=http://139.11.6.62:3128/
<pre>
# https_proxy=http://139.11.6.62:3128/
# http_proxy=http://proxy:3128/
# https_proxy=http://proxy:3128/
# export http_proxy https_proxy
# export http_proxy https_proxy
</pre>
5. Set the publisher to the support repository:


5. Neuen Publisher setzen:
# pkg set-publisher \
# pkg set-publisher \
           -k /var/pkg/ssl/Oracle_Solaris_11_Support.key.pem \
           -k /var/pkg/ssl/Oracle_Solaris_11_Support.key.pem \
Line 27: Line 31:
           -G '*' -g https://pkg.oracle.com/solaris/support/ solaris
           -G '*' -g https://pkg.oracle.com/solaris/support/ solaris


6. Katalog aktualisieren
6. Refresh the catalog:
# pkg refresh --full
# pkg refresh --full


7. Prüfen, ob Updates verfügbar
7. Check for updates:
# pkg update -nv
# pkg update -nv


8. Updates installieren
8. If needed or wanted do the update:
# pkg update -v
# pkg update -v



Revision as of 11:51, 11 April 2013

Cheat sheet

Examples

Switching to Oracle Support Repository

1. Get the client certificate at https://pkg-register.oracle.com/

(x) Oracle Solaris 11 Support -> Submit
Comment: Rechnername -> Accept
-> Download Key
-> Download Certificate

2. Copy it to your Solaris 11 host into /var/pkg/ssl.

# mv Oracle_Solaris_11_Support.key.pem /var/pkg/ssl
# mv Oracle_Solaris_11_Support.certificate.pem /var/pkg/ssl

4. Set you proxy environment if needed:

# http_proxy=http://proxy:3128/
# https_proxy=http://proxy:3128/
# export http_proxy https_proxy

5. Set the publisher to the support repository:

  1. pkg set-publisher \
      	    -k /var/pkg/ssl/Oracle_Solaris_11_Support.key.pem \
      	    -c /var/pkg/ssl/Oracle_Solaris_11_Support.certificate.pem \
      	    -G '*' -g https://pkg.oracle.com/solaris/support/ solaris

6. Refresh the catalog:

  1. pkg refresh --full

7. Check for updates:

  1. pkg update -nv

8. If needed or wanted do the update:

  1. pkg update -v

Adding another repository

Until now the repository of OpenCSW is not in IPS format.

Repairing packages

Damn fast fingers did it! Lucky Luk style... the man who delete files faster than his shadow...

root@solaris11:/home/lollypop# rm /usr/bin/ls

So... the file is gone... oops.

No problem in Solaris 11. You can repair package contents! But.. in which package was it?

root@solaris11:/home/lollypop# pkg search /usr/bin/ls
INDEX      ACTION VALUE      PACKAGE
path       file   usr/bin/ls pkg:/system/core-os@0.5.11-0.175.0.10.1.0.0

So it is in the package pkg:/system/core-os@0.5.11-0.175.0.10.1.0.0 . Let us take a look what the system thinks what is wrong with our files from this package:

root@solaris11:/home/lollypop# pkg verify  pkg:/system/core-os@0.5.11-0.175.0.10.1.0.0
PACKAGE                                                                 STATUS <3>
pkg://solaris/system/core-os                                             ERROR
        file: usr/bin/ls
                Missing: regular file does not exist

That is exactly what we thougt :-). So let us fix it!

root@solaris11:/home/lollypop# pkg fix  pkg:/system/core-os@0.5.11-0.175.0.10.1.0.0
Verifying: pkg://solaris/system/core-os                         ERROR          <3>
        file: usr/bin/ls
                Missing: regular file does not exist
Created ZFS snapshot: 2013-04-10-07:40:21
Repairing: pkg://solaris/system/core-os                      
                                                                               

DOWNLOAD                                  PKGS       FILES    XFER (MB)
Completed                                  1/1         1/1      0.0/0.0$<3>

PHASE                                        ACTIONS
Update Phase                                     1/1

PHASE                                          ITEMS
Image State Update Phase                         2/2 
root@solaris11:/home/lollypop# 

Beware of trying this with /usr/bin/pkg !!!

Kategorie:Solaris11