How to Install Nominatim on Void Linux

Nominatim is an open source tool for searching and geocoding addresses and places. In this tutorial, you will learn how to install Nominatim on Void Linux.

Prerequisites

Before you start installing Nominatim, you will need the following:

Installation

Follow these steps to install Nominatim on Void Linux:

  1. Open a Terminal window on your Void Linux system.

  2. Update your system's package list:

sudo xbps-install -S
  1. Install the required dependencies:
sudo xbps-install -y autoconf automake bzip2 cmake curl g++ gcc git libbz2-dev libicu-dev libprotobuf-dev libxml2-dev libxslt1-dev make protobuf-compiler python3-setuptools python3-dev zlib1g-dev
  1. Clone Nominatim source code from GitHub:
git clone --recursive https://github.com/openstreetmap/Nominatim.git
  1. Navigate to the Nominatim source code directory:
cd Nominatim
  1. Configure the build:
./autogen.sh 
./configure
  1. Build the software:
make
  1. Install Nominatim:
sudo make install

Configuration

Once you have installed Nominatim on your system, you will need to configure it.

  1. Download the data from OpenStreetMap:
sudo mkdir /srv/nominatim
sudo chown $USER /srv/nominatim
curl https://www.nominatim.org/data/wikipedia_article_categories.sql.gz -o wikipedia_article_categories.sql.gz
curl https://www.nominatim.org/data/wikipedia_redirects.sql.gz -o wikipedia_redirects.sql.gz
curl https://www.nominatim.org/data/wikipedia.sql.gz -o wikipedia.sql.gz
curl https://www.nominatim.org/data/shapefiles.tar.bz2 -o shapefiles.tar.bz2

sudo -u postgres createuser -s $USER
createdb nominatim

sudo -u postgres psql nominatim -c "CREATE EXTENSION postgis; CREATE EXTENSION postgis_topology; CREATE EXTENSION fuzzystrmatch; CREATE EXTENSION postgis_tiger_geocoder;"
  1. Import the data into Nominatim:
./utils/setup.php --osm-file /path/to/osm.pbf --all --threads
./utils/setup.php --osm-file /path/to/osm.pbf --all --import-wikipedia-data
  1. Start the server:
sudo service nominatim start
  1. Test the server:
http://localhost/nominatim/reverse.php?lat=51.50643&lon=-0.12721&format=html

That's it! You have now successfully installed Nominatim on your Void Linux system.

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!