赞
踩
sudo apt update -qq
sudo apt install -y build-essential cmake g++ libboost-dev libboost-system-dev \
libboost-filesystem-dev libexpat1-dev zlib1g-dev \
libbz2-dev libpq-dev liblua5.3-dev lua5.3 lua-dkjson \
nlohmann-json3-dev postgresql-14-postgis-3 \
postgresql-contrib-14 postgresql-14-postgis-3-scripts \
php-cli php-pgsql php-intl libicu-dev python3-dotenv \
python3-psycopg2 python3-psutil python3-jinja2 \
python3-icu python3-datrie python3-sqlalchemy \
python3-asyncpg python3-yaml git
sudo useradd -d /srv/nominatim -s /bin/bash -m nominatim
sudo -u nominatim bash
export USERNAME=nominatim
export USERHOME=/srv/nominatim
chmod a+x $USERHOME
sudo systemctl restart postgresql
sudo -u postgres createuser -s $USERNAME
sudo -u postgres createuser www-data
cd $USERHOME
git clone --recursive https://github.com/openstreetmap/Nominatim.git
cd Nominatim
wget -O data/country_osm_grid.sql.gz https://www.nominatim.org/data/country_grid.sql.gz
mkdir $USERHOME/build
cd $USERHOME/build
cmake $USERHOME/Nominatim
make
sudo make install
wget http://download.geofabrik.de/asia/china-latest.osm.pbf
nominatim import --osm-file china-latest.osm.pbf
dropdb nominatim
nominatim admin --check-database
nominatim index
sudo apt install -y apache2 libapache2-mod-php
7.2创建一个网站目录
mkdir $USERHOME/nominatim-project
原端口5432 新端口 15432
pgsql:后加上修改端口 port=15432;
nominatim refresh --website
sudo systemctl restart apache2
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。