March 9, 2010

Reflexions

Posted by otioti

Ok, guys, i’m sick, actually, i’m better than last weekend, but i’m not complete OK. So, i’m starting to get bored, and i realized a to-do list very usesful if you’re in my situation:

  1. Order your Spotify lists
  2. Re-read a book about a certification you want to do
  3. Maintain order at home
  4. Don’t try to work remotely, you could do mistakes
  5. Try to work that Smartcard (for Spanish ID) you bought two months ago
  6. Don’t watch TV. Spanish television is boring in the afternoon
  7. Order your TV Series. If you can, keep up-to-date that unfollowed TV Shows
  8. Order your wardrobe
  9. Install all Macheist software you bought and you’d never used it
  10. And last, and most important, DO NOT USE Computers.

2010-02-03 13.23.49

February 11, 2010

Fun at work

Posted by otioti

February 2, 2010

Linux

Posted by otioti

Por facilidad del despliegue, se realiza la instalación en una Fedora Core 12

Dependencias comunes:

  • Apache version 1.3.33 or higher / Apache version 2.0.46 or higher.
    • Mod_perl version 1.29 or higher.
    • Mod_php version 4.3.2 or higher.
  • PHP 4.3.2 or higher, with ZIP and GD support enabled.
  • PERL 5.6 or higher.
    • Perl module XML::Simple version 2.12 or higher.
    • Perl module Compress::Zlib version 1.33 or higher.
    • Perl module DBI version 1.40 or higher.
    • Perl module DBD::Mysql version 2.9004 or higher.
    • Perl module Apache::DBI version 0.93 or higher.
    • Perl module Net::IP version 1.21 or higher.
    • Perl module SOAP::Lite version 0.66 or higher (optional)
  • MySQL version 4.1.0 or higher with InnoDB engine active.
  • Make utility such as GNU make.

Accedemos al sistema, y actualizamos el mismo:

yum update

Instalamos y configuramos la mysql:

yum install mysql
service mysqld start
chkconfig mysqld on

Ejecutamos:

mysql_secure_installation

configuramos la contraseña de root y deshabilitamos el acceso anónimo.

Instalamos OCS Inventory:

yum install ocsinventory
service httpd restart
chkconfig httpd on

Accedemos a la siguiente url: http://ourserver.com/ocsreports/install.php

Introducimos las credenciales del usuario root que hemos configurado anteriormente.

Pulsamos en Send. A continuación comprobará la viabilidad de configurar OCS Inventory en el sistema. Si nos devuelve algún error, deberemos revisarlo y solventarlo.

Si no existe ningún error, procederemos a pulsar en el botón Send. A continuación se generará el usuario admin con contraseña por defecto admin.

Accederemos al sistema introduciendo dichas credenciales por defecto.

Realizaremos las siguientes configuraciones: pulsar en el icono de la llave inglesa / Configuración y luego en la pestaña de Servidores:

  • LOGLEVEL = On
  • PROLOG_FREQ = 24
  • AUTO_DUPLICATE_LVL = Model +  Serial + Mac Address.
  • TRACE_DELETED = On (required by GLPI).
  • SESSION_VALIDITY_TIME = 600 (session duration, the empty value provided is not valid).

Modificamos el usuario de la base de datos que conecta OCS  con la DB ocsweb:

# mysql -uroot -prootsecret
mysql> UPDATE mysql.user SET Password = PASSWORD('ocssecret') WHERE User = 'ocs';
mysql> FLUSH PRIVILEGES;
mysql> exit

Modificamos el fichero /etc/httpd/conf.d/ocsinventory-server.conf:

PerlSetVar OCS_DB_PWD ocssecret

el fichero /etc/ocsinventory/ocsinventory-reports/dbconfig.inc.php:

$_SESSION["PSWD_BASE"]="ocssecret"

Ejecutamos:

service httpd reload

Instalamos OCSInventory-agent en Gentoo:

Se adjunta el ebuild necesario para construir el agente de OCSInventory para Gentoo. Para el resto de sistemas, se puede descargar de la web oficial.

Descargamos el adjunto y se coloca en /usr/local/app-admin/ocsinventory-agent/.

Luego se emerge el paquete:

 
emerge -q ocsinventory-agent

Es recomendable tener instalado smartmontools:

emerge -q smartmontools

Modificamos el fichero /etc/ocsinventory-agent/ocsinventory-agent.cfg y seteamos:

server=ourserver.com

Instalación y configuración de GLPI

Se generarán dos usuarios MySQL, el primero llamado glpi para el usado de la aplicación GLPI, y un segundo, synchro, que será usado para el proceso de sincronización OCS<->GLPI

