Listed on this page are methods to set up 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 GeoIP binary databases. Please follow the instructions below.
Step 1 - Install GeoIP C Library (1.3.6 or greater)
Install GeoIP C Library (1.3.6 or greater) and place
GeoIP.conf in your configuration directory
Step 2 - Obtain GeoIP.conf with Account Information
Please log in to view the GeoIP.conf file with your UserId, LicenseKey and ProductIds.
Step 3 - Run geoipupdate
geoipupdate. To fully automate this process on Linux or Unix, use a crontab file like:
# top of crontab MAILTOemail@example.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 Databases using Windows and other systems not using the 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:
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 an HTTP request, see the URLs under "Direct Download URL:" on http://www.maxmind.com/zh/download_files?direct=1. If you are using wget to fetch the file, you will need to place single quotes around the URL.