news 2026/4/18 14:13:11

通过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/4/18 6:26:11

Excalidraw图形序列化格式分析:JSON结构详解

Excalidraw图形序列化格式分析:JSON结构详解 在当今的远程协作时代,可视化表达已成为团队沟通的核心方式之一。从产品原型到系统架构设计,从教学讲解到项目复盘,一张清晰的手绘风格草图往往比千言万语更有效。而 Excalidraw 作为一…

作者头像 李华
网站建设 2026/4/17 8:30:02

Qwen3-32B-MLX-8bit:双模式切换的AI新体验

Qwen3系列最新成员Qwen3-32B-MLX-8bit正式发布,凭借独特的双模式切换能力和8位量化技术,在保持高性能的同时实现了本地部署效率的突破,为AI应用带来更灵活的使用体验。 【免费下载链接】Qwen3-32B-MLX-8bit 项目地址: https://ai.gitcode.…

作者头像 李华
网站建设 2026/4/18 8:04:47

Excalidraw构建流程剖析:前端打包优化空间

Excalidraw构建流程剖析:前端打包优化空间 在现代前端工程中,一个项目的构建体验往往决定了开发者的幸福感和交付效率。尤其是像 Excalidraw 这样集成了复杂图形渲染、实时协作与 AI 生成功能的 Web 应用,其构建流程不仅关乎启动速度和部署性…

作者头像 李华
网站建设 2026/4/18 10:06:16

Qwen3-Coder-30B:256K上下文代码助手

Qwen3-Coder-30B:256K上下文代码助手 【免费下载链接】Qwen3-Coder-30B-A3B-Instruct-GGUF 项目地址: https://ai.gitcode.com/hf_mirrors/unsloth/Qwen3-Coder-30B-A3B-Instruct-GGUF 代码大模型领域再添强将——Qwen3-Coder-30B-A3B-Instruct正式发布&…

作者头像 李华
网站建设 2026/4/18 9:19:36

14、Windows 10 文件操作全攻略

Windows 10 文件操作全攻略 在计算机的世界里,文件是至关重要的元素。计算机中的所有数据都存储在磁盘上,计算机通常有一个主磁盘,也就是内部硬盘驱动器,常被称为 C 盘(“驱动器”和“磁盘”这两个术语可以互换使用)。磁盘中的内容被组织成一个个文件,同时磁盘也被划分…

作者头像 李华
网站建设 2026/4/18 7:58:26

Whisper-base.en:68万小时训练的英文ASR模型

OpenAI推出的Whisper-base.en模型凭借68万小时的海量训练数据,成为英文语音识别领域的高效解决方案,为开发者和企业提供了轻量级yet高性能的自动语音识别(ASR)工具。 【免费下载链接】whisper-base.en 项目地址: https://ai.gi…

作者头像 李华