Changes

Jump to navigation Jump to search
2,217 bytes added ,  22:21, 14 July 2016
→‎Product Opener: geoip database update and symbolic link for perl module
Line 445: Line 445:     
* apt-get install zlib1g-dev
 
* apt-get install zlib1g-dev
 +
 +
====== GeoIP updatate ======
 +
 +
The packaged geoip database installed through "apt-get install geoip-database" is very old, need to install one manually:
 +
 +
<pre>
 +
root@ns3362784:/home/obf/logs# apt-get install geoip-database
 +
Reading package lists... Done
 +
Building dependency tree
 +
Reading state information... Done
 +
geoip-database is already the newest version.
 +
The following packages were automatically installed and are no longer required:
 +
  libasan0 libboost-dev libboost-filesystem1.55.0
 +
  libboost-program-options1.55.0 libboost-system1.55.0 libboost-thread1.55.0
 +
  libboost1.55-dev libgcc-4.8-dev libgoogle-perftools4 libpcrecpp0 libsnappy1
 +
  libstdc++-4.8-dev libtcmalloc-minimal4 libunwind8 libv8-3.14.5
 +
Use 'apt-get autoremove' to remove them.
 +
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
 +
root@ns3362784:/home/obf/logs# cd /usr/share/GeoIP/
 +
root@ns3362784:/usr/share/GeoIP# ls -lrt
 +
total 4900
 +
-rw-r--r-- 1 root root 1061883 Mar 17  2015 GeoIP.dat
 +
-rw-r--r-- 1 root root 3949299 Mar 17  2015 GeoIPv6.dat
 +
root@ns3362784:/usr/share/GeoIP# wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
 +
--2016-07-15 00:16:08--  http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
 +
Resolving geolite.maxmind.com (geolite.maxmind.com)... 2400:cb00:2048:1::6810:262f, 2400:cb00:2048:1::6810:252f, 104.16.38.47, ...
 +
Connecting to geolite.maxmind.com (geolite.maxmind.com)|2400:cb00:2048:1::6810:262f|:80... connected.
 +
HTTP request sent, awaiting response... 200 OK
 +
Length: 517602 (505K) [application/octet-stream]
 +
Saving to: ‘GeoIP.dat.gz’
 +
 +
GeoIP.dat.gz        100%[=====================>] 505.47K  --.-KB/s  in 0.06s
 +
 +
2016-07-15 00:16:08 (7.76 MB/s) - ‘GeoIP.dat.gz’ saved [517602/517602]
 +
 +
root@ns3362784:/usr/share/GeoIP# gzip -d GeoIP.dat.gz
 +
gzip: GeoIP.dat already exists; do you wish to overwrite (y or n)? y
 +
root@ns3362784:/usr/share/GeoIP# ls -lrt
 +
total 4744
 +
-rw-r--r-- 1 root root 3949299 Mar 17  2015 GeoIPv6.dat
 +
-rw-r--r-- 1 root root  904073 Jul  6 19:50 GeoIP.dat
 +
</pre>
 +
 +
Make a symbolic link (Perl module seems to think the database is at /usr/local/share/GeoIP/GeoIP.dat )
 +
 +
<pre>
 +
ln -s /usr/share/GeoIP /usr/local/share/GeoIP
 +
</pre>
    
===== Perl modules =====
 
===== Perl modules =====

Navigation menu