Ubuntu: Schedule download job for GeoLite database #Markdown #Ubuntu
The GeoLite databases are our free IP geolocation databases. They are updated on the first Tuesday of each month.
Add a monthly cron job.
sudo vi /etc/cron.monthly/downloadgeolitedatabase
with the following content.
#!/bin/sh
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz -P /tmp/
gunzip /tmp/GeoLiteCity.dat.gz
# add copy and other commands here:
# start region: modification
# cp /tmp/GeoLiteCity.dat [destination]
# end region: modification
rm /tmp/GeoLiteCity.dat
Enable execution of the script for the owner.
sudo chmod o+x /etc/cron.monthly/downloadgeolitedatabase
GeoLite Free Downloadable Databases
How do I get the GeoIP databases to improve accuracy of Country detection, and detect visitors’ Cities and Regions?