Accederemos como root en MySQL y ejecutaremos los siguientes comandos:

# mysql -uroot -p
mysql> CREATE USER 'glpi'@'%' IDENTIFIED BY 'glpisecret';
mysql> GRANT USAGE ON *.* TO 'glpi'@'%' IDENTIFIED BY 'glpisecret';
mysql> CREATE DATABASE IF NOT EXISTS `glpi` ;
mysql> GRANT ALL PRIVILEGES ON `glpi`.* TO 'glpi'@'%';
mysql> CREATE USER 'synchro'@'%' IDENTIFIED BY 'syncsecret';
mysql> GRANT USAGE ON *.* TO 'synchro'@'%' IDENTIFIED BY 'syncsecret';
mysql> GRANT SELECT ON `ocsweb`.* TO 'synchro'@'%';
mysql> GRANT DELETE ON `ocsweb`.`deleted_equiv` TO 'synchro'@'%';
mysql> GRANT UPDATE (`CHECKSUM`) ON `ocsweb`.`hardware` TO 'synchro'@'%';
mysql> FLUSH PRIVILEGES;
mysql> exit

Instalaremos glpi con yum y reiniciamos el servicio httpd:

# yum install glpi
# service httpd reload

Por último, se realiza la creación del schema de la DB y la configuración de la aplicación:

Accederemos a la url http://outserver.com/glpi y seguimos los siguientes pasos:

  1. Seleccionamos el idioma: Español (es_ES)
  2. Aceptamos la licencia GPL
  3. Iniciamos la instalación
  4. Comprobamos que los prerequisitos se cumplen.
  5. Introducimos los parámetros de la conexión a la mysql:
    1. Dirección a la base de datos
    2. Usuario: glpi
    3. Contraseña: glpisecret (o la que hayamos introducido)
  6. Seleccionamos la base de datos glpi
  7. Tomamos nota de los usuarios creados:
  8. Los logins y claves predeterminados son:
    1. glpi/glpi para la cuenta administrador
    2. tech/tech para la cuenta de técnico
    3. normal para la cuenta normal
    4. post-only/post-only para la cuenta postonly
  9. Accedemos con el usuario glpi

Activación y configuración del modo OCSNG:

Una vez identificados dentro de GLPI como administrador, procederemos a configurar la sincronización de OCS->GLPI.

Dentro del Menú, pulsaremos en Setup->General, a continuación pulsaremos en la pestaña Restricciones, y activamos el modo OCSNG, pulsamos en enviar.

Configuramos el servidor:

  • Pulsamos Menu->Configuración->OCSNG mode
  • Seleccionamos el servidor creado durante la instalación: localhost
  • Configuramos el nombre
  • El nombre de la base de datos: ocsweb
  • El usuario de la base de datos: synchro
  • La contraseña del usuario: synchrosecret
  • Pulsamos en enviar.

Deberá devolver un mensaje que indique se ha creado la conexión satisfactoriamente.

A continuación, configuraremos la información que será importada de OCS a GLPI:

  • Monitores : Importación única basada en el serial number
  • Periféricos: Importanción única
  • Impresoras: Importación única
  • Software: Importación única
  • Volúmenes: Sí
  • Utilizar el diccionario de software de OCS: No
  • Registro de Windows: Si
  • Número de elementos a sincronizar usando cron: 0 (usaremos otra solución)
  • Pulsaremos en enviar.

Comprobamos en :

  • Menu->Utilidades->OCSNG
  • Pulsaremos en el enlace “Importación de ordenadores nuevos”

En la lista que aparezca, deberemos poder ver aquellos servidores los cuales tengan instalado y configurado correctamente el agente de OCS. NO los importe, ya que lo realizaremos mediante un modo automático.

Sistema automático de sincronización OCSNG:

Instalaremos el siguiente plugin: Mass import from OCSNG

Nos desconectamos de GLPI e instalamos el plugin:yum install glpi-mass-ocs-import

Conectamos de nuevo a GLPI, y configuramos al plugin.

Clicamos en Configuración->Plugins. Pulsamos en el enlace Instalar. Pulsamos Activar y al final pulsamos en el enlace “Importación masiva desde OCS*”.*

En la siguiente pantalla, seleccionamos el servidor localhost, pulsamos en aceptar y luego habilitamos la sincronización.

January 18, 2010

Fun at work

Posted by otioti

Thanks to Bidatzi, a coworker in Fundacion IAVANTE, I decided to post the 10 best videos of train snow plowing. Normally, in Spain, we don’t have too much snow problems with trains communications, but It’s awesome for me see those machines working hard in snow.

