How to Install Nominatim on Fedora Server Latest

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.

Prerequisites

Before you start with the installation, make sure you have the following:

Step 1: Install Dependencies

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

Step 2: Install Nominatim

  1. Download the latest version of Nominatim from the official website by running the following command in the terminal:
wget https://nominatim.org/release/Nominatim-3.7.3.tar.bz2
  1. Extract the downloaded file using the following command:
tar -xvf Nominatim-3.7.3.tar.bz2
  1. Change the directory to the extracted folder:
cd Nominatim-3.7.3
  1. Run the following command to install Nominatim:
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.

  1. The installation process will take some time to complete. After it finishes, you can start the Nominatim service by running:
sudo systemctl start nominatim.service
  1. Finally, run the following command to enable the service to start automatically on system boot:
sudo systemctl enable nominatim.service

Step 3: Configure PostgreSQL

  1. Open the PostgreSQL configuration file by running the following command in the terminal:
sudo nano /var/lib/pgsql/data/pg_hba.conf
  1. Add the following line to the end of the file:
local   all             nominatim                                trust
  1. Save and close the file by pressing Ctrl+X, followed by Y, and then Enter.

  2. Restart PostgreSQL by running:

sudo systemctl restart postgresql.service

Step 4: Test Nominatim

  1. Open your web browser and enter the following URL:
http://localhost/nominatim/search.php?q=Empire%20State%20Building&format=json
  1. If Nominatim is installed correctly, you should see a JSON response with the search results for "Empire State Building".

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!