news 2026/1/30 5:05:52

通过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/1/28 5:29:33

Excalidraw缩放和平移功能技术实现细节

Excalidraw 缩放与平移功能的技术实现深度解析 在如今的远程协作时代,数字白板早已不再是简单的“在线画图工具”。它承载着团队的思维碰撞、产品设计推演和系统架构沟通。而在这类工具中,用户能否流畅地“看到”和“抵达”他们想表达的内容,…

作者头像 李华
网站建设 2026/1/26 17:09:51

Excalidraw审计日志功能设计:操作追溯需求

Excalidraw审计日志功能设计:操作追溯需求 在企业级协作工具日益强调安全与合规的今天,一个看似简单的绘图动作背后,可能隐藏着复杂的责任归属问题。试想这样一个场景:某金融团队的核心系统架构图在凌晨被清空,而所有成…

作者头像 李华
网站建设 2026/1/23 19:45:43

Excalidraw企业合作案例:某银行内部部署实例

Excalidraw企业合作案例:某银行内部部署实践 在数字化转型浪潮中,金融机构对协作工具的安全性与效率提出了前所未有的高要求。尤其当远程办公成为常态,传统的文档共享和离线绘图方式已难以支撑跨部门、高频次的技术讨论与决策流程。某大型商业…

作者头像 李华
网站建设 2026/1/30 0:17:23

9、Windows 10实用应用与微软应用商店使用指南

Windows 10实用应用与微软应用商店使用指南 在Windows 10系统中,有许多实用的内置应用可以满足我们日常生活、工作和娱乐的各种需求。同时,微软应用商店也为我们提供了丰富多样的应用和游戏资源。下面将为大家详细介绍这些应用的使用方法以及如何在微软应用商店中探索和获取心…

作者头像 李华
网站建设 2026/1/24 21:50:07

Ming-flash-omni:100B稀疏MoE多模态新标杆

Ming-flash-omni:100B稀疏MoE多模态新标杆 【免费下载链接】Ming-flash-omni-Preview 项目地址: https://ai.gitcode.com/hf_mirrors/inclusionAI/Ming-flash-omni-Preview 多模态大模型领域再添重磅选手——Inclusion AI团队正式发布Ming-flash-omni Previ…

作者头像 李华
网站建设 2026/1/29 4:53:02

ERNIE 4.5开放21B-A3B-Base模型

百度ERNIE系列大模型再添新成员,ERNIE-4.5-21B-A3B-Base-Paddle模型正式开放,标志着百度在大语言模型领域的技术积累和开放策略进入新阶段。 【免费下载链接】ERNIE-4.5-21B-A3B-Base-Paddle 项目地址: https://ai.gitcode.com/hf_mirrors/baidu/ERNI…

作者头像 李华