$ perl ./geoip --fetch --DB=dbi:SQLite:dbname=geoip.db
Will do everything for you if you have a working DBD::SQLite.
A demo:
$ ls -l geoip.db
/bin/ls: cannot access 'geoip.db': No such file or directory
Exit 2
Be patient on the next one, it'll take a while to finish (my demo took 5 minutes). You will need enough memory and disk space. My process took 13 Gb of ram.
$ perl ./geoip --fetch --DB=dbi:SQLite:dbname=geoip.db
Create table stamps
Create table continent
Create table country
Create table ipv4
Create table provider
Create table city
Create table ipc4
2020-06-22 21:16:39 4689345 GeoLite2-ASN-CSV.zip
304 2020-06-22 21:16:39 4689345 GeoLite2-ASN-CSV.zip
2020-06-16 13:13:32 1805947 GeoLite2-Country-CSV.zip
304 2020-06-16 13:13:32 1805947 GeoLite2-Country-CSV.zip
2020-06-16 13:19:50 41827687 GeoLite2-City-CSV.zip
304 2020-06-16 13:19:50 41827687 GeoLite2-City-CSV.zip
Reading Country info ...
Reading Country IPv4 info ...
Reading Provider IPv4 info ...
Reading City info ...
Reading City IPv4 info ...
$ ls -l geoip.db
-rw-r--r-- 1 501100544 Jun 25 00:30 geoip.db
So there you go, 501 Mb of SQLite database.
Enjoy, Have FUN! H.Merijn
|