Aller au contenu | Aller au menu | Aller à la recherche

Site membre du réseau Izardev et LCNET

Géolocalisation et Awstats : GeoIP

Installation des données

Commençons déjà par récupérer les sources :

cd /usr/src
 wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz  
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz 
wget http://geolite.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz

créons un répertoire pour GeoIP :

 mkdir /usr/local/share/geoIP
cp GeoIP.dat.gz /usr/local/share/geoIP/  
gunzip /usr/local/share/geoIP/GeoIP.dat.gz    
cp GeoLiteCity.dat.gz /usr/local/share/geoIP/  
gunzip /usr/local/share/geoIP/GeoLiteCity.dat.gz  
cp GeoIPASNum.dat.gz /usr/local/share/geoIP/ 
gunzip /usr/local/share/geoIP/GeoIPASNum.dat.gz

Installation du programme GeoIP

Télécharger, décompresser et compiler GeoIP-*.tar.gz

cd /usr/src  
wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP-1.4.5.tar.gz  
cd /usr/local 
 tar -xvzf /usr/src/GeoIP-1.4.5.tar.gz  
mv GeoIP-1.4.5/ GeoIP 
cd GeoIP 
./configure  
make  
make check 
make install

Il faut ensuite télécharger, décompresser et compiler Geo-IP-*.tar.gz

cd /usr/src  
wget http://geolite.maxmind.com/download/geoip/api/perl/Geo-IP-1.38.tar.gz  
cd /usr/local  
tar -xvzf /usr/src/Geo-IP-1.38.tar.gz  
mv Geo-IP-1.38 Geo-IP 
cd Geo-IP
#Une fois téléchargé, on installe : 
perl Makefile.PL LIBS='-L/usr/local/lib'  
make 
make install

Mise à jour des fichiers de configuration AwstatsOuvrez vos fichiers de configuration awstats, et pour chaque site, ajoutez dedans :

 

Awstats a maintenant le plugin de géolocalistation !

Lire l'article lié :

Installation de Awstats

Partagez cet article !

  • Delicious
  • Stumbleupon
  • Digg
  • Facebook
  • Google
  • Linkedin
  • Yahoo Buzz
  • Twitter
Vous avez apprécié cet article ?

Commentaires S'abonner au flux RSS des commentaires

  1. bonjour je vien de voir pour Geo-IP ceci :

    cd /usr/src
    wget http://....35.tar.gz
    cd /usr/local
    tar -xvzf /usr/src/Geo-IP-1.38.tar.gz
    mv Geo-IP-1.38 Geo-IP
    cd Geo-IP
    #Une fois téléchargé, on installe :
    perl Makefile.PL LIBS='-L/usr/local/lib'
    make
    make install


    Or il faudrait faire :

    cd /usr/src
    wget http://....38.tar.gz
    cd /usr/local
    tar -xvzf /usr/src/Geo-IP-1.38.tar.gz
    mv Geo-IP-1.38 Geo-IP
    cd Geo-IP
    #Une fois téléchargé, on installe :
    perl Makefile.PL LIBS='-L/usr/local/lib'
    make
    make install

    c'est au niveau du wget...

    Merci pour ce petit tutoriel.

    Cordialement,
    sih.itinet.fr (en ligne a partir de la semaine prochaine)
  2. Merci Patrice, j'ai corrigé ces erreurs :)
  3. Patrice | Géolocalisation et Awstats : GeoIP |
    D'abord, merci pour ce tutoriel;
    Il m'a été trés utile.

    J'ai remarqué cette erreur "tar -xvzf Geo-IP-1.35.tar.gz".
    Il faudrait indiquer tar -xvzf "/usr/src/"Geo-IP-1.35.tar.gz
    et je pense qu'il faut télécharger la version 1.38 car j'ai eu un souci avec la 1.35.
  4. Merci pour votre remarque, c'est corrigé !
  5. Bonjour,

    Il y à 2 petites erreurs.
    La première ce trouve dans le deuxième encadré de code.
    Il y à marqué : gunzip /usr/local/geoIP/share/GeoIP.dat.gz
    au lieu de : gunzip /usr/local/share/geoIP/GeoIP.dat.gz

    La deuxiéme ce trouve dans le quatriéme encadré.
    Il y à marqué : mv Geo-IP-1.35.tar.gz Geo-IP
    au lieu de : mv Geo-IP-1.35 Geo-IP

    Sinon ça fonctionne bien :)

Ajouter un commentaire

Les commentaires sont tous validés par un modérateur, votre commentaire n'apparaît pas directement sur le site.
Aucun support n'est assuré ici, vous pouvez néanmoins laisser vos remarques et critiques sur l'article, les points de vue pertinents sont toujours les bienvenus.