Mirror maxmind GeoIP version 2 databases from maxmind.com.
npm install -g maxmind-geolite-mirror mkdir -p /usr/local/share/GeoIP /usr/local/bin/maxmind-geolite-mirror
The last command will download all the databases to the GeoIP share directory.
The MaxMind license key must be configured. It can be set by:
- editing config.js
- setting the environment variable MAXMIND_LICENSE_KEY
If neither is set, the script will emit an error.
Set this to run once a week or so. Downloads happen only when the remote file is newer than the local version.
Custom path to store maxmind database
If access to /usr/local/share/GeoIP is unavailable, the following environment variable is available: MAXMIND_DB_DIR. E.g.
Contributions are welcome and appreciated. Please keep in mind the following:
- there are no dependencies. That's on purpose.
- test coverage is at 100%, help keep it that way.
- Carl Banbury
- Tom Lee