下載下傳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,如需轉載請自行聯系原作者