Acerca de Linux, BSD y notas personales

Archives for February, 2008

Installing Xen On CentOS 5.0 (i386)

http://www.howtoforge.com/centos_5.0_xen

xm list

virt-install

xm console vm01

after the installation, we stay at the vm01 console. To leave it, type CTRL+] if you are at the console, or CTRL+5 if you’re using PuTTY. You will then be back at the dom0 console.

xm shutdown vm01

To start vm01 again, run:
xm create /etc/xen/vm01

Autostart Virtual Machine:
ln -s /etc/xen/vm01 /etc/xen/auto

Here are the most important Xen commands:

xm create -c /path/to/config - Start a virtual machine.
xm shutdown <name> - Stop a virtual machine.
xm destroy <name> - Stop a virtual machine immediately without shutting it down. It’s as if you switch off the power button.
xm list - List all running systems.
xm console <name> - Log in on a virtual machine.
xm help - List of all commands.

xen tricks
http://www.softwarefreedom.org/technology/blog/2007/aug/24/more-xen/

nx error i386_x86

nxserver needs libXcomposite.so.1

solution:

sudo yum install libXcomposite

epel x86_64 repository

su -c ‘rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-2.noarch.rpm’
yum -y install foo

http://fedoraproject.org/wiki/EPEL/

http://download.fedora.redhat.com/pub/epel/5/x86_64/repoview/

OpenVZ VPS

We recommend OpenVZ VPS hosting for the speed and stability it consistently provides.

The OpenVZ platform is the logical choice for most virtual private server hosting needs. OpenVZ uses fewer resources than Xen, and its interface limitations are not especially relevant to the vast majority of virtual private server administrators.

Xen VPS hosting

We recommend Xen VPS hosting for the flexibility it can provide when situations which require more memory arise.

The Xen platform should be considered if you plan to use your VPS hosting to complete one-off tasks which have a high memory overhead like Java development, compiling applications, and encoding video.

Xen is not an appropriate choice if you plan to rely heavily on swap space instead of acquiring enough RAM for day-to-day operations - while Xen would appear to be a cost-saver at first glance, the performance penalties associated with constant swap space usage will render an overloaded Xen server unusable.

Update: Mark Wilson has gone through this with a more recent version of VMware, and his article is likely to be more useful.Regarding this piece, thanks to Chris Dagdigian for pointing out the need for trusted Xforwarding.

One of the biggest issues with managing VMware Server for me has always been not having a native Mac OS X remote administration client (or a Mac OS X anything, but that’s another story).So, with every release, I kept trying to find a way to both see and control my virtual machine consoles by running vmware-console on the server and forwarding the X display to myMac - which never seemed to work due to various X11 quirks - either the application bombed instantly, or there were masses of debug logging - but never a working remote console.However, after months of virtual head-banging, Chris Dagdigian e-mailed me a note saying that he had got his vmware-console running by using trusted X forwarding, and after a while I had the rest figured out - keyboard mappings and all.The following notes assume you have a Linux-based VMware Server host (running build 22088) and that you can access it over SSH from a Mac with X11 installed.

On The VMware Host

Keyboard detection doesn’t work properly when you’re using X11.app, so you have to go to/usr/lib/vmware/xkeymap and pick a suitable keyboard map (see this for more info).You then have to edit ~/.vmware/preferences to set that keyboard map:

xkeymap.language="pt104"

…and pay attention to the vmware-console output.

On Mac OS X:

Start X11.app, open an xterm and SSH to the VMware Server using trusted X forwarding:

monotith:~ user$ ssh -Y user@vmware Last login: Sun Mar 12 21:42:49 2006 from monolith.internal.taoofmac.com [user@vmware ~]$ vmware-console

And presto, it should appear on your X11 display. There is a very important point that needs stressing, though -

If VMware is unable to detect your keyboard settings, you won’t be able to control guest virtual machines properly - you won’t even be able to see the console.

Hence the importance of setting the keymap properly. You might also want to remember that some key combos are slightly different on the Mac - for instance, Ctrl+Alt to exit a VM is actually Ctrl+Command, etc., etc.Regarding xauth and X11.app in other contexts, some people have noted that xauthusually works for them after issuing the following command in xterm:

