How to install Nominatim on MXLinux Latest

In this tutorial, we will guide you through the process of installing Nominatim on your MXLinux Latest system. Nominatim is a powerful and open-source geocoding system that can be used to search addresses and places from around the world. The installation process is straightforward and requires some basic command-line knowledge.

Step 1 – Installing dependencies

Before installing Nominatim, we need to install some system dependencies. Open up a terminal and run the following command to install the required packages:

sudo apt-get update && sudo apt-get install build-essential cmake g++ libboost-dev libboost-system-dev \
libboost-filesystem-dev libexpat1-dev zlib1g-dev libbz2-dev libpq-dev \
postgresql-server-dev-12 postgresql-12-postgis-3 postgresql-contrib-12 \
php php-pgsql php-intl libicu-dev libxml2-dev libgeos-dev libgeos++-dev libgdal-dev \
npm nodejs osmium-tool

Step 2 – Downloading and extracting Nominatim

Next, we need to download and extract the latest release of Nominatim. Open your web browser and navigate to the following link to download the latest version:

https://nominatim.org/release/Nominatim-3.6.1.tar.bz2

Once the download is complete, open up a terminal and navigate to the directory where you downloaded the file. Extract the file using the following command:

tar -xvf Nominatim-3.6.1.tar.bz2

Step 3 – Building and installing Nominatim

Next, we need to build Nominatim from the source code. Navigate to the extracted directory using the following command:

cd Nominatim-3.6.1

Run the following command to configure the build process:

mkdir build
cd build
cmake ..

Once the configure process is complete, run the following command to build and install Nominatim:

make
sudo make install

Step 4 – Configuring Nominatim

Finally, we need to configure Nominatim to work with our system. Run the following commands to configure the PostgreSQL database:

sudo su postgres
createuser nominatim
psql
ALTER USER nominatim WITH PASSWORD 'password';
create database nominatim with owner nominatim;
\q
exit

Next, run the following command to create a Nominatim configuration file:

sudo cp ~/Nominatim-3.6.1/settings/local.php.sample ~/Nominatim-3.6.1/settings/local.php

Open the file using your favorite text editor and update the following configuration parameters:

@define('CONST_Database_DSN', 'pgsql://nominatim:password@localhost/nominatim');
@define('CONST_Osm2pgsql_Binary', '/usr/bin/osm2pgsql');

Once the configuration is updated, run the following command to initialize the database:

sudo /usr/local/bin/nominatim refresh --index

Step 5 – Running Nominatim

Congratulations! You have successfully installed and configured Nominatim on your MXLinux Latest system. To use Nominatim, run the following command:

sudo /usr/local/bin/nominatim

You can now access Nominatim from your web browser by navigating to the following URL:

http://localhost/nominatim/search.php?q=your-query

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!