Apuntes y chorradas varias
viernes, 31 de julio de 2015
martes, 27 de noviembre de 2012
Local repository on Solaris 11
Steps to build a local repository on Solaris 11 from ISO image:
- Download the full repository image from Oracle Web. It is split in two files of 3.5GB each, ¡¡watch the disk space!!. Once downloaded, join both files with cat:
# cat sol-11_1-repo-full.iso-a sol-11_1-repo-full.iso-b > sol-11_1-repo-full.iso - Search for disk spce for the repository.
Besides the space for the ISO image, we need another 7.5gb disk space to store the repository permanently. Oracle recommends to store the repository in a separate zfs, so you can share it without sharing any other thing. Here we will use: /repo/Solaris11.1/repo - Create the repository. (/repo/Solaris11.1/repo must be empty (or not even exists)).
# pkgrepo create /repo/Solaris11.1/repo - Mount full repository ISO image on /mnt with lofi
# lofiadm -a /home/sysad/sol-11_1-repo-full.iso
# mount -F hsfs /dev/lofi/1 /mnt - Copy all the contents from the ISO image to our repository
# rsync -aP /mnt/repo/ /repo/Solaris11.1/repo (¡¡it takes a while!!)
Once it's done we can umount /mnt and delete the lofi device. - Build initial index.
# pkgrepo -s /repo/Solaris11.1/repo refresh - Set up and start the package serving service.
# svccfg -s application/pkg/server setprop pkg/inst_root=/repo/Solaris11.1/repo
# svccfg -s application/pkg/server setprop pkg/readonly=true
# svcprop -p pkg/inst_root application/pkg/server (¡¡¡this one is to check!!!)
# svcadm refresh application/pkg/server
# svcadm enable application/pkg/server - Set up our system to use the local repository (¡¡ Here is the magic !!)
# pkg set-publisher -G '*' -M '*' -g http://10.228.164.100:80/ solaris
-G '*' removes any other origin for publisher solaris
-M '*' removes any other mirror for publisher solaris
-g adds a new origin for publisher solaris.
From this moment the server will not try to reach pkg.oracle.com to get software packages.
If we want to use this local repository from any other server in our network, we just need to type the above command on this other servers.
Repositorio local en Solaris 11
Pasos para crear un repositorio local de Solaris 11 a partir de la imagen ISO:
- Descargar las ISOs del repositorio completo de la web de Oracle. Ojo son dos ficheros de unos 3.5GB cada uno. Hay que concatenarlos juntos para formar una sola ISO.
# cat sol-11_1-repo-full.iso-a sol-11_1-repo-full.iso-b > sol-11_1-repo-full.iso - Buscamos espacio para el repositorio. Aparte del espacio para la ISO, necesitamos otro tanto que sera donde realmente resida el repositorio. Lo recomendado es que sea un zfs distinto, pero no es necesario. En este ejemplo el repositorio estará en /repo/Solaris11.1/repo
- Crear repositorio. /repo/Solaris11.1/repo debe estar vacio (o no existir).
# pkgrepo create /repo/Solaris11.1/repo - Montar la imagen ISO del repositorio que hemos descargado en /mnt con lofi
# lofiadm -a /home/sysad/sol-11_1-repo-full.iso
# mount -F hsfs /dev/lofi/1 /mnt - Copiar todo el contenido de la ISO a nuestro repositorio
# rsync -aP /mnt/repo/ /repo/Solaris11.1/repo (¡¡lleva un rato!!)
Cuando acabe podemos desmontar /mnt y borrar el lofi. - Una vez haya terminado la copia, crearemos el indice inicial.
# pkgrepo -s /repo/Solaris11.1/repo refresh - Cambiar las propiedades de nuestro servicio servidor de paquetes. Y reiniciarlo.
# svccfg -s application/pkg/server setprop pkg/inst_root=/repo/Solaris11.1/repo
# svccfg -s application/pkg/server setprop pkg/readonly=true
# svcprop -p pkg/inst_root application/pkg/server (¡¡¡esta es para comprobar!!!)
# svcadm refresh application/pkg/server
# svcadm enable application/pkg/server - Indicar a nuestro sistema que el repositorio de paquetes esta en local (¡¡ Esta es la magia !!)
# pkg set-publisher -G '*' -M '*' -g http://10.228.164.100:80/ solaris
La opción -G '*' elimina cualquier otro origen para el publisher solaris
La opción -M '*' elimina cualquier mirror para el publisher solaris
La opción -g añade el nuevo origen al publisher solaris.
A partir de aquí este sistema ya no volverá a intentar ir a pkg.oracle.com a por un paquete.
Si queremos que algún otro servidor de nuestra red utilice este repositorio de paquetes no tendremos más que repetir este ultimo comando en él.
viernes, 23 de noviembre de 2012
Servidor de arranque / instalaciones por red con Solaris 11
Pasos para crear un servidor que nos permita arrancar por red y arrancar el proceso de instalación manual en modo texto máquinas SPARC.
Faltaría añadir lo necesario para configurar el servidor de DHCP necesario para las instalaciones x86, y también para un futuro averiguar que pasa con las instalaciones desatendidas que siempre intentan ir a pkg.oracle.com a buscar los paquetes.
- Lo primero es descargar la imagen ISO para instalaciones desatendidas para máquinas SPARC.
Descargar sol-11XXX-ai-sparc.iso (http://www.oracle.com/technetwork/server-storage/solaris11/downloads/index.html) seran unos 350MB. - Vamos con los comandos para crear el servidor de instalaciones.
# installadm create-service -s /home/sysad/sol-11_1-ai-sparc.iso -y
Este comando creara el servidor de instalación con los contenidos de la ISO que hemos descargado.
Sacará un warning avisandonos de que no puede anunciarse por DNSWarning: Service svc:/network/dns/multicast:default is not online.
Installation services will not be advertised via multicast DNS.
Si habilitamos ese servicio ya no lo hace, pero quien coño quiere anunciar por multicast DNS que tiene un servidor de instalaciones sparc.
También es posible que nos salga un error similar a este:
/usr/lib/installadm/check-server-setup[155]: get_system_networks[516]: calculate_net_addr: line 824: fmax(0,2**8-hosts): function has wrong number of argumentsThe SMF all_services/networks property (0.0.0.0/0) does not match a network interface on this server.
Automated Installations will not work with the current server network setup.
Este es raro, pero tambien tiene solución, hay que cambiar a locale=C antes de ejecutar el comando
# export LANG=C
# installadm create-service -s /home/sysad/sol-11_1-ai-sparc.iso -y
Si todo ha ido bien, tendríamos que ver un par de nuevos zfilesystems/etc/netboot/solaris11_1-sparc(/export/auto_install/solaris11_1-sparc):10474979 blocks 10474979 files
/etc/netboot/solaris11_1-sparc/system.conf(/var/ai/service/solaris11_1-sparc/system.conf):10474979 blocks 10474979 files
/etc/netboot/default-sparc(/export/auto_install/solaris11_1-sparc):10474979 blocks 10474979 files
/etc/netboot/default-sparc/system.conf(/var/ai/service/default-sparc/system.conf):10474979 blocks 10474979 files
parecen 4, pero en realidad son solo 2. Con el comando installadm podemos ver que los default-sparc son un alias# installadm listService Name Alias Of Status Arch Image Path
------------ -------- ------ ---- ----------
default-sparc solaris11_1-sparc on sparc /export/auto_install/solaris11_1-sparc
solaris11_1-sparc - on sparc /export/auto_install/solaris11_1-sparc - Añadir MAC del cliente al servidor
Tenemos que añadir la MAC del cliente al servidor y asociarlo con algún servicio de instalación para que nuestro servidor de instalaciones sepa que servidores debe arrancar e instalar y que tipo de instalación en cada uno.
# export LANG=C
# installadm create-client -e 0:14:4f:ce:f:90 -n default-sparc
Aquí pongo el export LANG=C directamente, porque todas las veces que no lo he puesto me da el error que he puesto en el punto anterior.
Con "-e" le decimos la MAC de la máquina que queremos arrancar.
Con "-n" le decimos cual de nuestros servicios de instalación debe atenderle.
Tendremos que ejecutar tantas lineas de estas como clientes queramos arrancar.
Con esto la parte del servidor de instalaciones esta completa. Vamos a los clientes. - Configurar network-boot-arguments
Para poder arrancar del servidor que hemos configurado ahora es necesario configurar esta variable de la eeprom. Lo primero es comprobar que tenemos una OBP lo suficientemente moderna como para que tenga esta funcionalidad. Simplemente echamos un vistazo a la salida de printenv, si aparece "network-boot-arguments" aunque sea vacía estamos de suerte, sino aparece habrá que actualizar la OBP de esa máquina a algo más moderno.
En esta variable lo que tenemos que configurar es la configuración de red que tendrá esta máquina cuando arranque, IP, mascara, router por defecto y Hostname. Y también decirle quien le da el fichero para wanboot. Esta es la sintaxis:
ok setenv network-boot-arguments host-ip=ip,router-ip=iprouter,subnet-mask=mascara,hostname=nombre,file=http://server:port/cgi-bin/wanboot-cgi
Si os fijasteis en la salida del comando installadm create-service, alli nos dice la URL de nuestro wanboot-cgi. Pero vamos será http://<IP Servidor Insta>:5555/cgi-bin/wanboot-cgi
Un ejemplo:
ok setenv network-boot-arguments host-ip=10.228.164.110,router-ip=10.228.164.1,subnet-mask=255.255.255.0,hostname=BL3,file=http://10.228.164.100:5555/cgi-bin/wanboot-cgi - Arrancar por red
Una vez configurada la variable network-boot-arguments solo nos queda:
ok boot net
Esto debería llevarnos hasta el menu de texto de la instalación de Solaris. La instalación que nos deja es muy básica (unos 800mb). Una vez que termine el proceso de instalación deberiamos hacer un:
# pkg set-publisher -G '*' -M '*' -g http://10.228.164.100:80/ solaris (Para indicarle nuestro repositorio local, si tenemos acceso a interne no hace falta)
# pkg install --accept group/system/solaris-large-server
Para que nos instale desde el repositorio todos los paquetes necesarios para la instalación solaris-large-server.
Con
ok boot net - install
Debería hacer una instalación de Solaris 11 desatendida, y supongo que la hará si la máquina que estamos arrancando/instalando tiene salida a internert, porque a mi siempre se me queda buscando el repositorio de paquetes oficial (pkg.oracle.com)
Network Boot / Install server on Solaris 11
Steps to create a network boot / install server for sparc server on Solaris 11.
I still need to add how to setup the DHCP server for x86 boot process and also figure out how to do an unattended installation while offline (without access to pkg.oracle.com).
I still need to add how to setup the DHCP server for x86 boot process and also figure out how to do an unattended installation while offline (without access to pkg.oracle.com).
- First is first. Download ISO image for SPARC unattended installations
Download sol-11XXX-ai-sparc.iso (http://www.oracle.com/technetwork/server-storage/solaris11/downloads/index.html) aprox. 350MB. - Create boot / install server (service)
# installadm create-service -s /home/sysad/sol-11_1-ai-sparc.iso -y
This simple command will create the boot / install server with the contents of the ISO image.
It will show a warning messagge telling us it cannot advertise the service via multicast DNS.
Warning: Service svc:/network/dns/multicast:default is not online.Installation services will not be advertised via multicast DNS.
We can enable that service but ... who wants to advertise this anyway.
Its possible to get this error messagge too:
/usr/lib/installadm/check-server-setup[155]: get_system_networks[516]: calculate_net_addr: line 824: fmax(0,2**8-hosts): function has wrong number of argumentsThe SMF all_services/networks property (0.0.0.0/0) does not match a network interface on this server.Automated Installations will not work with the current server network setup.
Don't know the reason why, but I found on a forum that chaging the locale to "C" makes it work. So:
# export LANG=C
# installadm create-service -s /home/sysad/sol-11_1-ai-sparc.iso -yIf everything goes ok, we will see a couple of new zfilesystems on our server
/etc/netboot/solaris11_1-sparc(/export/auto_install/solaris11_1-sparc):10474979 blocks 10474979 files/etc/netboot/solaris11_1-sparc/system.conf(/var/ai/service/solaris11_1-sparc/system.conf):10474979 blocks 10474979 files/etc/netboot/default-sparc(/export/auto_install/solaris11_1-sparc):10474979 blocks 10474979 files/etc/netboot/default-sparc/system.conf(/var/ai/service/default-sparc/system.conf):10474979 blocks 10474979 files
looks like 4, but they are only 2, really. Type installadm list
# installadm listService Name Alias Of Status Arch Image Path------------ -------- ------ ---- ----------default-sparc solaris11_1-sparc on sparc /export/auto_install/solaris11_1-sparcsolaris11_1-sparc - on sparc /export/auto_install/solaris11_1-sparc - Add client MAC address to boot server
Client == The server we want to boot / install.
We need to add the client MAC address and associate it with some install service so our boot / install server knows what to do when the MAC appears on the network asking for instructions to boot.
# export LANG=C
# installadm create-client -e 0:14:4f:ce:f:90 -n default-sparc
Here export LANG=C is mandatory.
"-e" is for adding the client MAC.
"-n" is to associate that client with an install service.
We will need to type as many of this lines as clients we need to boot / install.
With this the boot / install server is ready. Now there are some things we need to setup on the clients. - Setting network-boot-arguments eeprom variable
In order to boot from the server we just setup, we need to configure the "network-boot-argument" of the client eeprom. If our eeprom don't have that variable (doesn't appear with printenv) we will need to upgrade the OBP to a newer one.
We need to code inside this var the network configuration of the client. IP address, netmask, default gateway, hostname, and also who is going to provide the wanboot-cgi (our boot / install server). This is the sintax:
ok setenv network-boot-arguments host-ip=ip,router-ip=def-gateway,subnet-mask=mask,hostname=name,file=http://server:port/cgi-bin/wanboot-cgi
The wanboot URL is in the output of installadm create-service command. But unless you changed the default port it wil be: http://<BootserverIP>:5555/cgi-bin/wanboot-cgi
An example:
ok setenv network-boot-arguments host-ip=10.228.164.110,router-ip=10.228.164.1,subnet-mask=255.255.255.0,hostname=BL3,file=http://10.228.164.100:5555/cgi-bin/wanboot-cgi - Network boot and installation
Once network-boot-arguments it's setup we just need to:
ok boot net
This network boot process will take us to the installation text menu. We need to manually answer a few configuration questions about the server we are installing and the installation process will begin. This installation is a very basic one (about 800mb) on root filesystem. So once our client server boots on its own we should install the rest of the packets to get a full Solaris 11:
# pkg set-publisher -G '*' -M '*' -g http://localrep-ip:port/ solaris (to tell the new server where is the local repository in case we don't have access to pkg.oracle.com)
# pkg install --accept group/system/solaris-large-server
domingo, 11 de noviembre de 2012
miércoles, 7 de noviembre de 2012
Microsoft Office Mobile
Tenia que pasar, Microsoft lanzará en 2013 la Office para iOS y Android. Exclusiva de The Verge.com
Suscribirse a:
Entradas (Atom)