
Listed on this page are methods to setup automatic updates for the GeoIP Databases.
Using geoipupdate program in C API
The GeoIP C Library 1.3.6 and above
has support for performing automatic updates for the MaxMind GeoIP binary databases.
Please follow the
instructions below.
Step 1 - Install GeoIP 1.3.6
Install GeoIP 1.3.6 or greater and place GeoIP.conf in your configuration directory.
(e.g. /usr/local/etc/GeoIP.conf)
Once you have GeoIP 1.3.6 or greater installed, place the following in GeoIP.conf
in your configuration directory (e.g. /usr/local/etc/GeoIP.conf).
Step 2 - Obtain Account Information
Please log in
to view the GeoIP.conf file with your UserId, LicenseKey and ProductIds.
# GeoIP.conf file - used by geoipupdate program
# to update databases from http://www.maxmind.com
UserId YOUR_USER_ID_HERE
LicenseKey YOUR_LICENSE_KEY_HERE
ProductIds YOUR_PRODUCT_IDS_HERE
|  |
Step 3 - Run geoipupdate
Run geoipupdate. To fully automate this process on Linux or Unix, use a crontab file like:
# top of crontab
MAILTO=your@email.com
0 12 * * 3 /usr/local/bin/geoipupdate
# end of crontab
|  |
This crontab file would run every Wednesday at noon, and it would email
you the results. To apply the crontab file run:
$ crontab cronfile
|  |
If you are running a firewall, geoipupdate requires that the DNS and
HTTP (80) ports be open.
Direct URL for downloading GeoIP from Windows and other systems not using C API
1: For GeoIP Country in binary format only
There is a direct URL to download a compressed file containing
GeoIP Country database in binary format here:
http://www.maxmind.com/app/update?license_key=LICENSE_KEY_HERE&md5=MD5_SUM_OF_EXISTING_GEOIP_DAT_FILE
|  |
This URL can be used to automate the download from windows. The md5 parameter is optional,
if it is passed, the server will return the message "No new updates available" if the MD5
of the uncompressed GeoIP.dat file on your server
matches the MD5 of the latest GeoIP Country file on our server.
2: For all other GeoIP databases
For downloading other GeoIP databases, using a HTTP request, see the
URLs under "Direct Download URL:"
on http://www.maxmind.com/app/download_files?direct=1.
If you are using wget to fetch the file, you will need to place single quotes around the URL.
This download will return a compressed file in gzip format, which can be uncompressed
using a program like gzip, or
GZip Component.
|