Install libGeoIP in linux

installation guide

1. download source code from following locations:
     GeoIP C API     - http://geolite.maxmind.com/download/geoip/api/c/GeoIP-1.4.8.tar.gz
     GeoIP-Python    - http://geolite.maxmind.com/download/geoip/api/python/GeoIP-Python-1.2.7.tar.gz
     GeoLiteCity .dat file - http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz

2. install GeoIP C module
        tar -xvf GeoIP-1.4.8.tar.gz
        cd GeoIP-1.4.8
        ./configure
        make
        make check
        make install
        
3.  install GeoIP-Python module
        tar -xvf GeoIP-Python-1.2.7.tar.gz
        cd GeoIP-Python-1.2.7
        python setup.py build
        python setup.py install
        
4.  add the path to config
        vi /etc/ld.so.conf
        add following line to the file:    
            include /usr/local/lib
        
        /sbin/ldconfig /etc/ld.so.conf
        
5.  add new .dat file
        gunzip GeoLiteCity.dat.gz
        mv GeoLiteCity.dat /usr/local/share/GeoIP/.
        
5.  check if ok
        cd GeoIP-Python-1.2.7
        python test.py
        
        if there is no error messages, then it is correctly configured.

posted on 2012-10-25 11:42  jmbkeyes  阅读(565)  评论(0)    收藏  举报

导航