User:Vincent 95/installation osm142
Jump to navigation
Jump to search
- création du user fhayat
- postgresql 9.6 (https://www.postgresql.org/download/linux/debian/) :
- sudo echo 'deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main' > /etc/apt/sources.list.d/pgdg.list
- wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \
- sudo apt-key add -
- sudo apt-get update
- sudo apt-get install postgresql-9.6
- sudo apt-get install postgresql-9.6-postgis-2.3
- sudo apt-get install postgresql-server-dev-9.6 #pour utilery
- sudo su
- mkdir /data/pgdata
- chown postgres:postgres /data/pgdata/
- sudo -u postgres -s
- /usr/lib/postgresql/9.6/bin/initdb /data/pgdata
- /usr/lib/postgresql/9.6/bin/pg_ctl -D /data/pgdata -l logfile start
- createuser -d -r -s vtile
- createdb -E UTF8 -O vtile template_postgis
- ## ajout des extensions hstore, postgis,btree_gist
- ## postgis-vt-util.sql
- cd
- wget https://raw.githubusercontent.com/mapbox/postgis-vt-util/master/postgis-vt-util.sql
- psql -d template_postgis -f postgis-vt-util.sql
- createdb -E UTF8 -O vtile -T template_postgis vtile
- nginx
- suivi de http://nginx.org/en/linux_packages.html#distributions
- configuration : modif de /etc/nginx/conf.d/default.conf
server { listen [::]:80; listen 80; server_name vtile.openstreetmap.fr;
- sudo /usr/sbin/nginx -s reload
- imposm
- cd /app
- wget https://imposm.org/static/rel/imposm3-0.3.0dev-20170119-353bc5d-linux-x86-64.tar.gz
- gunzip https://imposm.org/static/rel/imposm3-0.3.0dev-20170119-353bc5d-linux-x86-64.tar.gz
- tar xf imposm3-0.3.0dev-20170119-353bc5d-linux-x86-64.tar
- mv imposm3-0.3.0dev-20170119-353bc5d-linux-x86-64 imposm3
- chargement
/app/imposm3/imposm3 import -read /data/download/ile-de-france-latest.osm.pbf -cachedir /data/tmp_idf -diff -mapping mapping.yml -overwritecache
/app/imposm3/imposm3 import -write -cachedir /data/tmp_idf -diff -mapping mapping.yml -connection 'postgis://vtile@localhost/imposm' -dbschema-import import_idf
- curl
sudo apt-get install curl
- zip
sudo apt-get install zip
- Node
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install nodejs
- Fonts
git clone https://github.com/openmaptiles/fonts.git
sudo npm install genfontgl
cd fonts/
./generate.sh
cp -r _deploy /usr/share/nginx/html/jb/glyphs
chmod -R a+rwx /usr/share/nginx/html/jb/glyphs
- utilery
- cf https://github.com/tilery/utilery/blob/master/docs/install.md
- cd /data/work//project/
- sudo mkdir utilery
- virtualenv utilery --python=/usr/bin/python3.4
- cd utilery
- source bin/activate
- git clone https://github.com/etalab/utilery
- cd utilery
- pip install .
- pip install -r requirements.txt
- pip install gunicorn
- Configuration
- export UTILERY_SETTINGS=/data/work/utilery/utilery/utilery/config/default.py
- Edition du fichier default.py
- gunicorn utilery.views:app -b 0.0.0.0:8080 -w 8 --access-logfile=- --log-file=-