Here, my 10 best videos. Enjoy!

1st Train Snow Plowing (slip)

I call this “the beast“:

2nd Train Snow Plowing Mp 466.5

Or named “the train snow plowing hunter“:

3rd Train Snow Plow Getting Stuck

Or also named “Hello? Anybody is there?”

4th Train Snow Plowing Mp.416.5

Named “I can’t see anything” in honor to “David after dentist

5th Train Snow plowing Mp.435.5

lso named “Good at the beginning, worst at the end

6th Train Snow Plowing 2

I call this “Men, take care with bodywork!

7th Train snowplowing on the Kyle Railroad.

Called, “Why don’t we follow a train?”

8th Snow Plowing Mp.467

9th Train Snow Plow Getting Unstuck part 1 of 5

Also called, “How can we get out here?”

10th Tripleheaded Eggliner Snowplow

I call this “Don’t try it at home”

So, I recognized two reflections:

  • Southern Pacific Rules!
  • I’ll die, and I’ll never see a train plowing in Spain as USA. So, I have to visit there 🙂

January 7, 2010

Gentoo, Linux

Posted by otioti

Clonezilla is for me the best cloning HD opensource project I know. It’s similar to Norton Ghost, but Clonezilla is free. We could use clonezilla two ways: Clonezilla LiveCD y Clonezilla Server Edition.

Clonezilla LiveCD let us create image partitions or whole hard disk and save it on another directory using Samba, ssh or nfs. Also, we could clone from disk to disk.

Clonezilla LiveCD let us install Clonezilla as a service in our network. Problem? Clonezilla only works on Debian, CentOS, Fedora, Red Hat or Ubuntu. Gentoo not supported. And i don’t want to reinstall my server-router-firewall 🙂

So, my idea is install a TFTP service in that server, copy kernel, initrd and filesystem images from LiveCD to tftp directory and configure a PXE service using TFTP

Ok, let’s go. First, download Clonezilla LiveCD: http://clonezilla.org/download/sourceforge/

Mount ISO:

mount -o loop /home/user/clonezilla-livecd.iso /mnt/cdrom

We need to install DHCP and TFTP Services:

 # emerge -v dhcp tftp-hpa syslinux

Next, we’ve cofigure DHCP server:

authoritative;
default-lease-time 600;
max-lease-time 7200;
ddns-update-style interim;
allow booting;
allow bootp;
option domain-name "yourcompany.net";
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option domain-name-servers 192.168.1.1;
option routers 192.168.1.1;
subnet 192.168.1.0 netmask 255.255.255.0 {
   range 192.168.1.100 192.168.1.200;
   option broadcast-address        192.168.1.255;
   option netbios-name-servers     192.168.1.10;
   option routers                  192.168.1.1;
   # For bootp - pxe clients
   range dynamic-bootp 192.168.1.201 192.168.1.230;
   next-server 192.168.1.1;
   filename "/pxelinux.0";
}

For example, i configured my dhcp service next way:

  1. All my clients get dynamic IP from 192.168.1.100 to 192.168.1.200
  2. My gateway will be the same server, 192.168.1.1
  3. Configure PXE:
    1. range dynamic-bootp: We’ll give from 192.168.1.201 to 192.168.1.230 for all PXE clients.
    2. next-server: IP of server which have kernel images and tftp service, router
    3. filename: Path to PXE Loader, / by default.

Next, let’s configure tftpd service. First, edit /etc/conf.d/in.tftpd:

# /etc/init.d/in.tftpd

# Path to server files from
# Depending on your application you may have to change this.
# This is commented out to force you to look at the file!
INTFTPD_PATH="/images"
INTFTPD_USER="nobody"

# For more options, see in.tftpd(8)
# -R 4096:32767 solves problems with ARC firmware, and obsoletes
# the /proc/sys/net/ipv4/ip_local_port_range hack.
# -s causes $INTFTPD_PATH to be the root of the TFTP tree.
# -l is passed by the init script in addition to these options.
INTFTPD_OPTS="-u ${INTFTPD_USER} -l -vvvvvv -p -c -s ${INTFTPD_PATH}"

Next, create /images directory:

mkdir -p /images

So next, copy pxelinux.0 loader from syslinux package.

cp  /usr/lib/syslinux/pxelinux.0 /images/

Create /images/pxelinux.cfg directory.

mkdir /images/pxelinux.cfg
chown nobody:nobody /images

