Changes
From SME Server
Jump to navigation
Jump to search
← Older edit
Newer edit →
GeoIP
(view source)
Revision as of 11:24, 11 October 2010
700 bytes added
,
11:24, 11 October 2010
→GeoIP database
:
Added cron-job to refresh GeoIP database
Line 27:
Line 27:
gunzip GeoIP.dat.gz
gunzip GeoIP.dat.gz
+
+
==== Creating a cron-job ====
+
+
We can add a cron-job to automate the monthly process of updating the GeoIP database:
+
mkdir -p /etc/e-smith/templates-custom/etc/crontab
+
+
Now we will add a custom template fragment:
+
vim /etc/e-smith/templates-custom/etc/crontab/91_Update_GeoIP_db
+
+
Add the following to this fragment, this will download and extract the new database every month:
+
# Updating the GeoIP database monthly on the 5th at 0:00h.
+
0 0 5 * * root /usr/bin/wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz -O /var/lib/GeoIP/GeoIP.dat.gz; /bin/gunzip -f /var/lib/GeoIP/GeoIP.dat.gz
+
To activate the custom template fragment:
+
expand-template /etc/crontab
=== GeoIP qpstmpd plugin ===
=== GeoIP qpstmpd plugin ===
Jester
167
edits
Navigation menu
Page actions
Page
Discussion
View source
History
Page actions
Page
Discussion
More
Tools
In other languages
Personal tools
English
Log in
Koozali SME Server
Main Page
Welcome
Releases
Testimonials
Documentation
SME Server FAQ
Volunteering
Commercial Support
Recent activities
Dashboard
Recent wiki changes
Recent bug changes
Unread Forum posts
Koozali resources
Contribs
How-To's
Forums
Bugzilla
Mailing Lists
Translations
Download
Koozali SME Server wiki
Wiki statistics
Wiki categories
Wiki Help
Koozali Wiki Help
Tools
Special pages
Printable version
Search