Installation requirements for compilation
# yum install httpd-devel apr apr-devel libtool
Download latest mod_fastcgi source code
# cd /opt
# wget http://www.fastcgi.com/dist/mod_fastcgi-current.tar.gz
Untar the package.
# tar -xvzf mod_fastcgi-current.tar.gz
Install the module. You can find the installation guide on the INSTALL.AP2 file. We have to specify top_dir in the make and make install commands because we install apache2/httpd using yum
# cd mod_fastcgi-2.4.6
# cp Makefile.AP2 Makefile
# make top_dir=/usr/lib/httpd
# make install top_dir=/usr/lib/httpd
(IF there is error you can use the command
apxs -n mod_fastcgi -i -a -c mod_fastcgi.c fcgi_buf.c fcgi_config.c fcgi_pm.c fcgi_protocol.c fcgi_util.c)
Add “LoadModule fastcgi_module modules/mod_fastcgi.so” to /etc/httpd/conf/httpd.conf to tell apache to load the new module
Restart apache
# /etc/init.d/httpd restart