Como primer paso voy a crear un POOL llamado TEST, con un disco de 54gb, donde alojare mis zonas.
root@psunp006:~# zpool create TEST c0t60050768018285D270000000000004CBd0s0
root@psunp006:~# zfs create TEST/zona3
root@psunp006:~# zfs set mountpoint=/export/zona3 TEST/zona3
root@psunp006:~# zfs list -r
NAME USED AVAIL REFER MOUNTPOINT
TEST 180K 58.6G 31K /TEST
TEST/zona3 31K 58.6G 31K /export/zona3
root@psunp006:~# chmod 700 /export/zona3
Comienzo la configuracion basica de la zona, si quiero usar la misma placa de la zona global
debo usar la opcion ip-type=shared
root@psunp006:~# zonecfg -z zona3
Use 'create' to begin configuring a new zone.
zonecfg:zona3> create -b
zonecfg:zona3> set zonepath=/export/zona3
zonecfg:zona3> set autoboot=true
zonecfg:zona3> add net
zonecfg:zona3:net> set address=10.67.100.123/24
zonecfg:zona3:net> set physical=net2
zonecfg:zona3:net> end
zonecfg:zona3> set ip-type=shared
zonecfg:zona3> verify
zonecfg:zona3> commit
zonecfg:zona3> exit
------
root@psunp006:~# zoneadm list -cv
ID NAME STATUS PATH BRAND IP
0 global running / solaris shared
- zona3 configured /export/zona3 solaris shared
root@psunp006:~# zoneadm -z zona3 install
Progress being logged to /var/log/zones/zoneadm.20150713T140435Z.zona3.install
Image: Preparing at /export/zona3/root.
Install Log: /system/volatile/install.7979/install_log
AI Manifest: /tmp/manifest.xml.gYa4Jp
SC Profile: /usr/share/auto_install/sc_profiles/enable_sci.xml
Zonename: zona3
Installation: Starting ...
Creating IPS image
Startup linked: 1/1 done
Installing packages from:
solaris
origin: http://10.77.100.212/
DOWNLOAD PKGS FILES XFER (MB) SPEED
Completed 282/282 53172/53172 372.0/372.0 5.2M/s
PHASE ITEMS
Installing new actions 70790/70790
Updating package state database Done
Updating package cache 0/0
Updating image state Done
Creating fast lookup database Done
Updating package cache 1/1
Installation: Succeeded
Note: Man pages can be obtained by installing pkg:/system/manual
done.
Done: Installation completed in 240.491 seconds.
Next Steps: Boot the zone, then log into the zone console (zlogin -C)
to complete the configuration process.
Log saved in non-global zone as
/export/zona3/root/var/log/zones/zoneadm.20150713T140435Z.zona3.install
root@psunp006:~#
Perfecto, ya quedo instalada la zona con Solaris 11, y ahora tal cual lo indica ellog de instalacion, queda
bootear la zona y loguearse a la consola de la zona con zlogin -C zona3
root@psunp006:~# zoneadm list -cv
ID NAME STATUS PATH BRAND IP
0 global running / solaris shared
- zona3 installed /export/zona3 solaris shared
root@psunp006:~#
Ahora voy a crear un pool zfs llamado ORACLE , donde alojare en el los fs u00 y u01 para la bd.
root@psunp006:~# zpool create ORACLE c0t60050768018285D270000000000002E2d0s0
root@psunp006:~# zpool status ORACLE
pool: ORACLE
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
ORACLE ONLINE 0 0 0
c0t60050768018285D270000000000002E2d0s0 ONLINE 0 0 0
errors: No known data errors
root@psunp006:~#
root@psunp006:~# zfs create ORACLE/u00
root@psunp006:~# zfs create ORACLE/u01
root@psunp006:~#zonecfg -z zona3
root@psunp006:~#zonecfg -z zona3
zonecfg:zona3> add dataset
zonecfg:zona3:dataset> set name=ORACLE/u00
zonecfg:zona3:dataset> set name=ORACLE/u01
zonecfg:zona3:dataset> end
zonecfg:zona3> verify
zonecfg:zona3> commit
zonecfg:zona3>exit
*** MUY IMPORTANTE, SETEAR EL PARAMETRO LEGACY AL FS QUE LE QUIERO AGREGAR A LA ZONA
root@psunp006:~# zfs set mountpoint=legacy ORACLE/u00
root@psunp006:~# zfs set mountpoint=legacy ORACLE/u01
root@psunp006:~# zonecfg -z zona3
zonecfg:zona3> add fs
zonecfg:zona3:fs> set type=zfs
zonecfg:zona3:fs> set special=/ORACLE/u00
zonecfg:zona3:fs> set dir=/u00
zonecfg:zona3:fs> end
zonecfg:zona3> add fs
zonecfg:zona3:fs> set type=zfs
zonecfg:zona3:fs> set special=ORACLE/u01
zonecfg:zona3:fs> set dir=/u01
zonecfg:zona3:fs> end
zonecfg:zona3> verify
zonecfg:zona3> commit
zonecfg:zona3> exit
root@psunp006:~#
ahora un zlogin a la zona , y a crear el usuario oracle, grupo dba
root@psunp006:~# zlogin zona3
root@orazona:~# df -h
Filesystem Size Used Available Capacity Mounted on
rpool/ROOT/solaris 54G 680M 53G 2% /
/dev 0K 0K 0K 0% /dev
u00 54G 2.6G 51G 5% /u00
u01 51G 31K 51G 1% /u01
rpool/ROOT/solaris/var
54G 39M 53G 1% /var
---- corte la salida, la intencion es mostrar como monto los fs /u00 y /u01 dentro de la zona
root@orazona:~# groupadd -g 100 dba
root@orazona:~# groupadd -g 101 oinstall
root@orazona:~# useradd -u 1000 -g 100 -m -d /export/home/oracle -s /usr/bin/bash oracle
Agregue la siguiente linea al /etc/project
user.oracle:100::oracle::project.max-shm-memory=(priv,214748364800,deny)
Instalando la base Oracle, nos dio el siguiente error
>>> Ignoring required pre-requisite failures. Continuing...
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2015-07-13_12-24-41PM.
Please wait ...oracle@orazona:/u00/database$ Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/OraInstall2015-07-13_12-24-41PM/jdk/jre/lib/sparcv9/motif21/libmawt.so: ld.so.1: java: fatal: libXm.so.4: open failed: No such file or directory
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2015-07-13_12-24-41PM.
Please wait ...oracle@orazona:/u00/database$ Exception in thread "main"
java.lang.UnsatisfiedLinkError: /tmp/OraInstall2015-07-13_12-24-41PM/jdk/jre/lib/sparcv9/motif21/libmawt.so: ld.so.1: java: fatal: libXm.so.4:
open failed: No such file or directory
La solucion a ese error es instalar las librerias de motif
lo ejecute desde la zona global
root@psunp006:~# pkg install pkg://solaris/library/motif
Packages to install: 2
Create boot environment: No
Create backup boot environment: No
Planning linked: 0/2 done; 1 working: zone:zona3
Planning linked: 1/2 done; 1 working: zone:zona1
Planning linked: 2/2 done
DOWNLOAD PKGS FILES XFER (MB) SPEED
Completed 2/2 742/742 5.0/5.0 1.3M/s
Downloading linked: 0/2 done; 1 working: zone:zona3
Downloading linked: 1/2 done; 1 working: zone:zona1
Downloading linked: 2/2 done
PHASE ITEMS
Installing new actions 841/841
Updating package state database Done
Updating package cache 0/0
Updating image state Done
Creating fast lookup database Done
Executing linked: 0/2 done; 1 working: zone:zona3
Executing linked: 1/2 done; 1 working: zone:zona1
Executing linked: 2/2 done
Updating package cache 1/1
root@psunp006:~#
La instalacion siguio fallando por falta de algunos paquetes, que instale desde la zona global
root@psunp006:~#
root@psunp006:~# pkg install SUNWfont-xorg-core
Packages to install: 1
Services to change: 1
Create boot environment: No
Create backup boot environment: No
Planning linked: 0/2 done; 1 working: zone:zona3
Planning linked: 1/2 done; 1 working: zone:zona1
Planning linked: 2/2 done
DOWNLOAD PKGS FILES XFER (MB) SPEED
Completed 1/1 634/634 10.7/10.7 3.6M/s
Downloading linked: 0/2 done; 1 working: zone:zona3
Downloading linked: 1/2 done; 1 working: zone:zona1
Downloading linked: 2/2 done
PHASE ITEMS
Installing new actions 665/665
Updating package state database Done
Updating package cache 0/0
Updating image state Done
Creating fast lookup database Done
Executing linked: 0/2 done; 1 working: zone:zona3
Executing linked: 1/2 done; 1 working: zone:zona1
Executing linked: 2/2 done
Updating package cache 1/1
root@psunp006:~#
root@psunp006:~# pkg install SUNWfont-xorg-iso8859-1
Packages to install: 1
Services to change: 1
Create boot environment: No
Create backup boot environment: No
Planning linked: 0/2 done; 1 working: zone:zona3
Planning linked: 1/2 done; 1 working: zone:zona1
Planning linked: 2/2 done
DOWNLOAD PKGS FILES XFER (MB) SPEED
Completed 1/1 417/417 2.0/2.0 974k/s
Downloading linked: 0/2 done; 1 working: zone:zona3
Downloading linked: 1/2 done; 1 working: zone:zona1
Downloading linked: 2/2 done
PHASE ITEMS
Installing new actions 442/442
Updating package state database Done
Updating package cache 0/0
Updating image state Done
Creating fast lookup database Done
Executing linked: 0/2 done; 1 working: zone:zona3
Executing linked: 1/2 done; 1 working: zone:zona1
Executing linked: 2/2 done
Updating package cache 1/1
root@psunp006:~#
root@psunp006:~# pkg install SUNWxorg-client-programs
Packages to install: 44
Services to change: 4
Create boot environment: No
Create backup boot environment: No
Planning linked: 0/2 done; 1 working: zone:zona3
Planning linked: 1/2 done; 1 working: zone:zona1
Planning linked: 2/2 done
DOWNLOAD PKGS FILES XFER (MB) SPEED
Completed 44/44 780/780 7.8/7.8 1.4M/s
Downloading linked: 0/2 done; 1 working: zone:zona3
Downloading linked: 1/2 done; 1 working: zone:zona1
Downloading linked: 2/2 done
PHASE ITEMS
Installing new actions 1991/1991
Updating package state database Done
Updating package cache 0/0
Updating image state Done
Creating fast lookup database Done
Executing linked: 0/2 done; 1 working: zone:zona3
Executing linked: 1/2 done; 1 working: zone:zona1
Executing linked: 2/2 done
Updating package cache 1/1
root@psunp006:~#
La instalacion continuo hasta que en el paso 11 de la misma, mostro el sig error ( faltaba el make, ver foto )
La solucion fue :
loguearme en la zona ( no desde la global) y ejecutar el pkg correspondiente
root@orazona:~# pkg install make
Packages to install: 1
Create boot environment: No
Create backup boot environment: No
DOWNLOAD PKGS FILES XFER (MB) SPEED
Completed 1/1 10/10 0.2/0.2 2.3M/s
PHASE ITEMS
Installing new actions 20/20
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@orazona:~#
Ya en su paso final, arrojo un error comun en este entorno de Solaris 11, debido a que
la instalacion de la Base de datos, en la fase de relinkeo, utiliza un paquete developer/assembler
y no esta instalado por default, pero viene en los paquetes a instalar de S.O.
INFO: (if [ "assemble" = "assemble" ] ; then \
/u00/app/oracle/product/11.2.0/dbhome_1/bin/gennttab > ntcontab.s ;\
/usr/ccs/bin/as -P -m64 -o ntcontab.o ntcontab.s ;\
rm -f /u00/app/oracle/product/11.2.0/dbhome_1/lib/ntcontab.o ;\
mv ntcontab.o /u00/app/oracle/product/11.2.0/dbhome_1/lib/ ;\
/usr/ccs/bin/ar rv /u00/app/oracle/product/11.2.0/dbhome_1/lib/libn11.a /u00/app/oracle/product/11.2.0/dbhome_1/lib/ntcontab.o ; fi)
INFO: sh[2]: /usr/ccs/bin/as: not found [No such file or directory]
La solucion es loguearse en la zona y ejecutar :
root@orazona:~# pkg install developer/assembler
Packages to install: 1
Create boot environment: No
Create backup boot environment: No
DOWNLOAD PKGS FILES XFER (MB) SPEED
Completed 1/1 5/5 0.2/0.2 1.9M/s
PHASE ITEMS
Installing new actions 11/11
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@orazona:~#
Listo, ya esta instalado Oracle 11g .
Agradecimiento: A Leandro Zungri ( dba Oracle ), que realizo la instalacion del motor de Oracle y la configuracion de la instancia creada para este documento