install mod_geoip on cpanel centos

Started on the old forum in June 2010 · view the original in the archive · old links redirect here

No replies · 2,595 views · started 16 years ago · 1 min read

GumSlone Administrator Principal · 1,690 posts #1

Copypasted from : Installing mod_geoip on Apache 2.2 | Say GNU/Linux

  1. Downalod the latets GEOIP package from Index of /download/geoip/api/c and install it
# wget -c  http://geolite.maxmind.com/download/geoip/api/c/GeoIP-1.4.6.tar.gz
# tar -xzf GeoIP-1.4.6.tar.gz
# cd GeoIP-1.4.6/
# ./configure
# make
# make install
  1. Download and install latest mod_geoip2 from Index of /download/geoip/api/mod_geoip2
# wget -c  http://geolite.maxmind.com/download/geoip/api/mod_geoip2/mod_geoip2_1.2.5.tar.gz
# tar -xzf  mod_geoip2_1.2.5.tar.gz
# cd mod_geoip2_1.2.5/
# /usr/local/apache/bin/apxs -lGeoIP  -cia mod_geoip.c

if you get error while restarting httpd conf, try this line:

 apxs -i -a -L/usr/local/lib -I/usr/local/include -lGeoIP -c mod_geoip.c
  1. Restart apache

OR

wget http://twiki.cpanel.net/twiki/pub/EasyApache3/CustomMods/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 then run easy apache update from whm and chose the mod_geoip option.

after all you need to enable mod_geoip

nano /usr/local/apache/conf/httpd.conf

and add this to it:

GeoIPEnable On
GeoIPDBFile "/path_to_geoipdat_file/GeoIP.dat"

Advertise your mobile site for FREE with AdTwirl

External image (may be gone)

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close