install geoip php centos

January 11, 2013

To install geoip php centos follow these steps

Install Steps

# cd /tmp
# wget http://pecl.php.net/get/geoip-1.0.8.tgz
# tar -zxvf geoip-1.0.8.tgz
# cd geoip-1.0.8.tgz
# phpize
# ./configure
# make
# make install

# echo "extension=geoip.so" >> /etc/php.d/geo.ini

Verify Installation

# php -r 'print_r(phpinfo());' | grep -i geoip
geoip
geoip support => enabled
geoip extension version => 1.0.8
geoip library version => 1004005
geoip.custom_directory => no value => no value
OLDPWD => /tmp/geoip-1.0.6
_SERVER["OLDPWD"] => /tmp/geoip-1.0.6
#