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.
Before you start installing Nominatim, you will need the following:
Follow these steps to install Nominatim on Void Linux:
Open a Terminal window on your Void Linux system.
Update your system's package list:
sudo xbps-install -S
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
git clone --recursive https://github.com/openstreetmap/Nominatim.git
cd Nominatim
./autogen.sh
./configure
make
sudo make install
Once you have installed Nominatim on your system, you will need to configure it.
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;"
./utils/setup.php --osm-file /path/to/osm.pbf --all --threads
./utils/setup.php --osm-file /path/to/osm.pbf --all --import-wikipedia-data
sudo service nominatim start
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!