当前位置: 首页 > news >正文

通过geoip自动更新GeoLite2-ASN GeoLite2-City GeoLite2-Country

1、首先注册登录

Sign In | MaxMind

登录地址、填写邮箱、用户名、密码信息

2、同意GeoLite2 End User License Agreement协议

注册登录成功之后,要想获取到免费产品的订阅信息,还需要同意GeoLite2 End User License Agreement协议,否则登录之后,在个人账号门户是看不到GeoLite2下载信息的。

GeoLite sign up | MaxMind

3、登录个人中心获取license

生成license的时候复制备用。

4、下载geoipupdate执行更新

下载地址

github.com

上传到linux服务器上解压,修改GeoIP.conf文件

GeoIP.conf,填写对应的AccountID 账号IDLicenseKey 复制的License,都可在登录后的个人中心获取

# Please see https://dev.maxmind.com/geoip/updating-databases?lang=en for # instructions on setting up geoipupdate, including information on how to # download a pre-filled GeoIP.conf file. # Replace YOUR_ACCOUNT_ID_HERE and YOUR_LICENSE_KEY_HERE with an active account # ID and license key combination associated with your MaxMind account. These # are available from https://www.maxmind.com/en/my_license_key. AccountID 账号ID LicenseKey 复制的License # Enter the edition IDs of the databases you would like to update. # Multiple edition IDs are separated by spaces. EditionIDs GeoLite2-ASN GeoLite2-City GeoLite2-Country # The remaining settings are OPTIONAL. # The directory to store the database files. Defaults to /usr/local/share/GeoIP # DatabaseDirectory /usr/local/share/GeoIP # The server to use. Defaults to "https://updates.maxmind.com". # Host https://updates.maxmind.com # The proxy host name or IP address. You may optionally specify a # port number, e.g., 127.0.0.1:8888. If no port number is specified, 1080 # will be used. # Proxy 127.0.0.1:8888 # The user name and password to use with your proxy server. # ProxyUserPassword username:password # Whether to preserve modification times of files downloaded from the server. # Defaults to "0". # PreserveFileTimes 0 # The lock file to use. This ensures only one geoipupdate process can run at a # time. # Note: Once created, this lockfile is not removed from the filesystem. # Defaults to ".geoipupdate.lock" under the DatabaseDirectory. # LockFile /usr/local/share/GeoIP/.geoipupdate.lock # The amount of time to retry for when errors during HTTP transactions are # encountered. It can be specified as a (possibly fractional) decimal number # followed by a unit suffix. Valid time units are "ns", "us" (or "µs"), "ms", # "s", "m", "h". # Defaults to "5m" (5 minutes). # RetryFor 5m # The number of parallel database downloads. # Defaults to "1". # Parallelism 1

执行命令,例如解压到了home下,可以配置crontab定时执行

/home/geoipupdate_7.1.1_linux_amd64/geoipupdate -v -f /home/geoipupdate_7.1.1_linux_amd64/GeoIP.conf
http://www.gsyq.cn/news/133400.html

相关文章:

  • Excalidraw匿名访问安全策略:防止恶意占用
  • Excalidraw用户协议关键条款解读:免责范围
  • 1、Windows 10入门指南:开启便捷数字生活
  • Excalidraw商标使用规范:品牌保护边界
  • 2、Windows 10 电脑操作与应用使用全指南
  • Excalidraw水印功能添加建议:防止截图外泄
  • Qwen3-235B:单模型双模式推理新突破
  • Excalidraw构建流程剖析:前端打包优化空间
  • Excalidraw缩放和平移功能技术实现细节
  • 腾讯开源SongGeneration:LeVo架构高品质AI作曲
  • LongCat-Video:分钟级长视频高效生成模型
  • Windows 10版本
  • 基于SpringBoot+Vue的软件缺陷跟踪管理系统设计与实现
  • MySQL的安装与卸载
  • 6、Windows 10 使用指南与网页浏览基础
  • Excalidraw企业合作案例:某银行内部部署实例
  • java高校创新创业项目管理系统springboot-vue
  • Kimi Linear:1M tokens下6倍解码效率的线性模型
  • 【Prisma】如何修复(重建)已经损坏的迁移历史?
  • Excalidraw能否成为下一代开源设计标准?
  • java图书馆教室自习室预约管理系统springboot-vue
  • Qwen3-32B-MLX-6bit:双模式推理新体验
  • java大学生实习实训项目基地管理系统springboot-vue
  • Fusion_lora:Qwen-Edit图像融合新方案
  • 42、Windows XP系统:账户密码管理与硬件配置指南
  • Hunyuan-1.8B:256K超长上下文轻量基座开源
  • SVDQuant量化版FLUX.1-Krea-dev发布:4-bit精度开启扩散模型高效推理新纪元
  • Excalidraw连线吸附功能优化建议与用户体验反馈
  • 腾讯Hunyuan-7B:中文长文本大模型新标杆
  • Excalidraw Docker镜像体积优化方案