news 2026/5/5 4:36:13

通过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/3 3:43:44

MiniMax-M2:高效开源MoE模型,聚焦智能体任务

MiniMax-M2:高效开源MoE模型,聚焦智能体任务 【免费下载链接】MiniMax-M2 MiniMax-M2是MiniMaxAI开源的高效MoE模型,2300亿总参数中仅激活100亿,却在编码和智能体任务上表现卓越。它支持多文件编辑、终端操作和复杂工具链调用 项…

作者头像 李华
网站建设 2026/5/3 6:22:44

GraniStudio : TCP/IP(Socket)协议深度剖析

在工业自动化与物联网领域,TCP/IP(Socket)协议作为应用最广泛的网络通信标准,是实现设备间数据交互的核心技术。GraniStudio 软件作为工业级零代码开发平台,其内置的 TCP/IP(Socket)客户端与服务…

作者头像 李华
网站建设 2026/5/2 15:16:11

与AI共进:2026年互联网从业者的技能重塑与思维升级

即将进入2026年,互联网行业正经历着一场静默而深刻的变革。过去一年,我所在的技术团队、产品部门乃至运营小组,几乎每周都会展开与AI相关的讨论——不是关于遥远的技术概念,而是具体到某个功能如何借助AI提升体验、某段代码如何通…

作者头像 李华
网站建设 2026/5/3 9:08:04

Excalidraw商标使用规范:品牌保护边界

Excalidraw商标使用规范:品牌保护边界 在开源工具日益普及的今天,一个名字往往不只是代码的代号,更承载着用户信任、社区共识和长期积累的技术声誉。以手绘风格著称的虚拟白板工具 Excalidraw,自诞生以来便因其简洁直观的设计理念…

作者头像 李华
网站建设 2026/5/4 14:18:13

快手KwaiCoder:动态推理深度的AutoThink模型

导语:快手Kwaipilot团队推出KwaiCoder-AutoThink-preview模型,首创动态推理深度调节机制,实现"思考"与"非思考"能力的统一,为大语言模型效率提升开辟新路径。 【免费下载链接】KwaiCoder-AutoThink-preview …

作者头像 李华
网站建设 2026/5/3 8:33:46

3、Windows 10 使用与设置指南

Windows 10 使用与设置指南 一、应用操作 关闭应用 通常无需关闭应用,但打开不必要的应用会因应用切换器中多余的缩略图而使应用切换变得困难。 若要关闭天气应用,可在开始屏幕再次选择天气应用磁贴重新打开该应用,注意屏幕底部任务栏上的天气应用图标。显示该图标的上下…

作者头像 李华