On this post brief outline of install or update the latest GeoIP Country on Unix/Linux.
Using wget command can download the Geolite file
# wget -N http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
Once you have downloaded the database need to uncompress that file using gunzip command,
# gunzip GeoIP.dat.gz
Note : -N option to only download if the file has been updated
Find out location of geoip database,
# whereis geoip
geoip: /usr/local/geoip
# cd /usr/local/geoip/share/GeoIP
or
geoip: /usr/local/geoip
# cd /usr/local/geoip/share/GeoIP
# cd /Geo-Ip-Path/share/GeoIP
Before changes take a backup a existing GeoIP database
# cp GeoIP.conf GeoIP.conf_bak
# cp /root/GeoIP.dat .
# cp /root/GeoIP.dat .
Once you have updated the GeoIP.dat file need to restart named.
netstat -anp | grep named
tcp 0 0 192.168.0.125:53 0.0.0.0:* LISTEN 1252/named
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 1252/named
udp 0 0 0.0.0.0:55933 0.0.0.0:* 1252/named
udp 0 0 192.168.0.125:53 0.0.0.0:* 1252/named
udp 0 0 127.0.0.1:53 0.0.0.0:* 1252/named
unix 2 [ ] DGRAM 289986 7678/named
you can directly kill and start the named again
# pkill -9 named
# /usr/local/bind/sbin/named -s
# /usr/local/bind/sbin/named -s
Note : PKILL is specified to Process Kill
Comments (0)