Created
January 9, 2019 21:00
-
-
Save theel0ja/50ab6ad5e203812caa3a0bb96bb19827 to your computer and use it in GitHub Desktop.
updates GeoLite2 databases
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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