Edit default configuration to load kernel and parameters. We could copy file from Clonezilla LiveCD, /isolinux/isolinux.cfg, but next you’ll see a simple configuration example, and it’s OK for starting:

vim /images/boot/pxelinux.cfg/default
default local
timeout 70
prompt 0
noescape 1
MENU MARGIN 5
MENU BACKGROUND bg.png

# Set the color for unselected menu item and timout message
MENU COLOR UNSEL 7;32;41 #c0000090 #00000000
MENU COLOR TIMEOUT_MSG 7;32;41 #c0000090 #00000000
MENU COLOR TIMEOUT 7;32;41 #c0000090 #00000000
MENU COLOR HELP 7;32;41 #c0000090 #00000000

say **********************************************
say Welcome to Clonezilla.
say www.yourcompany.net
say **********************************************

# Do NOT allow client to edit the parameters
#ALLOWOPTIONS 0

# simple menu title
MENU TITLE YOUR_COMPANY_NAME (http://www.yourcompany.net)

label clonezilla
  MENU DEFAULT
  MENU LABEL Clonezilla live

  kernel vmlinuz
  append initrd=initrd.img boot=live union=aufs fetch=tftp://tftp_server_ip/filesystem.squashfs vga=791 noswap noprompt ocs_lang=en_US.UTF-8 ocs_live_keymap=NONE

label local
  # MENU DEFAULT
  MENU HIDE
  MENU LABEL Local operating system (if available)
  # MENU PASSWD
  # 2 method to boot local device:
  # (1) For localboot 0, it is decided by boot order in BIOS, so uncomment the follow 1 line if you want this method:
  # localboot 0
  # (2) For chain.c32, you can assign the boot device.
  # Ref: extlinux.doc from syslinux
  # Syntax: APPEND [hd|fd] []
  # [] is optional.
  # Ex:
  # Second partition (2) on the first hard disk (hd0);
  # Linux would *typically* call this /dev/hda2 or /dev/sda2, then it's "APPEND hd0 2"
  #
  kernel chain.c32
  append hd0
  TEXT HELP
  Boot local OS from first hard disk if it's available
  ENDTEXT

Next, we need copy kernel, initramfs filesystem images from LiveCD to /images/ on our server:

  cp /mnt/cdrom/live/vmlinuz /images/vmlinuz
  cp /mnt/cdrom/live/initrd.img /images/initrd.img
  cp /mnt/cdrom/live/filesystem.squashfs /images/filesystem.squashfs

Last, run services:

  /etc/init.d/in.tftp start
  /etc/init.d/dhcp start
  rc-update add in.tftp default
  rc-update add dhcp default

December 25, 2009

Travels

Posted by otioti

This summer, some friends and me are going to travel to USA. First of all, i designed a trip from Chicago to L.A. to run old 66 Route, for a month, but it’s too expensive for my friends (bastards!). Well, i had to redesign new route and new period. From 31st July to 14th August, we will be travelling from north of USA (Vancouver, Canada) to south, San Diego in CA.


View larger map

I’ll thank if anybody could recommend any interesting place on the road. Just now, i have 10 places i must to visit.

More or less, i think i’ll spend in each city (14 days):

  • Vacouver: 2 days
  • Seattle: 2 days
  • 1 day road to San Francisco
  • San Francisco: 4 days
  • Yosemite, road to L.A.
  • Los Angeles: 3 days
  • Las Vegas: 1 day
  • San Diego: 1 day

We’ll arrive to Vancouver and stay two days there. Then, we’ll take a ferry to Seattle. I suppose we’ll rent a Pontiac G6 and drive to south.

Planning trip mode 🙂

December 11, 2009

Fun at work, MacOSX

Posted by otioti

First, i’m sorry for the title, but…

  • Have you ever had a coworker that deleted a directory or some files of a server?
  • Have you ever had to reinstall a MaOSX Server caused of deleted files?

Well, that happened to me. Yesterday a coworker deleted /usr/bin folder content of MacOSX Server. I tried to copy files from my own Macbook… No! Failure!

Well, today, i waked up because of i had a dream repairing this problem. Has it ever happened to you?

Ok, let’s understood how can we recover those files. The shopping list is:

  • MacOSX Server Installation DVD
  • Pacifist: http://www.charlessoft.com/
  • Macbook or other kind of computer with Mac OS
  • 30 minutes

Install Pacifist, open Apple Install Disc, and search next packages:

  • BSD.pkg
  • BaseSystem.pkg

Inside them we’ll find /usr/bin folders. Just extract them to a directory on your Mac.

But, there is another problem, if we copy files using scp, we won’t copy them because of server doesn’t have /usr/bin/scp.

Ok, let’s copy scp to a http server and then download the file using Safari.

Copy it to /usr/bin and now, we could copy all files using scp.

Funny 😉

HPIM0841

October 16, 2009

Travels, Uncategorized

Posted by otioti

Toronto guarda todo el encanto de ser una ciudad cosmopolita, pero eso no quita que tenga una de las mejores Universidades del norteamérica. A pocos bloques de Spadina & Queen Street empezamos a ver los primeros puestos del barrio chino de Toronto. Se encuentra emplazado en una gran avenida llamada Spadina Ave. A ambos lados de la avenida encontramos edificios de 2 o 3 plantas, en la que siempre, en la planta baja, encontramos un negocio regentado por un chino.

HPIM0841

En estos puestos encontraremos, a parte de un largo surtido en alimentación (cosas que en mi vida había visto), gran variedad de fruta, que además es bastante asequible y sabrosa. Recuerdo que compré tres cajas de fruta, de 500 gramos cada una, dos de frambuesas y otra de fresas por unos $5 (3 €). Como véis en la foto, las especias es lo que más abundaba.

HPIM0843

HPIM0849

Si continuamos caminando, casi llegando a Spadina & College ya podemos observar la torreo del edificio principal de la universidad de Toronto. Aunque Toronto es una ciudad que a mi parecer está bien comunicada, pero para mí es un placer recorrermela andando. Podéis ver en la foto siguiente que dos StreetCars (Tranvías de toda la vida) recorren Spadina de norte a sur y College Street de oeste a este.

HPIM0856

HPIM0857

Me gustan los Streetcars, encuentras gente peculiar dentro de ellos, y sobre todo, algo que veo más importante, sobre todo para la gente que reside allí, ves la calle, el sol, etc. En el metro es dificil ver el exterior, aunque hay algunas zonas en las que el metro sale a la superficie.

Si continuamos caminando, llegaremos al campus universitario de Toronto. El primer edificio que encontraremos es el Spadina Crescent, donde se ubican laboratorios farmaceuticos. El pasado 10 de septiembre, una mujer murió en su interior, cayendo desde un tercer piso. Estaba buscando fantasmas (Ghost Hunting) 🙂 http://www.webcitation.org/5jjoK3crS

HPIM0864

A partir de este edificio, entraremos en el campus St. George de Downtown. Encontraréis un mapa bastante completo en http://rrs.osm.utoronto.ca/map/f?p=110:1:6846887126194618489

El campus está rodeados de casas unifamiliares al más puro estilo norteamericano. Los callejones entre cada vivienda estaban completamente accesibles, uno podía acceder, saludar al vecino, sorprendente.

HPIM0877

Y lo mejor de ese día, fue encontrar una franquicia de budget cerca. Nos acercamos porque nos llamó la atención dos coches que tenía aparcado en la puerta. Contemplad vosotros mismos 🙂

HPIM0891

Alquilar el V5, solo costaba $145 canadienses por día, alrededor de unos 90-100€, un gustazo por el bajo costo que tiene. Incluye el seguro para el conductor, y creo recordar que por cada acompañante, el seguro subía unos $20 0 $30 ( 12-18€ ). Intentamos alquilar uno para visitar Niagara Falls, pero tendréis que preveer:

  • Que tenéis más de 25 años
  • Disponibilidad para la fecha que queréis alquilarlo: son coches muy golosos, y los fines de semana se rifan 🙂
  • Os recomendaría comunicaros con la franquicia antes de salir de España, ya que os pueden pedir alguna autorización de tráfico. En mi caso, cuando intenté alquilar el coche en Zipcar.com, que por cierto es un servicio de car sharing bastante bueno y creo que es España no funcionaría lamentablemente, me pedía un certificado de la Dirección General de Tráfico de España certificando que no he perdido mis 12 puntos del carnet y que si los he perdido, por qué. Pero aún no acaba todo, tendréis que llevarlo a un notario que lo traduzca al inglés y certifique el documento.

HPIM0890

Imagen 4

September 23, 2009

Uncategorized

Posted by otioti

He entrado ahoramismo  en monopolycitystreets.com y volvemos a tener problemas :-S

Imagen 4

Imagen 1

September 17, 2009

Uncategorized

Posted by otioti

Monopoly

Uso de cookies

Este sitio web utiliza cookies para que usted tenga la mejor experiencia de usuario. Si continúa navegando está dando su consentimiento para la aceptación de las mencionadas cookies y la aceptación de nuestra política de cookies, pinche el enlace para mayor información. ACEPTAR

Aviso de cookies