下载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 是组织数据
安装程序
1
2
3
4
5
6
7
8
9
<code>vim </code><code>/etc/yum</code><code>.repos.d</code><code>/epel</code><code>.repo </code><code>## 注释mirrorlist url(包含https) ,然后取消注释baseurl</code>
<code>yum -y </code><code>install</code> <code>GeoIP GeoIP-devel perl-Geo-IP</code>
<code>Verifying : GeoIP-devel-1.6.5-1.el6.x86_64 1</code><code>/5</code>
<code>Verifying : geoipupdate-2.2.1-2.el6.x86_64 2</code><code>/5</code>
<code>Verifying : GeoIP-GeoLite-data-2015.12-1.el6.noarch 3</code><code>/5</code>
<code>Verifying : GeoIP-1.6.5-1.el6.x86_64 4</code><code>/5</code>
<code>Verifying : GeoIP-GeoLite-data-extra-2015.12-1.el6.noarch 5</code><code>/5</code>
本文转自 295631788 51CTO博客,原文链接:http://blog.51cto.com/hequan/1783283,如需转载请自行联系原作者