To install mod_geoip, we simply run:

yum install mod_geoip

You will then find the GeoIP database (GeoIP.dat) in the /usr/share/GeoIP directory. As the geographic allocation of IP addresses can change over time, it’s a good idea to download the newest GeoIP.dat now:

cd /usr/share/GeoIP/
mv GeoIP.dat GeoIP.dat_orig
gunzip GeoIP.dat.gz

Next we restart Apache:

/etc/init.d/httpd restart

That’s it already!

Post By Editor (2,827 Posts)

Website: →