How to Install GeoIP on CentOS Server with CPanel

First of all you need root login, than you need to install GeoIP for your CentOS server, let me show you how you can do that:

Install Epel repo – Go to https://fedoraproject.org/wiki/EPEL and pick .rpm package for your system, if you have CentOS 6.x you can use epel-release-6-8.noarch.rpm

wget http://mirror.pmf.kg.ac.rs/fedora/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -i epel-release-6-8.noarch.rpm.

After that you can use yum to install GeoIP –

yum install GeoIP GeoIP-devel

Ok so when you install GeoIP you have to install a custom mod for cpanel.

wget http://skyrider.biz/modules/custom_opt_mod-mod_geoip.tar.gz
tar -C /var/cpanel/easy/apache/custom_opt_mods -xzf custom_opt_mod-mod_geoip.tar.gz

And you are done. Next step is to log in to your WHM and go to EasyApache, and pick mod_geoip on your module list, you are all set.

 geoip