X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/fa1c402b47bdd1f76b8528885c0e3a5e90731cdc..4cce681ead77ff2e5bdee2e7f1695162c805bbb5:/vagrant/Install-on-Ubuntu-24.sh?ds=sidebyside diff --git a/vagrant/Install-on-Ubuntu-24.sh b/vagrant/Install-on-Ubuntu-24.sh index 05dc38a4..b15eb3d8 100755 --- a/vagrant/Install-on-Ubuntu-24.sh +++ b/vagrant/Install-on-Ubuntu-24.sh @@ -67,7 +67,7 @@ fi #DOCS: # --------------------- # # Tune the postgresql configuration, which is located in -# `/etc/postgresql/14/main/postgresql.conf`. See section *Tuning the PostgreSQL database* +# `/etc/postgresql/16/main/postgresql.conf`. See section *Tuning the PostgreSQL database* # in [the installation page](../admin/Installation.md#tuning-the-postgresql-database) # for the parameters to change. # @@ -98,7 +98,7 @@ fi #DOCS: # if [ "x$1" == "xyes" ]; then #DOCS: :::sh cd $USERHOME - git clone https://github.com/openstreetmap/Nominatim.git + git clone https://github.com/osm-search/Nominatim.git cd Nominatim else #DOCS: cd $USERHOME/Nominatim #DOCS: @@ -116,6 +116,10 @@ fi #DOCS: virtualenv $USERHOME/nominatim-venv +# We want the faster binary version pf psycopg, so install that: + + $USERHOME/nominatim-venv/bin/pip install psycopg[binary] + # Now install Nominatim using pip: cd $USERHOME/Nominatim @@ -124,9 +128,11 @@ fi #DOCS: # Nominatim is now ready to use. The nominatim binary is available at # `$USERHOME/venv/bin/nominatim`. If you want to have 'nominatim' in your # path, simply activate the virtual environment: - - - +# +#DOCS:```sh +# . $USERHOME/nominatim-venv/bin/activate +#DOCS:``` +# # You can continue with # [importing a database from OSM data](../admin/Import.md). If you want to set up # the API frontend first, continue reading. @@ -135,13 +141,13 @@ fi #DOCS: # ============================== # # The Python frontend is contained in the nominatim-api package. To run -# the API as a webservice, you also need falcon with uvicorn/gunicorn to -# serve the API. +# the API as a webservice, you also need falcon with uvicorn to serve the API. +# It is generally recommended to run falcon/uvicorn on top of gunicorn. # # To install all packages, run: #DOCS:```sh -$USERHOME/nominatim-venv/bin/pip install psycopg[binary] falcon uvicorn gunicorn +$USERHOME/nominatim-venv/bin/pip install falcon uvicorn gunicorn cd $USERHOME/Nominatim $USERHOME/nominatim-venv/bin/pip install packaging/nominatim-api #DOCS:``` @@ -174,14 +180,11 @@ Requires=nominatim.socket [Service] Type=simple -Environment="PYTHONPATH=/usr/local/lib/nominatim/lib-python/" User=www-data Group=www-data WorkingDirectory=$USERHOME/nominatim-project -ExecStart=$USERHOME/nominatim-venv/bin/gunicorn -b unix:/run/nominatim.sock -w 4 -k uvicorn.workers.UvicornWorker nominatim_api.server.falcon.server:run_wsgi +ExecStart=$USERHOME/nominatim-venv/bin/gunicorn -b unix:/run/nominatim.sock -w 4 -k uvicorn.workers.UvicornWorker "nominatim_api.server.falcon.server:run_wsgi()" ExecReload=/bin/kill -s HUP \$MAINPID -StandardOutput=append:/var/log/gunicorn-nominatim.log -StandardError=inherit PrivateTmp=true TimeoutStopSec=5 KillMode=mixed @@ -248,7 +251,8 @@ else #DOCS: sudo systemctl restart apache2 fi #DOCS: -# The Nominatim API is now available at `http://localhost/nominatim/`. +# The Nominatim API is now available at `http://localhost/nominatim/`. Point your browser +# to the status output `http://localhost/nominatim/status` to test if everything is ok. fi #DOCS: @@ -294,6 +298,7 @@ else #DOCS: sudo systemctl restart nginx fi #DOCS: -# The Nominatim API is now available at `http://localhost/nominatim/`. +# The Nominatim API is now available at `http://localhost/nominatim/`. Point your browser +# to the status output `http://localhost/nominatim/status` to test if everything is ok. fi #DOCS: