mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
adapt installation instruction for different frontends
This commit is contained in:
@@ -254,27 +254,70 @@ successfully.
|
|||||||
nominatim admin --check-database
|
nominatim admin --check-database
|
||||||
```
|
```
|
||||||
|
|
||||||
Now you can try out your installation by running:
|
Now you can try out your installation by executing a simple query on the
|
||||||
|
command line:
|
||||||
|
|
||||||
|
``` sh
|
||||||
|
nominatim search --query Berlin
|
||||||
|
```
|
||||||
|
|
||||||
|
or, when you have a reverse-only installation:
|
||||||
|
|
||||||
|
``` sh
|
||||||
|
nominatim reverse --lat 51 --lon 45
|
||||||
|
```
|
||||||
|
|
||||||
|
If you want to run Nominatim as a service, you need to make a choice between
|
||||||
|
running the traditional PHP frontend or the new experimental Python frontend.
|
||||||
|
Make sure you have installed the right packages as per
|
||||||
|
[Installation](Installation.md#software).
|
||||||
|
|
||||||
|
#### Testing the PHP frontend
|
||||||
|
|
||||||
|
You can run a small test server with the PHP frontend like this:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
nominatim serve
|
nominatim serve
|
||||||
```
|
```
|
||||||
|
|
||||||
This runs a small test server normally used for development. You can use it
|
Go to `http://localhost:8088/status.php` and you should see the message `OK`.
|
||||||
to verify that your installation is working. Go to
|
You can also run a search query, e.g. `http://localhost:8088/search.php?q=Berlin`
|
||||||
`http://localhost:8088/status.php` and you should see the message `OK`.
|
or, for reverse-only installations a reverse query,
|
||||||
You can also run a search query, e.g. `http://localhost:8088/search.php?q=Berlin`.
|
e.g. `http://localhost:8088/reverse.php?lat=27.1750090510034&lon=78.04209025`.
|
||||||
|
|
||||||
Note that search query is not supported for reverse-only imports. You can run a
|
|
||||||
reverse query, e.g. `http://localhost:8088/reverse.php?lat=27.1750090510034&lon=78.04209025`.
|
|
||||||
|
|
||||||
|
Do not use this test server in production.
|
||||||
|
To run Nominatim via webservers like Apache or nginx, please continue reading
|
||||||
|
[Deploy the PHP frontend](Deployment-PHP.md).
|
||||||
|
|
||||||
|
#### Testing the Python frontend
|
||||||
|
|
||||||
|
To run the test server against the Python frontend, you must choose a
|
||||||
|
web framework to use, either starlette or falcon. Make sure the appropriate
|
||||||
|
packages are installed. Then run
|
||||||
|
|
||||||
|
``` sh
|
||||||
|
nominatim serve --engine falcon
|
||||||
|
```
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
``` sh
|
||||||
|
nominatim serve --engine starlette
|
||||||
|
```
|
||||||
|
|
||||||
|
Go to `http://localhost:8088/status.php` and you should see the message `OK`.
|
||||||
|
You can also run a search query, e.g. `http://localhost:8088/search.php?q=Berlin`
|
||||||
|
or, for reverse-only installations a reverse query,
|
||||||
|
e.g. `http://localhost:8088/reverse.php?lat=27.1750090510034&lon=78.04209025`.
|
||||||
|
|
||||||
|
Do not use this test server in production.
|
||||||
To run Nominatim via webservers like Apache or nginx, please continue reading
|
To run Nominatim via webservers like Apache or nginx, please continue reading
|
||||||
[Deploy the PHP frontend](Deployment-PHP.md) or
|
|
||||||
[Deploy the Python frontend](Deployment-Python.md).
|
[Deploy the Python frontend](Deployment-Python.md).
|
||||||
|
|
||||||
## Adding search through category phrases
|
|
||||||
|
|
||||||
If you want to be able to search for places by their type through
|
## Enabling search by category phrases
|
||||||
|
|
||||||
|
If you want to be able to search for places by their type using
|
||||||
[special phrases](https://wiki.openstreetmap.org/wiki/Nominatim/Special_Phrases)
|
[special phrases](https://wiki.openstreetmap.org/wiki/Nominatim/Special_Phrases)
|
||||||
you also need to import these key phrases like this:
|
you also need to import these key phrases like this:
|
||||||
|
|
||||||
|
|||||||
@@ -54,6 +54,8 @@ For running Nominatim:
|
|||||||
* [PyICU](https://pypi.org/project/PyICU/)
|
* [PyICU](https://pypi.org/project/PyICU/)
|
||||||
* [PyYaml](https://pyyaml.org/) (5.1+)
|
* [PyYaml](https://pyyaml.org/) (5.1+)
|
||||||
* [datrie](https://github.com/pytries/datrie)
|
* [datrie](https://github.com/pytries/datrie)
|
||||||
|
|
||||||
|
When running the PHP frontend:
|
||||||
* [PHP](https://php.net) (7.3+)
|
* [PHP](https://php.net) (7.3+)
|
||||||
* PHP-pgsql
|
* PHP-pgsql
|
||||||
* PHP-intl (bundled with PHP)
|
* PHP-intl (bundled with PHP)
|
||||||
@@ -83,7 +85,7 @@ Take into account that the OSM database is growing fast.
|
|||||||
Fast disks are essential. Using NVME disks is recommended.
|
Fast disks are essential. Using NVME disks is recommended.
|
||||||
|
|
||||||
Even on a well configured machine the import of a full planet takes
|
Even on a well configured machine the import of a full planet takes
|
||||||
around 2 days. On traditional spinning disks, 7-8 days are more realistic.
|
around 2 days. When using traditional SSDs, 4-5 days are more realistic.
|
||||||
|
|
||||||
## Tuning the PostgreSQL database
|
## Tuning the PostgreSQL database
|
||||||
|
|
||||||
@@ -115,15 +117,6 @@ you might consider setting:
|
|||||||
and even reduce `autovacuum_work_mem` further. This will reduce the amount
|
and even reduce `autovacuum_work_mem` further. This will reduce the amount
|
||||||
of memory that autovacuum takes away from the import process.
|
of memory that autovacuum takes away from the import process.
|
||||||
|
|
||||||
For the initial import, you should also set:
|
|
||||||
|
|
||||||
fsync = off
|
|
||||||
full_page_writes = off
|
|
||||||
|
|
||||||
Don't forget to re-enable them after the initial import or you risk database
|
|
||||||
corruption.
|
|
||||||
|
|
||||||
|
|
||||||
## Downloading and building Nominatim
|
## Downloading and building Nominatim
|
||||||
|
|
||||||
### Downloading the latest release
|
### Downloading the latest release
|
||||||
|
|||||||
Reference in New Issue
Block a user