1. Install requirements for compilation
# yum install httpd-devel apr apr-devel libtool
2. Download latest mod_fastcgi source code
# cd /opt
# wget http://www.fastcgi.com/dist/mod_fastcgi-current.tar.gz
3. Untar the package.
# tar -xvzf mod_fastcgi-current.tar.gz
4. 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
5. Add "LoadModule fastcgi_module modules/mod_fastcgi.so" to /etc/httpd/conf/httpd.conf to tell apache to load the new module
6. Restart apache
# /etc/init.d/httpd restart
7. You can assure that the mod is loaded by apache2, by looking at /var/log/httpd/error_log
# grep -i "FastCGI" /var/log/httpd/error_log
[Wed Aug 11 12:26:27 2010] [notice] FastCGI: process manager initialized (pid 8853)
That's all :)
Great instructions - clear and worked first time. Thanks!
ReplyDeleteVery good job.. it´s worked fine.
ReplyDeletethanks a lot.
Don't forget if your using a 64bit OS then you will need to install it in /lib64/ ..
ReplyDeleteEasier instructions:
ReplyDeletePlease follow steps 1-7 in the following procedure.
Make sure that the following are installed:
Apache Development package (httpd-devel)
Apache Portable Runtime (apr)
Apache Portable Runtime Development package (apr-devel)
Apache Portable Runtime Utilities package (apr-util)
GNU Build toolchain (make, ld, ar, gcc, etc.)
Download the most recent mod_fcgid source from the Apache Foundation:
http://httpd.apache.org/download.cgi#mod_fcgid
In a shell window, unpack the tarball and change directory to the unpack directory (should be named mod_fcgid-x.x.x, example: mod_fcgid-2.3.6).
Run:
./configure.apxs
Run:
make
Run:
make install
The 'make install' inserts a line into the httpd.conf file to load the newly built module:
LoadModule fcgid_module modules/mod_fcgid.so
Thank you so much for this wonderful post. It works great. Clear, and very Straight forward instructions.
ReplyDelete-bash: ./configure.apxs: No such file or directory
ReplyDeleteand on main instructions:
mod_fastcgi-2.4.6]# make top_dir=/usr/lib/httpd
Makefile:12: /usr/lib/httpd/build/special.mk: No such file or directory
make: *** No rule to make target `/usr/lib/httpd/build/special.mk'. Stop.
Very clear and precise, works even after 3 years ! I was able to create a puppet script in 30 mins. for mod_fastcgi because of your clear instructions
ReplyDeleteThanks buddy.
ReplyDeleteWorks nice with Centos 6.4