Changes

From SME Server
Jump to navigationJump to search
1,317 bytes removed ,  22:51, 28 March 2021
no edit summary
Line 27: Line 27:  
{{Note box|Maxmind have removed support for their legacy v1 DBs and an update to v2 DBs is required. Please see the bugtracker link to bug #9033 below for more information }}
 
{{Note box|Maxmind have removed support for their legacy v1 DBs and an update to v2 DBs is required. Please see the bugtracker link to bug #9033 below for more information }}
   −
===Installation of legacy geoip v1 db===
+
===Installation===
 +
 
 +
==== SME 10 ====
 +
yum install smeserver-geoip --enablerepo=smecontribs
 +
Then configure your update key, create a Maxmind account and retrieve an  AccountID and LicenseKey properties and keys to the geoip db config
 +
db configuration setprop geoip LicenseKey "YOUR LIC KEY" AccountID "YOUR ACCT ID"
 +
expand-template /etc/GeoIP.conf
 +
You can also leave as is and just get the update from rpms every 2 months or so...
 +
<br />
 +
====SME 9====
 +
 
 +
====Installation of legacy geoip v1 db====
    
those are still available for few time only for back compatibility purpose and to avoid a yum update mess, or if you do not trust third party repo, but be aware thos db are not updated anymore since April 2018 and were already only 80% accurate then.
 
those are still available for few time only for back compatibility purpose and to avoid a yum update mess, or if you do not trust third party repo, but be aware thos db are not updated anymore since April 2018 and were already only 80% accurate then.
Line 38: Line 49:  
  yum update --enablerepo=smecontribs
 
  yum update --enablerepo=smecontribs
   −
===Installation and Updating of geoip v2 db===
+
====Installation and Updating of geoip v2 db====
    
{{Note box| GeoIP2 will ONLY work on x64 CPU}}
 
{{Note box| GeoIP2 will ONLY work on x64 CPU}}
Line 97: Line 108:     
  db configuration setprop geoip LicenseKey "YOUR LIC KEY" AccountID "YOUR ACCT ID"
 
  db configuration setprop geoip LicenseKey "YOUR LIC KEY" AccountID "YOUR ACCT ID"
 +
<br />
   −
====I installed the beta versions of smeserver-geoip v2====
+
== Configuration ==
if you installed smeserver-geoip-1.2-1, smeserver-geoip-1.2-2, smeserver-geoip-1.2-3, then you have already a v2, but you still need to do as you were with legacy  version and want to upgrade to v2. Otherwise you will not have the db updated anymore
     −
db yum_repositories delprop openfusion Exclude
+
==== Maxmind account to update db ====
signal-event yum-modify
+
 
You may then go ahead with the following to either install or update a v2 DB package
+
 
yum install smeserver-geoip2 --enablerepo=smecontribs,openfusion
+
Sign up for a MaxMind account (no purchase required) https://dev.maxmind.com/geoip/geoip2/geolite2/
yum update --enablerepo=smecontribs,openfusion
  −
config set UnsavedChanges no
     −
A configuration db for geoip has been created as part of the install
+
Important - Note your login details and in particular your AccountID and LicenseKey
# config show geoip
  −
geoip=service
  −
    status=enabled
     −
Now add Maxmind AccountID and LicenseKey properties and keys to the geoip db config. To use the update feature, you need to register for a free Maxmind accoutn and register for a accoutn id and key : https://www.maxmind.com/en/account/login Register and get to "My License Key".    Generating a new license key will not disable existing keys. You can have a  maximum of 25 active license keys at one time.
+
Go to Services My Licence key and generate a licence key, carefully note the key details, multiple keys may be created.
   −
  db configuration setprop geoip LicenseKey "YOUR LIC KEY" AccountID "YOUR ACCT ID"
+
The following config property keys and values will be used to set the geoip config db for ongoing updates see below
 +
AccountID #######
 +
LicenseKey xxxxxxxxxxxxxxx
 +
set them in db and expand the config file
 +
  db configuration setprop geoip LicenseKey "YOUR LIC KEY" AccountID "YOUR ACCT ID"  
 +
expand-template  /etc/GeoIP.conf
    
====Update the db====
 
====Update the db====
(only working for geoip2 from 2019/01/03)
   
  signal-event geoip-update
 
  signal-event geoip-update
  −
or if you prefer to reboot your server
  −
signal-event post-upgrade; signal-event reboot
  −
  −
Updating the geoip database is performed by issuing the following command:
  −
  signal-event geoip-update
  −
  −
This contrib adds a template to /etc/crontab to automatically update the database once a month. It's set to do so at midnight on the 5th of each month. If you have a paid subscription through the maintainer of this database (http://dev.maxmind.com/geoip/geoipupdate/) you can update more often. If you do want to update more often, you will have to create a custom template to handle the change. In addition, you will be supplied login credentials that have to be inserted into the file /etc/GeoIP.conf for the update to complete. The file is not templated so it will survive reboots. Use your favorite text editor to insert the information into this file.
  −
  −
====More info on openfusion repo config====
  −
  −
The openfusion repo now includes a number of packages as includes and Excludes, this is to prevent inadvertent system updates occurring when updating the old v1 DB package resulting in unstable or inaccessible systems, this is all they are for. These can be seen here:
  −
db yum_repositories show openfusion
      
==Testing==
 
==Testing==
Super Admin, Wiki & Docs Team, Bureaucrats, Interface administrators, Administrators
3,240

edits

Navigation menu