Pruebas con FOG

De Portfolio Academico

Vamos a realizar pruebas para instalar y mantener un entorno con FOG.

FOG es una herramienta que nos permite cargar y guardar imagenes de discos desde una ubicacion en red, haciendo uso de la funcionalidad PXE, que hace que nuestro ordenador pueda arrancar en red.

El entorno que vamos a preparar es un entorno totalmente virtual, donde no usaremos ninguna maquina real para la prueba. La maquina virtual que alojará el FOG será un Debian 7, e instalaremos FOG 1.2. Utilizaremos una maquina ya creada con Windows XP para realizar la primera imagen y varias maquinas mas para volcar esa imagen.

Para instalar FOG en la maquina con Debian, seguiremos estos pasos:

cd /opt/

http://downloads.sourceforge.net/project/freeghost/FOG/fog_0.32/fog_0.32.tar.gz
tar -xvzf fog_0.32.tar.gz
cd fog_0.32/bin/
./installfog.sh 
nano /etc/php5/apache2/php.ini

You will be prompted for the Linux distro you are installing, enter 2 and press enter. You will be prompted for the installation mode, either N (Normal Server) or S(Storage Server). If you are not sure which option to select, use N for Normal Installation. (Version 0.24 and up) The installer will ask you for the IP address of the server, then press enter. The installer will ask if you would like to enter a router address for DHCP, if you would like to press y and press enter, then enter the address, then press enter. The installer will ask if you would like to enter a DNS address for DHCP and the boot image, if you would like to press y and press enter, then enter the address, then press enter. You would then be prompted if you would like to change the default interface from eth0, if you would like press y, press enter and add the interface (if you are unsure, select n). Would you like to use the FOG server for dhcp service? [Y/n]

DHCP will not be setup but you must setup your

current DHCP server to use FOG for pxe services.

On a Linux DHCP server you must set:

next-server

On a Windows DHCP server you must set:

option 066 & 067

FOG now has everything it needs to setup your server, but please understand that this script will overwrite any setting you may have setup for services like DHCP, apache, pxe, tftp, and NFS.

It is not recommended that you install this on a production system as this script modifies many of your system settings.

This script should be run by the root user on Fedora, or with sudo on Ubuntu.

Here are the settings FOG will use:

       Distro: Ubuntu
       Server IP Address: 192.168.0.150
       DHCP router Address: 192.168.0.1
       DHCP DNS Address: 192.168.0.150
       Interface: eth0
       Using FOG DHCP: 0

Are you sure you wish to continue (Y/N) Y Installf9.jpg During the installation you may be prompted to set a MySQL root password, leave this blank unless you wish to edit the FOG config.php files before the next step (by using sudo vi in the terminal, see file locations below). /opt/fog/service/etc/config.php and /var/www/fog/commons/config.php Both of these have to be edited with the MySQL password if you set one, for Fog to function properly. Also, add root under MYSQL_USERNAME if it is missing. Look for the message: Setup complete! If this message is not displayed, the script has failed before all configurations were written. Fix any problems and re-run the script until it completes successfully. After the installation has completed open Firefox again and enter the URL: http://[youripaddress]/fog/management. You will then be prompted to install the database schema. Click on the Install/Update Now button. I had to run **chown -R fog:root /images** Update: In recent versions of Debian Squeeze (tested on 6.0.4) you must change the TFTP_DIRECTORY path located in /etc/default/tftpd-hpa from "/srv/tftp" to "/tftpboot", or you can just symlink /tftpboot to /srv/tftp. If you don't your client computers will fail to PXE boot because they will not be able to find pxelinux.0!