In this tutorial, we will learn how to install Nominatim, a powerful tool for searching OpenStreetMap data, on OpenSUSE.
Before installing any package, it is a good practice to update the system repositories and packages to the latest version. To do that, open a terminal and run:
sudo zypper update
To run Nominatim, we need several packages installed on the system. In addition, we will install some required libraries for building the code from the repository. Run the following command in the terminal to install the required packages:
sudo zypper install gcc-c++ cmake make automake libtool \
apache2 apache2-devel libcurl4 libxml2-devel \
libgeos-devel libgeos-c-devel libpqxx-devel \
libproj-devel gdal-devel postgresql-server-devel \
postgresql-contrib postgresql \
postgresql-server postgis postgresql-libs \
sudo bzip2 wget
Now, we will download the Nominatim source code from the GitHub repository and build it. Open a terminal and run the following commands:
sudo su - nominatim
cd ~
wget https://github.com/openstreetmap/Nominatim/archive/v3.7.2.tar.gz
tar xfz v3.7.2.tar.gz
cd Nominatim-3.7.2
./autogen.sh
./configure
make
Now, we will install Nominatim on the system. Run the following commands to install it:
sudo make install
sudo make install-data
sudo make install-doc
sudo make install-nominatim-module
sudo make install-systemd
Now, we will configure Nominatim to work with our OpenStreetMap data. Run the following commands to do that:
sudo -u postgres createuser nominatim
sudo -u postgres createdb nominatim
sudo -u postgres psql nominatim
nominatim=# \q
sudo -u nominatim ./utils/setup.php --osm-file <path-to-your-OSM-data-file> --all --osm2pgsql-cache 1024 2>&1 | tee setup.log
Replace <path-to-your-OSM-data-file>
with the path to your OpenStreetMap data file.
Finally, we will start Nominatim on the system. Run the following commands to do that:
sudo systemctl enable nominatim
sudo systemctl start nominatim
In this tutorial, we have learned how to install and configure Nominatim, a powerful tool for searching OpenStreetMap data, on OpenSUSE. Now, you can use Nominatim to search and geocode OpenStreetMap data on your OpenSUSE 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!