xauth generate :0 . trusted

Although I’ve yet to establish a relationship, it seems to have helped me as well.

Recover Root Passwd Centos

1. the first step is to reboot server.2. Since the server i inherit has GRUB, wait until the grub splash screen comes on and hit the letter ‘e’ on your keyboard. this will stop grub.3. hit ‘e’ again and this will take you to another screen4. you should see one of the choices has “kernel” select the one with “kernel5. hit ‘e’ on your keyboard6. type ‘ single’ (make sure to include a space before “single”) and hit enter. then enter ‘b’ to boot.7. your system should boot up in single mode as root8. now that you are logged in single mode you can chage the root password by sending this command:passwd9. after you have changed the root password, reboot server and you should be able to login with the new password.

OpenVPN Centos

http://www.ecualug.org/?q=2007/02/06/comos/centos/c_mo_instalar_y_configurar_openvpn

EPEL repository

yum install openvpn

Aunque OpenVPN es muy sencillo de configurar e instalar, podemos dividir su forma de trabajo en 3 tipos:

1. Host a Host: Es el método más simple, nos permite encriptar la comunicación entre dos PC las cuales deberán solamente tener conexión; es decir: ambas PC deben poderse enviar paquetes directamente ya sea porque estén conectadas en la misma red local, o porque ambas estén conectadas a la internet y sean alcanzables entre sí.

2. Road Warrior: Es una de las formas más utilizadas y solicitadas por los estudiantes. Es el permitir que una máquina de alguien que esté fuera de nuestra red (de forma temporal o permanente) pueda comunicarse con el servidor OpenVPN de nuestra red y una vez autenticado pueda entrar a ver y acceder los recursos de nuestra red local. En verdad es un caso especial de la conexión Red a Red que a continuación mencionamos:

3. Red a Red: Uno de los métodos más usados. Mediante ésta forma dos redes separadas en el espacio pueden comunicarse como si estuvieran unidas por un cable virtual (de ahi la V de VPN); la comunicación entre ambas redes viajará encriptada una vez salgan de los servidores de openvpn y hasta que lleguen a su otro extremo.

 

 

mandar mail consola

> mutt -a file1 -s "subject" destino en domain.com < /dev/null

Bacula Install

Si tenemos nuestra base de datos lista ya podemos instalar en la máquina que realizará los backups los siguientes paquetes:

 bacula director
- bacula storage daemon
- bacula file daemon (bacula-client)
- bacula console (para administracion, pero esto tambien se puede hacer
remotamente)

Maquina para respaldar MySQL en localhost ( Server 1 )
# yum install bacula-director-mysql

Maquina para respaldar Archivos en localhost ( Server 1 )
# yum install bacula-client

Unidad de Almacenamiento ( Server 2 Storage )
# yum install bacula-storage-common bacula-console

Configuración

http://crysol.inf-cr.uclm.es/node/400

Configuración Director

http://crysol.inf-cr.uclm.es/node/549

Tutorial
http://www.bacula.org/en/dev-manual/Brief_Tutorial.html

EPEL 5 Repository Requerido

http://crysol.inf-cr.uclm.es/node/400

Bacula es un programa para hacer copias de seguridad de una máquina… pues no del todo: bacula es una colección de demonios que cooperan entre sí para realizar copias de respaldo de los archivos necesarios, sean de la máquina que sea. Para interactuar con bacula se necesita un elemento más: la consola de bacula. Todos estos elementos son independientes entre sí y pueden estar en máquinas distintas, así pues el principal problema a la hora de configurar bacula consiste en hacer que todos estos elementos se comuniquen correctamente entre ellos.

Los elementos necesarios para que bacula funcione son:

  • bacula-dir (o bacula-director)
  • bacula-sd (o bacula-storage daemon)
  • bacula-fd (o bacula-file daemon)

Si, como es de suponer, queremos poder interactuar con el servicio de backup, necesitaremos:

  • bacula-console (disponible en varios sabores:gnome y wx)

 

Read more… »