FOG Project Installation (version 0.30) on CentOS 5
1. What is Fog?
Taken from http://www.fogproject.org/?q=node/1
FOG is a Linux-based, free and open source computer imaging solution for Windows XP, Vista and 7 that ties together a few open-source tools with a php-based web interface. FOG doesn't use any boot disks, or CDs; everything is done via TFTP and PXE. Also with fog many drivers are built into the kernel, so you don't really need to worry about drivers (unless there isn't a linux kernel driver for it). FOG also supports putting an image that came from a computer with a 80GB partition onto a machine with a 40GB hard drive as long as the data is less than 40GB. Fog also includes a graphical Windows service that is used to change the hostname of the PC, restart the computer if a task is created for it, and auto import hosts into the FOG database. The service also installs printers, and does simple snap-ins.
2. FOG on CentOS 5.X
Download the FOG 0.30 source (http://sourceforge.net/projects/freeghost/files/) and also download the current RPM Forge (http://packages.sw.be/rpmforge-release/), for ease save both files to the Desktop. For FOG to install successfully under CentOS we need to first make a few changes which are outlined here (http://www.fogproject.org/wiki/index.php?title=Installation_on_CentOS_5.3#Installing_0.29_and_0.30)
First install the RPMforge package outlined here (Installing RPMforge)
Next we need to edit the installer script for FOG located in fog_0.30/lib/redhat/config.sh
Edit line 22 we need to remove 'php-gettext' and change 'clam-update' to 'clamav' Edit line 63 to read 'freshDB="var/clamav/"; Edit line 66 to read 'freshcron="/usr/sbin/freshclam"
Once that has been done, save and exit.
Now we can begin the installation (we will assume the FOG installation folder is located on the current users desktop), open up a terminal and type
$ cd Desktop $ cd fog_0.30 $ cd bin $ ./installfog.sh
You should now see the installer begin
Version: 0.30 Installer/Updater What version of Linux would you like to run the installation for? 1) Redhat Based Linux (Fedora, CentOS) 2) Ubuntu Based Linux (Kubuntu, Edubuntu)
For this we need to select  for a CentOS installation
Staring Redhat Installation. FOG Server installation modes: * Normal Server: (Choice N) This is the typical installation type and will install all FOG components for you on this machine. Pick this option if you are unsure what to pick. * Storage Node: (Choice S) This install mode will only install the software required to make this server act as a node in a storage group More information: http://www.fogproject.org/wiki/index.php?title=InstallationModes What type of installation would you like to do?
At this prompt you should choose to do a Normal [N] install
What is the IP address to be used by this FOG Server? [XXX.XXX.XXX.XX3]
This will automatically pick up your IP address for eth0 (either static or from your DHCP) we will need to forward PXE traffic to this address later
Would you like to setup a router address for the DHCP server? [Y/n]
Choose [Y] for this
What is the IP address to be used for the router on the DHCP server? [XXX.XXX.XXX.XX4]
This will automatically pick-up your route, if not you can specify now what it is
Would you like to setup a DNS address for the DHCP server and client boot image? [Y/n]
Choose [Y] for this
What is the IP address to be used for DNS on the DHCP server and client boot image? [XXX.XXX.XXX.2]
This will automatically pick-up your DNS, if not you can specify now what it is
Would you like to change the default network interface from eth0? If you are not sure, select No. [y/N]
If your happy with the default adapter then select [N]
Would you like to use the FOG server for dhcp service? [Y/n]
Choose [N] for this as we will use our existing DHCP server
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
This part is important as your network team will need to forward PXE traffic on your eth0 VLAN to your IP address, on a Linux router they need to specify the "next-server XXX.XXX.XXX.XX3" and filename "pxelinux0"
This version of FOG has internationalization support, would you like to install the additional language packs? [Y/n]
Install language support if needed
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: Redhat Installation Type: Normal Server Server IP Address: XXX.XXX.XXX.XX3 DHCP router Address: XXX.XXX.XXX.XX4 DHCP DNS Address: XXX.XXX.XXX.2 Interface: eth0 Using FOG DHCP: 0 Internationalization: 0 Are you sure you wish to continue (Y/N)
Confirming [Y] will now begin the installation
This will now install the FOG web service, TFTP, mysql etc if not already installed. Once installation is completed you will be asked whether to notify the FOG project of the successful install.
Finally we need to set the following 4 commands for iptables off etc
$ service iptables stop $ service ip6tables stop $ chkconfig iptables off $ chkconfig ip6tables off
Now you can navigate to http://XXX.XXX.XXX.XX3/fog/ and log in with the default user name of "fog" with password "password". For security purposes delete this account immediately and create a new one.
Some of the changes made to your server are
Services /etc/init.d/FOGImageReplicator /etc/init.d/FOGMulticastManager /etc/init.d/FOGScheduler Created Databases in mysql fog Creates Directorys /var/www/fog /opt/fog /tftpboot /images Creates System User fog (with random generated password)