news 2026/5/1 4:49:19

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

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
通过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
版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/5/1 5:43:16

GraniStudio : MC 协议深度剖析

在工业自动化领域,三菱电机的 MC(MELSEC Communication)协议是连接上位机与三菱 PLC 的核心通信标准,广泛应用于汽车制造、电子加工等精密生产场景。GraniStudio 软件作为工业级零代码开发平台,其内置的 MC 协议客户端…

作者头像 李华
网站建设 2026/5/1 6:52:25

Excalidraw赞助商展示位设计:不影响用户体验

Excalidraw 赞助商展示位设计:如何在不打扰用户的情况下实现可持续运营 在开源工具的世界里,有一个永恒的难题:如何在维持产品纯粹体验的同时,为项目注入持续发展的动力?Excalidraw 作为一个广受开发者和设计师喜爱的手…

作者头像 李华
网站建设 2026/5/1 10:36:37

Granite-4.0-H-Small-Base:23Ttoken的多任务模型

IBM最新发布的Granite-4.0-H-Small-Base模型以23万亿token的训练规模和多模态架构,重新定义了企业级大语言模型的性能标准。 【免费下载链接】granite-4.0-h-small-base 项目地址: https://ai.gitcode.com/hf_mirrors/unsloth/granite-4.0-h-small-base 行业…

作者头像 李华
网站建设 2026/5/1 5:44:15

Excalidraw与其他白板工具的数据迁移方案

Excalidraw与其他白板工具的数据迁移方案 在远程协作日益成为主流工作模式的今天,团队对可视化表达的需求不断攀升。从产品原型到系统架构设计,虚拟白板早已不再是“可有可无”的辅助工具,而是承载组织知识资产的核心载体。然而,随…

作者头像 李华
网站建设 2026/5/1 5:57:44

轻量级大模型在RAG系统中的集成方案

目录 摘要 一、技术原理 1.1 架构设计理念解析 1.2 核心算法实现 1.2.1 语义感知异构图索引 1.2.2 轻量级拓扑增强检索 1.3 性能特性分析 1.3.1 性能对比数据 1.3.2 量化优化效果 二、实战部分 2.1 完整可运行代码示例 2.1.1 环境配置 2.1.2 完整RAG系统实现 2.2…

作者头像 李华
网站建设 2026/5/1 5:58:46

ERNIE-4.5-300B:多模态MoE大模型重磅发布

ERNIE-4.5-300B:多模态MoE大模型重磅发布 【免费下载链接】ERNIE-4.5-300B-A47B-W4A8C8-TP4-Paddle 项目地址: https://ai.gitcode.com/hf_mirrors/baidu/ERNIE-4.5-300B-A47B-W4A8C8-TP4-Paddle 百度正式推出新一代大语言模型ERNIE-4.5-300B,该…

作者头像 李华