Posts tagged How to install and configure Geoip

How to install and configure Geoip

You can  install Geoip via /scripts/easyapache on a  cPanel server.

On other servers you can  try  :

pecl install geoip

or

cd /usr/local/src
 wget http://pecl.php.net/get/geoip
tar zxvf geoip
 cd geoip-1.0.7
phpize
  ./configure
  make
  make check
  make install

 

Once Geoip is installed then  install geoip database from  here :

http://geolite.maxmind.com/download/geoip/api/c/GeoIP.tar.gz
cd /opt/geoip/share/GeoIP

wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP.tar.gz

gunzip GeoLiteCity.dat.gz
cp -p  GeoLiteCity.dat GeoIPCity.dat

That’s all you are done.