centos 7 安装geoipupdate

很多人在安装完centos 7 mini iso 以后会安装bind-utils,bind-utils 包含了许多DNS查询的工具包,其中就有一个dependency GeoIP library

但是这个GeoIP library 是包含在老版的geoipupdate这个程序中的,版本号应该为1.5,但是maxmind 早就放弃了对于老版geoipupdate的支持,因此如果你的程序需要geoipupdate 的支持的话,用centos 7 默认repo 自带的geoipupdate 的话,肯定是不行的了

因此我们肯定是要安装经过重新开发过的只支持新的geoip 数据库格式的geoipupdate

github地址是https://github.com/maxmind/geoipupdate

但是这里又出现了一个问题,如果我们直接使用rpm 的安装包来安装的话,默认的可执行command 会被安装在/usr/bin/geoipupdate, conf 地址会被安装在/etc/GeoIP.conf, 这样会和老版的geoipupdate 发生冲突,但是bind-utils 又依赖于老版的GeoIP 库,不可能卸载掉

这里有一个比较简单的解决办法,就是直接安装linux 的通用安装包,而不是用专门的centos的rpm安装包,这样可执行程序的路径就可以被我们自行选择

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.