Install GeoIP on servers running Directadmin

This tutorial is specific to Directadmin servers. Having said that, with minimal changes will work on most of the web servers. I'll try to provide generic installation instructions as much as possible.

Download latest geoip package:
lynx http://pecl.php.net/get/geoip

Unzip the file and start compilation after installing some requirements (example on a Debian server)

apt-get install libgeoip-dev libgeoip1 geoip-database geoip-bin
tar xzvf geoip-1.0.7.tgz
cd geoip-1.0.7
phpize
./configure
make
make install

Edit php.ini and insert the new module:
vi /usr/local/lib/php.ini

Search for extension_dir and be sure that the geoip.so is located there and then add the following line:
extension=geoip.so


That's all! Restart Apache and open a page with the following to test it.

Posted on: 05/05/2011








0 Comments
If you want to leave a comment please Login or Register