You are here

INSTALL.txt in GeoIP API 7.2

Same filename and directory in other branches
  1. 5 INSTALL.txt
  2. 6 INSTALL.txt
  3. 7 INSTALL.txt
Database Files
--------------------
Before using this module, you will need to:

1. Enable this module as usual.

2. Install one of the Maxmind php API:
   - GeoIP2 [https://github.com/maxmind/GeoIP2-php]:
     -- # Composer (https://getcomposer.org/download/):
          Install the library using composer in sites/all/libraries/GeoIP2-php
          *nix Commands:
            mkdir [path_to_drupal]/sites/all/libraries/GeoIP2-php
            cd [path_to_drupal]/sites/all/libraries/GeoIP2-php
            curl -sS https://getcomposer.org/installer | php
            php composer.phar require geoip2/geoip2:~2.0

     -- # phar package:
          Download the latest phar package:
          https://github.com/maxmind/GeoIP2-php/releases
          Place the file geoip2.phar here:
          sites/all/libraries/GeoIP2-phar/geoip2.phar

   - Legacy [https://github.com/maxmind/geoip-api-php]:
   -- Download from https://github.com/maxmind/geoip-api-php
   -- Extract to sites/all/libraries/geoip-api-php
      Make sure you've a path like sites/all/libraries/geoip-api-php/src

3. Download one of the GeoLite database files (matching the API):
   - GeoIP2: http://dev.maxmind.com/geoip/geoip2/geolite2/#Downloads
   - Legacy: http://dev.maxmind.com/geoip/legacy/downloadable/

4. Create the directory 'sites/all/libraries/geoip' and extract the database
   file into this directory.
   You can use other locations too e.g. to share a database with varnish or
   other tools - to do so you can configure the path to the database to use in
   the module configuration (admin/config/system/geoip).

5. Profit!

Updates
--------------------
Both of the Lite databases are updated monthly. The module will prompt
administrators to update if the timestamp on the data file is older than one
month. Simply replace the database file(s) with the latest one from the Maxmind
site.

File

INSTALL.txt
View source
  1. Database Files
  2. --------------------
  3. Before using this module, you will need to:
  4. 1. Enable this module as usual.
  5. 2. Install one of the Maxmind php API:
  6. - GeoIP2 [https://github.com/maxmind/GeoIP2-php]:
  7. -- # Composer (https://getcomposer.org/download/):
  8. Install the library using composer in sites/all/libraries/GeoIP2-php
  9. *nix Commands:
  10. mkdir [path_to_drupal]/sites/all/libraries/GeoIP2-php
  11. cd [path_to_drupal]/sites/all/libraries/GeoIP2-php
  12. curl -sS https://getcomposer.org/installer | php
  13. php composer.phar require geoip2/geoip2:~2.0
  14. -- # phar package:
  15. Download the latest phar package:
  16. https://github.com/maxmind/GeoIP2-php/releases
  17. Place the file geoip2.phar here:
  18. sites/all/libraries/GeoIP2-phar/geoip2.phar
  19. - Legacy [https://github.com/maxmind/geoip-api-php]:
  20. -- Download from https://github.com/maxmind/geoip-api-php
  21. -- Extract to sites/all/libraries/geoip-api-php
  22. Make sure you've a path like sites/all/libraries/geoip-api-php/src
  23. 3. Download one of the GeoLite database files (matching the API):
  24. - GeoIP2: http://dev.maxmind.com/geoip/geoip2/geolite2/#Downloads
  25. - Legacy: http://dev.maxmind.com/geoip/legacy/downloadable/
  26. 4. Create the directory 'sites/all/libraries/geoip' and extract the database
  27. file into this directory.
  28. You can use other locations too e.g. to share a database with varnish or
  29. other tools - to do so you can configure the path to the database to use in
  30. the module configuration (admin/config/system/geoip).
  31. 5. Profit!
  32. Updates
  33. --------------------
  34. Both of the Lite databases are updated monthly. The module will prompt
  35. administrators to update if the timestamp on the data file is older than one
  36. month. Simply replace the database file(s) with the latest one from the Maxmind
  37. site.