IPS Package Repository Local

Page last edited hace 1565 días 5 horas
De Solaris-ES
Saltar a: navegación, buscar

Descargamos los paquetes del repositorio[editar]

$ unzip sol-11-xxx-xxx-repo-full-iso-a.zip
$ unzip sol-11-xxx-xxx-repo-full-iso-b.zip
$ cat sol-11-xxx-xxx-repo-full.iso-a sol-11-xxx-xxx-repo-full.iso-b >sol-11-xxx-xxx-repo-full.iso
$ su –

Montamos la imagen del repositorio y la copiamos localmente[editar]

# zpool list
# zfs list
# zfs create -o compression=on rpool/export/IPS
# lofiadm –a sol-11-xxx-xxx-repo-full.iso
# mount –F hsfs /dev/lofi/1 /mnt
# zfs set mountpoint=/IPS rpool/IPS
# rsync -avz /mnt /export/IPS

Definimos y reconfiguramos el repositorio[editar]

# svcs application/pkg/server
# svcprop -p pkg/inst_root application/pkg/server
# pkg search entire
# svccfg -s application/pkg/server setprop pkg/inst_root=/export/IPS/repo
# svccfg -s application/pkg/server setprop pkg/readonly=true
# svcprop -p pkg/inst_root application/pkg/server
# svcadm refresh application/pkg/server
# svcadm enable application/pkg/server
# svcs application/pkg/server
# pkgrepo refresh -s /export/IPS/repo
# pkg publisher
# pkg set-publisher -G http://pkg.oracle.com/solaris/release/ -g http://sol02.mydomain.com solaris
# pkg set-publisher -P -g http://sol02.mydomain.com solaris
# pkg publisher
# pkg rebuild-index
# pkg search entire
# pkgrepo info -s /export/IPS/repo
# pkgrepo get -s /export/IPS/repo repository/description

Si no hay conexion a internet eliminamos el repositorio de oracle[editar]

# pkg publisher
# pkg unset-publisher solaris
# pkg set-publisher -P -g http://sol02.mydomain.com solaris
# pkg rebuild-index

Verificar si hay actualizaciones disponibles[editar]

# pkg update -n

Configurar los certificados y actualizar Solaris[editar]

Generar y bajar los certificados[editar]

https://pkg-register.oracle.com/register/status/

Instalar los certificados en el equipo[editar]

root@sol11:~# mkdir -m 0755 -p /var/pkg/ssl
root@sol11:~# cp -i ~/Desktop/Oracle_Solaris_11_Support.key.pem /var/pkg/ssl
root@sol11:~# cp -i ~/Desktop/Oracle_Solaris_11_Support.certificate.pem /var/pkg/ssl
root@sol11:~# cd /var/pkg/ssl/

Add the publisher[editar]

root@sol11:/var/pkg/ssl# 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
root@sol11:/var/pkg/ssl# pkg rebuild-index
root@sol11:/var/pkg/ssl# pkg publisher
root@sol11:/var/pkg/ssl# pkg update 
           Packages to install:   1
            Packages to update: 220
           Mediators to change:   1
       Create boot environment: Yes
Create backup boot environment:  No

DOWNLOAD                                  PKGS       FILES    XFER (MB)
Completed                              221/221   5591/5591  152.9/152.9$<3>

PHASE                                        ACTIONS
Removal Phase                              1864/1864 
Install Phase                              2067/2067 
Update Phase                               6855/6855 

PHASE                                          ITEMS
Package State Update Phase                   441/441 
Package Cache Update Phase                   220/220 
Image State Update Phase                         2/2 

PHASE                                          ITEMS
Reading Existing Index                           8/8 
Indexing Packages                            221/221
Optimizing Index...

PHASE                                          ITEMS
Indexing Packages                            462/462 

A clone of solaris exists and has been updated and activated.
On the next boot the Boot Environment solaris-1 will be
mounted on '/'.  Reboot when ready to switch to this updated BE.


---------------------------------------------------------------------------
NOTE: Please review release notes posted at:

http://www.oracle.com/pls/topic/lookup?ctx=E23824&id=SERNS
---------------------------------------------------------------------------


Buscar e instalar un paquete[editar]

root@sol11:~# pkg search gcc
INDEX           ACTION   VALUE                                                               PACKAGE
pkg.description set      GCC Runtime - Shared libraries used by gcc and other gnu components pkg:/system/library/gcc-3-runtime@3.4.3-0.175.0.0.0.2.537
pkg.summary     set      GCC Runtime libraries                                               pkg:/system/library/gcc-3-runtime@3.4.3-0.175.0.0.0.2.537
pkg.summary     set      GCC - 4.5 Compilers                                                 pkg:/developer/gcc-45@4.5.2-0.175.0.0.0.2.537
pkg.summary     set      GCC - 4.5 Runtime                                                   pkg:/system/library/gcc-45-runtime@4.5.2-0.175.0.0.0.2.537
basename        hardlink usr/sfw/bin/gcc                                                     pkg:/developer/gcc-3@3.4.3-0.175.0.0.0.2.537
basename        link     usr/bin/gcc                                                         pkg:/developer/gcc-45@4.5.2-0.175.0.0.0.2.537
pkg.description set      GCC Runtime - Shared libraries used by gcc and other gnu components pkg:/system/library/gcc-3-runtime@3.4.3-0.175.0.0.0.2.537
pkg.summary     set      gcc - The GNU C compiler                                            pkg:/developer/gcc-3@3.4.3-0.175.0.0.0.2.537
basename        dir      usr/gcc                                                             pkg:/system/library/gcc-45-runtime@4.5.2-0.175.0.0.0.2.537
basename        dir      usr/gcc/4.5/lib/gcc                                                 pkg:/system/library/gcc-45-runtime@4.5.2-0.175.0.0.0.2.537
basename        dir      usr/sfw/lib/gcc                                                     pkg:/developer/gcc-3@3.4.3-0.175.0.0.0.2.537
basename        dir      usr/sfw/libexec/gcc                                                 pkg:/developer/gcc-3@3.4.3-0.175.0.0.0.2.537
basename        dir      usr/gcc                                                             pkg:/developer/gcc-45@4.5.2-0.175.0.0.0.2.537
basename        dir      usr/gcc/4.5/lib/gcc                                                 pkg:/developer/gcc-45@4.5.2-0.175.0.0.0.2.537
basename        file     usr/gcc/4.5/bin/gcc                                                 pkg:/developer/gcc-45@4.5.2-0.175.0.0.0.2.537

root@sol11:~# pkg install gcc-45
           Packages to install:  4
       Create boot environment: No
Create backup boot environment: No
            Services to change:  1

DOWNLOAD                                  PKGS       FILES    XFER (MB)
Completed                                  4/4   1030/1030  123.6/123.6$<3>

PHASE                                        ACTIONS
Install Phase                              1270/1270 

PHASE                                          ITEMS
Package State Update Phase                       4/4 
Image State Update Phase                         2/2 

PHASE                                          ITEMS
Reading Existing Index                           8/8 
Indexing Packages                                4/4