且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

GeoIP最快捷安装

更新时间:2022-09-14 23:06:38


下载GeoIP数据包


mkdir /GeoIP
cd /GeoIP

wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
wget http://geolite.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz

gunzip GeoIP.dat.gz
gunzip GeoIPASNum.dat.gz

gunzip GeoLiteCity.dat.gz


// GeoIP 是国家数据,GeoLiteCity 是城市数据,GeoIPASNum 是组织数据



安装程序

rpm -ivh   http://ftp.linux.ncsu.edu/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm



1
2
3
4
5
6
7
8
9
vim /etc/yum.repos.d/epel.repo      ## 注释mirrorlist url(包含https) ,然后取消注释baseurl
 
yum -y install GeoIP GeoIP-devel perl-Geo-IP
 
Verifying  : GeoIP-devel-1.6.5-1.el6.x86_64                                  1/5
Verifying  : geoipupdate-2.2.1-2.el6.x86_64                                  2/5
Verifying  : GeoIP-GeoLite-data-2015.12-1.el6.noarch                         3/5
Verifying  : GeoIP-1.6.5-1.el6.x86_64                                        4/5
Verifying  : GeoIP-GeoLite-data-extra-2015.12-1.el6.noarch                   5/5








本文转自 295631788 51CTO博客,原文链接:http://blog.51cto.com/hequan/1783283,如需转载请自行联系原作者