可以使用以下脚本在Unix/Linux平台上下载GeoIP.dat文件:
#!/bin/bash
cd /usr/local/share/GeoIP/
wget -N http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
gunzip -f GeoIP.dat.gz
该脚本将会在/usr/local/share/GeoIP/目录下下载最新版本的GeoIP.dat文件,并解压缩覆盖原有的文件。你可以将该脚本添加到定时任务中,以便自动更新。