Nominatim is an open-source tool that allows you to search addresses, building names, and points of interest on a map. In this tutorial, we will walk through the steps to install Nominatim on a Fedora Server.
Before you start with the installation, make sure you have the following:
Open the terminal and run the following command to install the necessary dependencies:
sudo dnf install gcc-c++ proj-devel gdal-devel geos-devel protobuf-c-devel protobuf-compiler bzip2-devel flex bison php php-pgsql postgresql-server postgresql-contrib postgis osmium-tool
wget https://nominatim.org/release/Nominatim-3.7.3.tar.bz2
tar -xvf Nominatim-3.7.3.tar.bz2
cd Nominatim-3.7.3
sudo ./utils/setup.php --osm-file <PATH_TO_OSM_FILE> --all --osm2pgsql-cache 16000 2>&1 | tee setup.log
Note: Replace <PATH_TO_OSM_FILE>
with the path to the OSM file you want to use.
sudo systemctl start nominatim.service
sudo systemctl enable nominatim.service
sudo nano /var/lib/pgsql/data/pg_hba.conf
local all nominatim trust
Save and close the file by pressing Ctrl+X
, followed by Y
, and then Enter
.
Restart PostgreSQL by running:
sudo systemctl restart postgresql.service
http://localhost/nominatim/search.php?q=Empire%20State%20Building&format=json
Congratulations! You have successfully installed Nominatim on Fedora Server. You can now start using it to search for addresses, building names, and points of interest on a map.
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!