- Requirements for compiling AFD AFD only works with UNIX or MacOS (the newer ones based on Unix). AFD has been run successful under the following Unix flavors: Linux, Solaris, HP-UX, Irix, Aix, FTX and SCO One can compile AFD under Windows with the help of cygwin, but it does not run. Since AFD is written in C it needs a C compiler with all the headers. Here follows what needs to be done for the different Linux distributions to get AFD compiled with graphical user interface: Ubuntu: ======= sudo apt-get install gcc make libmotif-dev libssl-dev libx11-dev libxt-dev libxpm-dev libxaw7-dev RedHat/CentOS/Scientific Linux: =============================== su - yum install gcc openmotif-devel openssl-devel libXaw-devel libXpm-devel Fedora: ======= su - yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm yum install gcc openmotif-devel openssl-devel libXaw-devel libXpm-devel SuSE: ===== su - zypper install gcc make openmotif-devel libopenssl-devel MacOS ===== For gcc download and install the Apple development environment https://developer.apple.com/xcode/. In XCode, install the optional components "command line tools" from the "Downloads" preference pane, then gcc is available on the Mac. For X11 install XQuartz http://xquartz.macosforge.org/landing/ - Possible configuration Parameters Before one wants to compile AFD one needs to configure it. This can be done via the configure script in the AFD source directory src. If one calls ./configure with the parameter --help it list all possible parameters. Here follows a list of the most important parameters: --prefix= The directory where you wish to install AFD Default will be /usr/local. --enable-ssl Enabling this will add HTTPS and FTPS support, TLS/SSL support for HTTP and FTP. --with-gui=none If you do not need the graphical user interface or you do not manage to compile AFD because of the GUI. --enable-afd_mon This compiles the AFD monitor, the program to monitor other AFD's. --enable-compiler-debug This will compile AFD with debug information. It will be useful if there is a bug and AFD crashes and creates core files (coredumps). It will then give the programmer more information where the error is. There are also many configure parameters that allows one to disable certain features of AFD: --disable-http_support --disable-smtp_support --disable-sftp_support --disable-ftp_support --disable-wmo_support --disable-loc_support --disable-input_log --disable-distribution_log --disable-production_log --disable-output_log --disable-delete_log A full list and description of each configure parameters can be found in the file README.configure that comes with the tar file of AFD. There are a lot more options to configure AFD when one changes the C header files in AFD source code. The two most important ones are src/afdsetup.h and src/init_afd/afddefs.h. If you do any changes here you most likely need to reinitialize the internal database. - Creating RPM Big advantage of having AFD as an RPM is that it does nearly everything for you when you upgrade to a newer version (stop AFD before the update and then start it again, removes any unneeded binaries). It also provides and installs all necessary boot scripts. Providing you have all the tools to generate an RPM, it is actually very easy to create one. After issuing the configure command above, one just needs to issue the following command: make rpm Or you can build it from the source RPM (SRPM). The command to do this under root on a Fedora/RedHat/CentOS/Scientific Linux are: rpm -Uvh afd-1.4.4-6.el6.src.rpm rpmbuild -ba /usr/src/redhat/SPECS/afd.spec - Exercise Build and install AFD from source. cd tar xf /usr/local/src/afd-1.4.5-0.3.beta.tar cd afd-1.4.5-0.3.beta ./configure --prefix=$HOME --enable-ssl --enable-afd_mon make make install