# Has the installation process changed? - GeoLite2-City.mmdb - What is the full path?

**URL:** <https://forum.mautic.org/t/has-the-installation-process-changed-geolite2-city-mmdb-what-is-the-full-path/5226>\
**Category:** Product Support\
**Created:** [April 9, 2016, 7:15pm UTC](https://forum.mautic.org/t/has-the-installation-process-changed-geolite2-city-mmdb-what-is-the-full-path/5226 "2016-04-09T19:15:57Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![CraigM](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@CraigM](https://forum.mautic.org/u/CraigM)\
**Post date:** [April 9, 2016, 7:15pm UTC](https://forum.mautic.org/t/has-the-installation-process-changed-geolite2-city-mmdb-what-is-the-full-path/5226/1 "2016-04-09T19:15:57Z")

</div>

I am getting stuck on Step 3 of the Getting Started page. I am not able to find the option to download the GeoLite2-City database ([https://www.mautic.org/docs/setup/getting\_started.html](https://www.mautic.org/docs/setup/getting_started.html)).  
  
  
  
When I look in the mautic\_prod-2016-04-09.php log file I see this error:  
  
  
  
[2016-04-09 19:24:39] mautic.WARNING: IP LOOKUP: The file “/home1/username/public\_html/mautic/app/cache/prod/…/ip\_data/GeoLite2-City.mmdb” does not exist or is not readable. [] []  
  
  
  
The Getting Started page directs you to " On the System Settings tab, find the IP lookup service option and click the “Fetch IP Lookup Data Store.”".  
  
  
  
The “Ip lookup service” options, when the drop down is opened, extends past the edge of my monitor and I cannot see any “Fetch” options. When I scroll within the opened drop box, no fetch options are revealed.  
  
  
  
When I search the server for the “ip-data” path as indicated in the error log it is not present on my shared server.  
  
  
  
Has the installation process changed?  
  
  
  
If I download the database from [MaxMind.com](http://MaxMind.com) what is the correct path. The path in the log file is truncated (prod/…/ip\_data/)  
  
  
  
I know this is basic, but darn I am searching, reading and exploring the forums looking for answers. I’m failing but it is not for a lack of trying.  
  
  
  
Your comments will be welcomed.  
  
  
  
CraigM

---

<div class="post-metadata">

**Author:** ![CraigM](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@CraigM](https://forum.mautic.org/u/CraigM)\
**Post date:** [April 10, 2016, 2:59pm UTC](https://forum.mautic.org/t/has-the-installation-process-changed-geolite2-city-mmdb-what-is-the-full-path/5226/2 "2016-04-10T14:59:04Z")

</div>

If I knew how I would mark this question as: SOLVED

---

<div class="post-metadata">

**Author:** ![CraigM](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@CraigM](https://forum.mautic.org/u/CraigM)\
**Post date:** [April 10, 2016, 2:55pm UTC](https://forum.mautic.org/t/has-the-installation-process-changed-geolite2-city-mmdb-what-is-the-full-path/5226/3 "2016-04-10T14:55:36Z")

</div>

So that others can follow along I recorded what I did to update MaxMinds’s GeoLite2-City database monthly as MaxMind releases database updates…

Here it is:

How to Obtain and update MaxMinds’s GeoLite2-City database.

1. Go to [http://dev.maxmind.com/geoip/geoip2/geolite2/](http://dev.maxmind.com/geoip/geoip2/geolite2/) and download the “MaxMind DB binary, gzipped” version.

2. Extract the resulting file from GeoLite2-City.mmdb.gz to GeoLite2-City.mmdb using PKZip or other compression utility.

3. Copy (ftp) the file GeoLite2-City.mmdb to your server: (directory-structure)/public\_html/mautic/app/cache/ip\_data

Note: Modifying (directory-structure) to reflect your server’s directory structure. Your directory structure can be determined in your C Panel under “Account Information” or by using your C Panel’s File Manager. In File Manager at the top of the Directory tree (on the left) you will see a little house Icon. That is your (directory structure).

Note: I copied (ftp) the file to ensure that I was able to create the file in the ip\_data directory which should already be present under the current release of Mautic. If it does not exist, create it.

Create the update-maxmind-database Cron Job for IP Lookup

1. Create a blank update-maxmind-database.txt file in notepad and paste the following into it modifying (directory-structure) to reflect your server directory structure.

`#!/bin/bash
wget -N -P (directory-structure)/public_html/mautic/app/cache/ip_data http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz
gunzip -f (directory-structure)/public_html/mautic/app/cache/ip_data/*.gz`

1. Save the file as update-maxmind-database.txt

2. Copy (ftp) the update-maxmind-database.txt to the (directory-structure) directory. In my case I put it in the root directory.

3. Rename your file (update-maxmind-database.txt) it removing the .txt to update-maxmind-database using the File Manager from your C Panel.

4. Change the file permissions to full read, write, execute permissions using the File Manager from your C Panel.

Create a new Cron Job from within your C Panel as follows:

1. Enter your Cron Jon Command string as follows:

```auto
(directory-structure)/update-maxmind-database
```

Note: Modify (directory-structure) to reflect your server directory structure.

1. Set Cron Job to run every 5 minutes.

2. Delete the database file: (directory-structure)/public\_html/mautic/app/cache/ip\_data/GeoLite2-City.mmdb.

3. Let the Cron job run.

4. Check the resulting Cron Job notification email to ensure that the database downloaded and extracted from .gz to .mmdb

5. Check that the database file was created: (directory-structure)/public\_html/mautic/app/cache/ip\_data/GeoLite2-City.mmdb.

Note: The database file may have the same creation date as the original you deleted. The file date will change monthly as new .mmdb files are created by MaxMind.

1. Add the suffix to the right end of the Cron Job to suppress error logs.

```auto
>/dev/null 2>&1
```

1. Change Cron Job to run sometime after the first Tuesday of each month. This is to reflect MaxMinds, database updates on the first Tuesday of each month.

Note: The current database in your file structure is overwritten each time the Cron Job runs. No additonal files are created and the .gz file is removed as well. Once the Cron Job is running no additional maitenance is required. Just let it run, occasionally checking that the date of the file is updated to reflect that month’s database update.

Cron Job, Final Command Line string:

```auto
(directory-structure)/update-maxmind-database >/dev/null 2>&1
```

CraigM

---

<div class="post-metadata">

**Author:** ![CraigM](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@CraigM](https://forum.mautic.org/u/CraigM)\
**Post date:** [April 9, 2016, 7:15pm UTC](https://forum.mautic.org/t/has-the-installation-process-changed-geolite2-city-mmdb-what-is-the-full-path/5226/4 "2016-04-09T19:15:57Z")

</div>

I am getting stuck on Step 3 of the Getting Started page. I am not able to find the option to download the GeoLite2-City database ([https://www.mautic.org/docs/setup/getting\_started.html](https://www.mautic.org/docs/setup/getting_started.html)).

When I look in the mautic\_prod-2016-04-09.php log file I see this error:

[2016-04-09 19:24:39] mautic.WARNING: IP LOOKUP: The file “/home1/username/public\_html/mautic/app/cache/prod/…/ip\_data/GeoLite2-City.mmdb” does not exist or is not readable. [] []

The Getting Started page directs you to " On the System Settings tab, find the IP lookup service option and click the “Fetch IP Lookup Data Store.”".

The “Ip lookup service” options, when the drop down is opened, extends past the edge of my monitor and I cannot see any “Fetch” options. When I scroll within the opened drop box, no fetch options are revealed.

When I search the server for the “ip-data” path as indicated in the error log it is not present on my shared server.

Has the installation process changed?

If I download the database from [MaxMind.com](http://MaxMind.com) what is the correct path. The path in the log file is truncated (prod/…/ip\_data/)

I know this is basic, but darn I am searching, reading and exploring the forums looking for answers. I’m failing but it is not for a lack of trying.

Your comments will be welcomed.

CraigM

---

<div class="post-metadata">

**Author:** ![CraigM](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@CraigM](https://forum.mautic.org/u/CraigM)\
**Post date:** [April 9, 2016, 7:39pm UTC](https://forum.mautic.org/t/has-the-installation-process-changed-geolite2-city-mmdb-what-is-the-full-path/5226/5 "2016-04-09T19:39:12Z")

</div>

I stand corrected, I found the ip\_data directory located at: /public\_html/mautic/app/cache/ip\_data

I downloaded the GeoLite2 City database from: [http://dev.maxmind.com/geoip/geoip2/geolite2/](http://dev.maxmind.com/geoip/geoip2/geolite2/)

I then extracted the mmdb file and copied it to the ip\_data directory.

I logged out and back into Mautic. My Cron Jobs have run with no further entries into the logs.

MaxMind has a complicated automatic update install that is beyond me at [http://dev.maxmind.com/geoip/geoipupdate/](http://dev.maxmind.com/geoip/geoipupdate/)

Any Ideas how to get the auto update function to work?

Thanks, CraigM

---

<div class="post-metadata">

**Author:** ![mbrinson](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mbrinson/32/116_2.png) [@mbrinson](https://forum.mautic.org/u/mbrinson)\
**Post date:** [November 16, 2016, 9:52pm UTC](https://forum.mautic.org/t/has-the-installation-process-changed-geolite2-city-mmdb-what-is-the-full-path/5226/6 "2016-11-16T21:52:58Z")

</div>

Has anyone else run into a problem using wget to download the updated maxmind database file? When I try it, I get this error:

```auto
ERROR 503: Service Temporarily Unavailable.
```

But it works fine when I browse to that url in a regular browser. I think I need to setup wget to use a proxy server, but I don’t have a proxy server. I looked a little while to see if there was a free proxy server I could use for the /etc/wgetrc file, but no luck.

---

<div class="post-metadata">

**Author:** ![Yosu\_Cadilla](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/yosu_cadilla/32/6206_2.png) [@Yosu\_Cadilla](https://forum.mautic.org/u/Yosu_Cadilla)\
**Post date:** [January 19, 2020, 8:41pm UTC](https://forum.mautic.org/t/has-the-installation-process-changed-geolite2-city-mmdb-what-is-the-full-path/5226/7 "2020-01-19T20:41:16Z")

</div>

Hi guys, I just published a post about how to fix the MaxMind Geolite2 database in 2020:

> **[\[Solved\] Maxmind GeoLite2 Database not Updating. | mauteam.org](https://mauteam.org/mautic/mautic-admins/solved-maxmind-geolite2-database-not-updating/)**
>
> If you just installed Mautic in 2020, you might have noticed the Maxmind IP lookup doesn’t seem to work anymore. That’s because Maxmind has changed the method to obtain the latest updated databases…

---

<div class="post-metadata">

**Author:** ![quangmai911](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/quangmai911/32/1471_2.png) [@quangmai911](https://forum.mautic.org/u/quangmai911)\
**Post date:** [January 20, 2020, 1:22am UTC](https://forum.mautic.org/t/has-the-installation-process-changed-geolite2-city-mmdb-what-is-the-full-path/5226/8 "2020-01-20T01:22:25Z")

</div>

Thanks so much Yosu. This is exactly what I am looking for. I stuck with this issues for a couple weeks now. Especially, the last note is very important, do NOT press the button to update!!! 😊

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [January 20, 2020, 2:13pm UTC](https://forum.mautic.org/t/has-the-installation-process-changed-geolite2-city-mmdb-what-is-the-full-path/5226/9 "2020-01-20T14:13:40Z")

</div>

Take a look at this PR which just came in: [https://github.com/mautic/mautic/pull/8337](https://github.com/mautic/mautic/pull/8337) (please test if you are able - I’ve asked for more detailed test instructions)

---

<div class="post-metadata">

**Author:** ![dennisameling](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dennisameling/32/958_2.png) [@dennisameling](https://forum.mautic.org/u/dennisameling)\
**Post date:** [January 28, 2020, 10:07am UTC](https://forum.mautic.org/t/has-the-installation-process-changed-geolite2-city-mmdb-what-is-the-full-path/5226/10 "2020-01-28T10:07:15Z")

</div>

I just merged [https://github.com/mautic/mautic/pull/8337](https://github.com/mautic/mautic/pull/8337) into the staging branch, which means this PR will make it into Mautic 2.16 (expected beta release on Jan 30). This is a short term fix which maintains current Maxmind behavior. For long term consideration, please read my comment on the PR: [https://github.com/mautic/mautic/pull/8337#issuecomment-578953976](https://github.com/mautic/mautic/pull/8337#issuecomment-578953976)

---

<div class="post-metadata">

**Author:** ![Yosu\_Cadilla](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/yosu_cadilla/32/6206_2.png) [@Yosu\_Cadilla](https://forum.mautic.org/u/Yosu_Cadilla)\
**Post date:** [January 28, 2020, 6:27pm UTC](https://forum.mautic.org/t/has-the-installation-process-changed-geolite2-city-mmdb-what-is-the-full-path/5226/11 "2020-01-28T18:27:43Z")

</div>

@dennisameling what do you mean with:

> [@dennisameling](#):
>
> This is a short term fix which maintains current Maxmind behavior.

---

<div class="post-metadata">

**Author:** ![dennisameling](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dennisameling/32/958_2.png) [@dennisameling](https://forum.mautic.org/u/dennisameling)\
**Post date:** [January 28, 2020, 7:14pm UTC](https://forum.mautic.org/t/has-the-installation-process-changed-geolite2-city-mmdb-what-is-the-full-path/5226/12 "2020-01-28T19:14:10Z")

</div>

@Yosu_Cadilla by “short term” I mean that it’s a quick fix that allows us to make tests in the Mautic `staging` branch pass again (as mentioned in the PR), so that we can work towards the 2.16 release. By “current Maxmind behavior” I mean that the functionality to activate IP lookup in Mautic won’t change, so users can just activate Maxmind via the GUI without having to install additional dependencies/tools 🙂

---

<div class="post-metadata">

**Author:** ![Yosu\_Cadilla](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/yosu_cadilla/32/6206_2.png) [@Yosu\_Cadilla](https://forum.mautic.org/u/Yosu_Cadilla)\
**Post date:** [January 28, 2020, 7:27pm UTC](https://forum.mautic.org/t/has-the-installation-process-changed-geolite2-city-mmdb-what-is-the-full-path/5226/13 "2020-01-28T19:27:31Z")

</div>

Got it, thank you for the clarification.

---

<div class="post-metadata">

**Author:** ![deejames](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/deejames/32/677_2.png) [@deejames](https://forum.mautic.org/u/deejames)\
**Post date:** [February 9, 2020, 6:25pm UTC](https://forum.mautic.org/t/has-the-installation-process-changed-geolite2-city-mmdb-what-is-the-full-path/5226/14 "2020-02-09T18:25:14Z")

</div>

Hi,

How do I solve this error?  
/usr/local/cpanel/bin/jailshell: -c: line 0: syntax error near unexpected token `/update-maxmind-database' /usr/local/cpanel/bin/jailshell: -c: line 0: `(/home2/deejays)/update-maxmind-database’

---

<div class="post-metadata">

**Author:** ![deejames](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/deejames/32/677_2.png) [@deejames](https://forum.mautic.org/u/deejames)\
**Post date:** [February 9, 2020, 8:25pm UTC](https://forum.mautic.org/t/has-the-installation-process-changed-geolite2-city-mmdb-what-is-the-full-path/5226/15 "2020-02-09T20:25:25Z")

</div>

Hi,  
Now I am getting this error message? I took of the parenthesis

/bin/sh: /home2/deejays/update-maxmind-database: No such file or directory

---

<div class="post-metadata">

**Author:** ![sarfaraz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/sarfaraz/32/1158_2.png) [@sarfaraz](https://forum.mautic.org/u/sarfaraz)\
**Post date:** [March 9, 2020, 8:51am UTC](https://forum.mautic.org/t/has-the-installation-process-changed-geolite2-city-mmdb-what-is-the-full-path/5226/17 "2020-03-09T08:51:37Z")

</div>

@Yosu_Cadilla I am getting this error at **step 4**

Using config file /etc/GeoIP.conf

Using database directory /usr/share/GeoIP

Performing get filename request to [https://updates.maxmind.com/app/update\_getfilename?product\_id=GeoLite2-ASN](https://updates.maxmind.com/app/update_getfilename?product_id=GeoLite2-ASN)

error retrieving updates: error creating database writer: error acquiring a lock: open /usr/share/GeoIP/.geoipupdate.lock: permission denied

Can anyone help me to fix this issue?

---

<div class="post-metadata">

**Author:** ![simas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/simas/32/724_2.png) [@simas](https://forum.mautic.org/u/simas)\
**Post date:** [May 13, 2020, 6:15pm UTC](https://forum.mautic.org/t/has-the-installation-process-changed-geolite2-city-mmdb-what-is-the-full-path/5226/18 "2020-05-13T18:15:00Z")

</div>

Opened an maxmind account, got key, authenticated and dowloaded through Mautic system settings.

Have 1, maybe stupid, question: should i leave my geolite2 update cronjob?
