El primer paso es bajar de la web de oracle la imagen .iso que contiene el repositorio que vamos a utilizar .
http://www.oracle.com/technetwork/server-storage/solaris11/downloads/local-repository-2245081.html
Son 4 archivos .zip mas un script instal-repo.ksh y un README
sol-11_2-repo-1of4.zip
sol-11_2-repo-2of4.zip
sol-11_2-repo-3of4.zip
sol-11_2-repo-4of4.zip
Una vez hecho los pasos anteriores, comienzo con la creacion de mi repositorio local.
Como tengo espacio, voy a crear un zpool exclusivo para que quede como repositorio, pero
en caso de no contar con discos como para crear un nuevo zpool, se puede utilizar un
fs ya existente yque tenga espacio, como puede ser un /export/home/
zpool create REPOpool c0t60050768018285D2700000000000005Ad0s0
zfs set mountpoint=/repo REPOpool
Chequeo como quedo
# zpool status REPOpool
pool: REPOpool
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
REPOpool ONLINE 0 0 0
c0t60050768018285D2700000000000005Ad0s0 ONLINE 0 0 0
errors: No known data errors
#
Copio la imagen .iso que contiene los repositorios del solaris 11 , que baje previamente,y describi mas arriba en este documento.
#lofiadm -a /repo/sol-11_2-repo.iso
#mount -F hsfs /dev/lofi/1 /mnt
# rsync -aP /mnt/repo /repo
# umount /mnt
# df -h /repo
Filesystem Size Used Available Capacity Mounted on
REPOpool 54G 15G 39G 28% /repo
#
# ls -ltrh
total 15589252
-rwxr-xr-x 1 root root 5.8K Jun 25 2014 README-repo-iso.txt
-rw-r--r-- 1 root root 1.6K Jun 25 2014 NOTICES
-rw-r--r-- 1 root root 3.2K Jun 25 2014 COPYRIGHT
dr-xr-xr-x 3 root root 4 Jun 12 02:57 repo
-rw-r--r-- 1 root root 8.2G Jun 18 06:58 sol-11_2-repo.iso
#
Ahora si, a tirar comandos para crear el repositorio
# svccfg -s application/pkg/server setprop pkg/inst_root=/repo/repo
# svccfg -s application/pkg/server setprop pkg/readonly=true
# svcadm refresh application/pkg/server
# svcadm enable application/pkg/server
#
# pkg set-publisher -O http://10.77.100.212 solaris
# pkgrepo refresh -s /repo/repo
Initiating repository refresh.
#
Pruebo si encuentra algun paquete como para instalar
# pkg search xclock
INDEX ACTION VALUE PACKAGE
basename file usr/share/X11/app-defaults/XClock pkg:/x11/xclock@1.0.7-0.175.2.0.0.42.1406
basename file usr/bin/xclock pkg:/x11/xclock@1.0.7-0.175.2.0.0.42.1406
basename link usr/X11/bin/xclock pkg:/x11/xclock@1.0.7-0.175.2.0.0.42.1406
com.oracle.info.description set the xclock utility pkg:/x11/xclock@1.0.7-0.175.2.0.0.42.1406
com.oracle.info.name set xclock pkg:/x11/xclock@1.0.7-0.175.2.0.0.42.1406
pkg.description set xclock is the classic X Window System clock utility. It displays the time in analog or digital form, continuously updated at a frequency which may be specified by the user. pkg:/x11/xclock@1.0.7-0.175.2.0.0.42.1406
pkg.fmri set solaris/x11/xclock pkg:/x11/xclock@1.0.7-0.175.2.0.0.42.1406
pkg.summary set xclock - analog / digital clock for X pkg:/x11/xclock@1.0.7-0.175.2.0.0.42.1406
#
Con el sig comando se instala el paquete xclock
# pkg install xclock
Packages to install: 1
Create boot environment: No
Create backup boot environment: No
DOWNLOAD PKGS FILES XFER (MB) SPEED
Completed 1/1 8/8 0.0/0.0 970k/s
PHASE ITEMS
Installing new actions 33/33
Updating package state database Done
Updating package cache 0/0
Updating image state Done
Creating fast lookup database Done
Updating package cache 1/1
root@psunp006:/repo#
Otro ejemplo del uso del pkg para instalar un paquete
# pkg install gcc
Packages to install: 17
Mediators to change: 1
Services to change: 1
Create boot environment: No
Create backup boot environment: No
Planning linked: 0/1 done; 1 working: zone:zona1
Planning linked: 1/1 done
DOWNLOAD PKGS FILES XFER (MB) SPEED
Completed 17/17 2865/2865 61.1/61.1 5.8M/s
Downloading linked: 0/1 done; 1 working: zone:zona1
Downloading linked: 1/1 done
PHASE ITEMS
Installing new actions 3389/3389
Updating package state database Done
Updating package cache 0/0
Updating image state Done
Creating fast lookup database Done
Executing linked: 0/1 done; 1 working: zone:zona1
Executing linked: 1/1 done
Updating package cache 1/1
#
Para ver que grupo quedo instalado
# pkg info -r group/system/solaris-large-server
Name: group/system/solaris-large-server
Summary: Oracle Solaris Large Server
Description: Provides an Oracle Solaris large server environment
Category: Meta Packages/Group Packages
State: Installed
Publisher: solaris
Version: 0.5.11
Build Release: 5.11
Branch: 0.175.2.0.0.42.0
Packaging Date: June 23, 2014 09:49:37 PM
Size: 5.46 kB
FMRI: pkg://solaris/group/system/solaris-large-server@0.5.11,5.11-0.175.2.0.0.42.0:20140623T214937Z
#
No hay comentarios:
Publicar un comentario