There are many ways to install mod_geoip in the web but the easiest way to compile it with cPanel server is to compile it through the easyapache.
To get it done, run the following command as root,
cd /var/cpanel/easy/apache/custom_opt_mods/ wget http://docs.cpanel.net/twiki/pub/EasyApache3/CustomMods/custom_opt_mod-mod_geoip.tar.gz tar -zxf custom_opt_mod-mod_geoip.tar.gz
Next compile it with easyapache,
Then select the Mod_GeoIP in the Short Options List.