Now we use the apxs (Apache Extension Tool) to build our extension modules for Apache:

1

apxs-i-a-L/usr/local/lib-I/usr/local/include-lGeoIP-cmod_geoip.c

If you haven’t got apxs then you’ll need to install httpd-devel.

Be aware that this overwrites httpd so backup your server in case this fails or you get strange results.

1

yum install httpd-devel

If this fails with “Error: Nothing to do”, then it’s fairly common. You’ll probably find that /etc/yum.conf is blocking the installation. We can get around this by either editing the configuration file or typing: