First of all you have to be sure that latest pear with pecl extension is installed into your server.
After that to install geoip extension properly follow the below guide :
1. First of all edit your php.ini file and remove the "extension=geoip.so" line and "extension_dir=/usr/lib64/extensions/no-debug-non-zts-20100525" lines which may have come from your previous installation.
2. Run the below commands :
yum -y install geoip-devel
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
/usr/local/bin/phpize
./configure --with-php-config=/usr/local/bin/php-config
make
make install
3. After "make install" command execution done you will get a line stating the shared extension directory path. For Example : some text /usr/lib64/extensions/no-debug-non-zts-20131226
4. Copy that directory path only. Then go to your php.ini file editor.
5. Go to the bottom of the file and paste : extension_dir = the path you copied from the make install completion.
6. After the extension_dir line put : extension=geoip.so
7. Restart Apache and to verify the module, use this command : php -m
Hope the tutorial helps you. Thanks...