Problem
Install manually the mod_maxminddb module into Apache2 in Ubuntu 20.04.
Analysis, Prereq & Prep
The module is not included by default.
1. Install the libmaxminddb library
As root or sudo:
# add-apt-repository ppa:maxmind/ppa
# aptitude update
# aptitude install libmaxminddb0 libmaxminddb-dev mmdb-bin
2. Install the apachee2-dev package
For your apache version:
# aptitude install apache2-dev
Solution
1. Get the latest mod_maxminddb
Get the latest version from: https://github.com/maxmind/mod_maxminddb/releases
# wget https://github.com/maxmind/mod_maxminddb/releases/download/1.2.0/mod_maxminddb-1.2.0.tar.gz
2. Unzip , configure and install:
# tar zxvf ./mod_maxminddb-1.2.0.tar.gz
# cd mod_maxminddb-1.2.0
# ./configure
# make install
# systemctl restart apache2
This will install the new module and enable. Check if installed:
# apachectl -M | grep maxminddb
3. Install the GeoIP Databases
You need to register to download the GeoIP databases from MaxMind.
- Permalinks: https://www.maxmind.com/en/accounts/1161519/geoip/downloads
- Updating GeoIP and GeoLite Databases: https://dev.maxmind.com/geoip/updating-databases/
4. Configure Apache2
…
References
- Install and Enable Mod_maxminddb for Geolocation
- Installing Apache Module mod_maxminddb, December 26, 2018 by Giorgio
Installing mod_maxminddb to Apache2 in Ubuntu 20.04