Skip to content

Instantly share code, notes, and snippets.

@theel0ja
Created January 9, 2019 21:00
Show Gist options
  • Save theel0ja/50ab6ad5e203812caa3a0bb96bb19827 to your computer and use it in GitHub Desktop.
Save theel0ja/50ab6ad5e203812caa3a0bb96bb19827 to your computer and use it in GitHub Desktop.
updates GeoLite2 databases
rm -rf dist/ *.tar.gz GeoLite2-*/
wget https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz
wget https://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz
wget https://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN.tar.gz
tar -xzvf GeoLite2-City.tar.gz
tar -xzvf GeoLite2-Country.tar.gz
tar -xzvf GeoLite2-ASN.tar.gz
rm *.tar.gz
mkdir dist
mv */*.mmdb dist/
rm -rf GeoLite2-*/
sudo rm -rf /usr/share/GeoIP/GeoLite2-City.tar.gz /usr/share/GeoIP/GeoLite2-Country.tar.gz /usr/share/GeoIP/GeoLite2-ASN.tar.gz
sudo find dist/ -type f -name "*.mmdb" -exec mv {} /usr/share/GeoIP/ \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment