Last active
June 7, 2021 08:58
Revisions
-
coder4web revised this gist
Apr 14, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -152,7 +152,7 @@ font_dir_recurse=1 # @see OSM Carto Stylesheet section: XML=/usr/local/src/osm_tile_server/openstreetmap-carto/mapnik.xml HOST=127.0.0.1:8880 URI=/tile/ CMD_EOF nano /etc/httpd/conf.d/mod_tile.conf -
coder4web revised this gist
Apr 7, 2020 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,8 +4,8 @@ # Updated to latest CentOS / deps packages # Dependencies sudo yum install git gdal sqlite geos boost curl libcurl libicu bzip2-devel zlib-devel libxml2-devel python-setuptools proj-devel proj proj-epsg proj-nad libicu-devel gdal-devel sqlite-devel libcurl-devel geos-devel protobuf-devel protobuf-c-devel lua-devel cmake proj boost-thread proj-devel autoconf automake libtool pkgconfig ragel gtk-doc glib2 glib2-devel libtool-ltdl-devel python-devel boost-devel cabextract xorg-x11-font-utils fontconfig perl-DBD-Pg mesa-libGLU-devel sudo yum install cairo pycairo cairo-devel pycairo-devel freetype freetype-devel harfbuzz harfbuzz-devel harfbuzz-icu libjpeg libjpeg-devel libpng libpng-devel libtiff libtiff-devel libwebp libwebp-devel sudo mkdir -p /usr/local/src/osm_tile_server cd /usr/local/src/osm_tile_server # custom source dir with user's RW access rights -
coder4web revised this gist
Apr 7, 2020 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,8 @@ # Updated to latest CentOS / deps packages # Dependencies sudo yum install git libpng libtiff libjpeg freetype gdal cairo pycairo sqlite geos boost curl libcurl libicu bzip2-devel libtiff-devel zlib-devel libjpeg-devel libxml2-devel python-setuptools proj-devel proj proj-epsg proj-nad freetype-devel libicu-devel gdal-devel sqlite-devel libcurl-devel cairo-devel pycairo-devel geos-devel protobuf-devel protobuf-c-devel lua-devel cmake proj boost-thread proj-devel autoconf automake libtool pkgconfig ragel gtk-doc glib2 glib2-devel libtool-ltdl-devel python-devel harfbuzz harfbuzz-devel harfbuzz-icu boost-devel cabextract xorg-x11-font-utils fontconfig perl-DBD-Pg mesa-libGLU-devel sudo yum install libpng libpng-devel libwebp libwebp-devel sudo mkdir -p /usr/local/src/osm_tile_server cd /usr/local/src/osm_tile_server # custom source dir with user's RW access rights -
coder4web revised this gist
Apr 7, 2020 . 1 changed file with 2 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -69,14 +69,13 @@ export PATH=$PATH:/usr/pgsql-12/bin:/usr/pgsql-12/lib:/usr/local/lib source /etc/profile.d/pgsql.sh git clone git://github.com/mapnik/mapnik cd mapnik git submodule sync git submodule update --init deps/mapbox/variant git submodule update --init deps/mapbox/geometry git submodule update --init deps/mapbox/polylabel git submodule update --init deps/mapbox/protozero ./bootstrap.sh ./configure make sudo make install sudo ldconfig -
coder4web revised this gist
Apr 7, 2020 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,10 @@ cd /usr/local/src/osm_tile_server # custom source dir with user's RW access righ ln -s /usr/local/src/osm_tile_server ~ # Mapnik and mod_tile now requires C++14 compliant compiler (-std=c++14) # https://www.softwarecollections.org/ sudo yum install centos-release-scl # https://www.softwarecollections.org/en/scls/rhscl/devtoolset-8/ # https://www.softwarecollections.org/en/scls/rhscl/llvm-toolset-7/ sudo yum install devtoolset-9 llvm-toolset-7 scl enable devtoolset-9 llvm-toolset-7 bash -
coder4web revised this gist
Apr 7, 2020 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,9 +14,8 @@ ln -s /usr/local/src/osm_tile_server ~ sudo yum install centos-release-scl sudo yum install devtoolset-9 llvm-toolset-7 scl enable devtoolset-9 llvm-toolset-7 bash gcc --version #9.x.x clang --version #5.x.x # PostgreSQL / Postgres Pro -
coder4web revised this gist
Apr 7, 2020 . No changes.There are no files selected for viewing
-
coder4web revised this gist
Apr 7, 2020 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,6 +23,10 @@ clang --version #5.x.x # @see https://gist.github.com/coder4web/c6d7c3810518063f80ed145e1ed0e562 # @see https://github.com/openstreetmap/osm2pgsql/blob/master/install-postgis-osm-db.sh # PostGIS 3 # https://postgis.net/install/ yum install postgis30_12 postgis30_12-utils postgis30_12-client ogr_fdw12 pgrouting_12 # db / user setup if [ -z $DBOWNER ]; then DBOWNER=gis -
coder4web revised this gist
Apr 7, 2020 . 1 changed file with 0 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,6 @@ # Based on next manuals: # Ubuntu 18.04 LTS: https://switch2osm.org/manually-building-a-tile-server-18-04-lts/ # CentOS 7 - https://www.hyperlearning.ai/en/knowledgebase/blog/centos-7-open-street-map-tile-server # Updated to latest CentOS / deps packages # Dependencies @@ -32,8 +31,6 @@ if [ -z $DBNAME ]; then DBNAME=gis fi # CREATE DATABASE gis WITH ENCODING = 'UTF8'; sudo -u postgres createdb -EUTF8 -O $DBOWNER $DBNAME sudo -u postgres createuser --no-superuser --no-createdb --no-createrole "$DBOWNER" || true -
coder4web revised this gist
Apr 6, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -103,7 +103,7 @@ sudo make install cd .. # Import Map Data into PostgreSQL export PATH=$PATH:/usr/pgsql-12/bin mkdir ~/osm_data cd ~/osm_data wget -c https://download.bbbike.org/osm/bbbike/Moscow/Moscow.osm.pbf -
coder4web revised this gist
Apr 6, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ # Updated to latest CentOS / deps packages # Dependencies sudo yum install git libpng libtiff libjpeg freetype gdal cairo pycairo sqlite geos boost curl libcurl libicu bzip2-devel libpng-devel libtiff-devel zlib-devel libjpeg-devel libxml2-devel python-setuptools proj-devel proj proj-epsg proj-nad freetype-devel libicu-devel gdal-devel sqlite-devel libcurl-devel cairo-devel pycairo-devel geos-devel protobuf-devel protobuf-c-devel lua-devel cmake proj boost-thread proj-devel autoconf automake libtool pkgconfig ragel gtk-doc glib2 glib2-devel libpng libpng-devel libwebp libtool-ltdl-devel python-devel harfbuzz harfbuzz-devel harfbuzz-icu boost-devel cabextract xorg-x11-font-utils fontconfig perl-DBD-Pg mesa-libGLU-devel sudo mkdir -p /usr/local/src/osm_tile_server cd /usr/local/src/osm_tile_server # custom source dir with user's RW access rights -
coder4web revised this gist
Apr 6, 2020 . 1 changed file with 12 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -25,9 +25,19 @@ clang --version #5.x.x # @see https://github.com/openstreetmap/osm2pgsql/blob/master/install-postgis-osm-db.sh # db / user setup if [ -z $DBOWNER ]; then DBOWNER=gis fi if [ -z $DBNAME ]; then DBNAME=gis fi psql -h 127.0.0.1 # CREATE DATABASE gis WITH ENCODING = 'UTF8'; sudo -u postgres createdb -EUTF8 -O $DBOWNER $DBNAME sudo -u postgres createuser --no-superuser --no-createdb --no-createrole "$DBOWNER" || true sudo -u postgres createlang plpgsql $DBNAME || true \c gis @@ -36,7 +46,6 @@ CREATE EXTENSION postgis; CREATE EXTENSION hstore; \dx CREATE USER apache WITH password '***'; GRANT ALL ON schema public TO apache; GRANT ALL ON ALL TABLES IN SCHEMA public TO apache; -
coder4web revised this gist
Apr 6, 2020 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -51,7 +51,9 @@ SELECT pg_size_pretty(pg_database_size('gis')); # mapnik # https://mapnik.org/ sudo nano /etc/profile.d/pgsql.sh :'SRC export PATH=$PATH:/usr/pgsql-12/bin:/usr/pgsql-12/lib:/usr/local/lib ' source /etc/profile.d/pgsql.sh git clone git://github.com/mapnik/mapnik cd mapnik -
coder4web revised this gist
Apr 6, 2020 . 1 changed file with 2 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -42,23 +42,12 @@ GRANT ALL ON schema public TO apache; GRANT ALL ON ALL TABLES IN SCHEMA public TO apache; GRANT ALL ON ALL SEQUENCES IN SCHEMA public TO apache; GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA public TO apache; ALTER TABLE geometry_columns OWNER TO apache; ALTER TABLE spatial_ref_sys OWNER TO apache; psql -h 127.0.0.1 -d gis SELECT pg_size_pretty(pg_database_size('gis')); # mapnik # https://mapnik.org/ sudo nano /etc/profile.d/pgsql.sh -
coder4web revised this gist
Apr 6, 2020 . 1 changed file with 17 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -24,12 +24,24 @@ clang --version #5.x.x # @see https://gist.github.com/coder4web/c6d7c3810518063f80ed145e1ed0e562 # @see https://github.com/openstreetmap/osm2pgsql/blob/master/install-postgis-osm-db.sh # db / user setup psql -h 127.0.0.1 createdb -E UTF8 gis CREATE DATABASE gis WITH ENCODING = 'UTF8'; \c gis # Spatial Extentions CREATE EXTENSION postgis; CREATE EXTENSION hstore; \dx CREATE USER osm WITH password '***'; CREATE USER apache WITH password '***'; GRANT ALL ON schema public TO apache; GRANT ALL ON ALL TABLES IN SCHEMA public TO apache; GRANT ALL ON ALL SEQUENCES IN SCHEMA public TO apache; GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA public TO apache; psql -h 127.0.0.1 -d gis SELECT pg_size_pretty(pg_database_size('gis')); -
coder4web revised this gist
Apr 3, 2020 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,10 +13,10 @@ ln -s /usr/local/src/osm_tile_server ~ # Mapnik and mod_tile now requires C++14 compliant compiler (-std=c++14) sudo yum install centos-release-scl sudo yum install devtoolset-9 llvm-toolset-7 scl enable devtoolset-9 bash gcc --version #9.x.x scl enable llvm-toolset-7 bash clang --version #5.x.x -
coder4web revised this gist
Apr 3, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ # Based on next manuals: # Ubuntu 18.04 LTS: https://switch2osm.org/manually-building-a-tile-server-18-04-lts/ # CentOS 7 - https://www.hyperlearning.ai/en/knowledgebase/blog/centos-7-open-street-map-tile-server # CentOS 6 - http://gis-lab.info/qa/mod_tile.html#.D0.9D.D0.B0.D1.81.D1.82.D1.80.D0.BE.D0.B9.D0.BA.D0.B0_renderd (on Russian) # Updated to latest CentOS / deps packages -
coder4web revised this gist
Apr 10, 2019 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,6 +9,7 @@ sudo yum install git libpng libtiff libjpeg freetype gdal cairo cairo-devel pyca sudo mkdir -p /usr/local/src/osm_tile_server cd /usr/local/src/osm_tile_server # custom source dir with user's RW access rights ln -s /usr/local/src/osm_tile_server ~ # Mapnik and mod_tile now requires C++14 compliant compiler (-std=c++14) sudo yum install centos-release-scl @@ -134,7 +135,7 @@ font_dir_recurse=1 [default] # @see OSM Carto Stylesheet section: XML=/usr/local/src/osm_tile_server/openstreetmap-carto/mapnik.xml HOST=127.0.0.1:8880 URI=/osm_tiles/ CMD_EOF -
coder4web revised this gist
Apr 10, 2019 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -142,7 +142,6 @@ CMD_EOF nano /etc/httpd/conf.d/mod_tile.conf # TODO: source sudo mkdir /var/run/renderd sudo mkdir /var/lib/mod_tile sudo chown apache /var/lib/mod_tile -
coder4web revised this gist
Apr 10, 2019 . 1 changed file with 20 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -119,8 +119,26 @@ cd .. # -------------------- # Renderd and mod_tile # -------------------- # /usr/local/etc/renderd.conf sudo cat >/usr/local/etc/renderd.conf <<CMD_EOF [renderd] socketname=/var/run/renderd/renderd.sock num_threads=2 tile_dir=/var/lib/mod_tile stats_file=/var/run/renderd/renderd.stats [mapnik] plugins_dir=/usr/local/lib/mapnik/input font_dir=/usr/local/lib/mapnik/fonts font_dir_recurse=1 [default] # @see OSM Carto Stylesheet section: XML=/usr/local/src/osm/openstreetmap-carto/mapnik.xml HOST=127.0.0.1:8880 URI=/osm_tiles/ CMD_EOF nano /etc/httpd/conf.d/mod_tile.conf # TODO: source -
coder4web revised this gist
Apr 10, 2019 . 1 changed file with 20 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -134,8 +134,26 @@ sudo chown apache /var/run/renderd sudo su -l apache -s /usr/local/bin/renderd -f -c /usr/local/etc/renderd.conf # renderd.service sudo cat >/lib/systemd/system/renderd.service <<CMD_EOF [Unit] Description=Mapnik rendering daemon After=syslog.target After=network.target [Service] User=apache Environment="PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin" ExecStart=/usr/local/bin/renderd -f -c /usr/local/etc/renderd.conf #WorkingDirectory= ExecReload=/bin/kill -HUP $MAINPID KillMode=process Restart=on-failure [Install] WantedBy=multi-user.target CMD_EOF sudo systemctl enable renderd sudo systemctl start renderd tail -f /var/log/messages |grep renderd -
coder4web revised this gist
Apr 9, 2019 . 1 changed file with 6 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -133,8 +133,12 @@ sudo chown apache /var/run/renderd # test foreground launch sudo su -l apache -s /usr/local/bin/renderd -f -c /usr/local/etc/renderd.conf # renderd.service # TODO: source sudo cp renderd.service /lib/systemd/system/ sudo systemctl enable renderd sudo systemctl start renderd tail -f /var/log/messages |grep renderd # -------------------- # Apache2 service -
coder4web revised this gist
Apr 9, 2019 . 1 changed file with 12 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,9 @@ # Based on next manuals: # Ubuntu 18.04 LTS: https://switch2osm.org/manually-building-a-tile-server-18-04-lts/ # CentOS 7 - https://www.keisan.io/en/knowledgebase/centos-7-open-street-map-tile-server # CentOS 6 - http://gis-lab.info/qa/mod_tile.html#.D0.9D.D0.B0.D1.81.D1.82.D1.80.D0.BE.D0.B9.D0.BA.D0.B0_renderd (on Russian) # Updated to latest CentOS / deps packages # Dependencies sudo yum install git libpng libtiff libjpeg freetype gdal cairo cairo-devel pycairo sqlite geos boost curl libcurl libicu bzip2-devel libpng-devel libtiff-devel zlib-devel libjpeg-devel libxml2-devel python-setuptools proj-devel proj proj-epsg proj-nad freetype-devel libicu-devel gdal-devel sqlite-devel libcurl-devel cairo-devel pycairo-devel geos-devel protobuf-devel protobuf-c-devel lua-devel cmake proj boost-thread proj-devel autoconf automake libtool pkgconfig ragel gtk-doc glib2 glib2-devel libpng libpng-devel libwebp libtool-ltdl-devel python-devel harfbuzz harfbuzz-devel harfbuzz-icu boost-devel cabextract xorg-x11-font-utils fontconfig perl-DBD-Pg mesa-libGLU-devel @@ -20,7 +19,7 @@ gcc --version #7.x.x scl enable llvm-toolset-7 bash clang --version #5.x.x # PostgreSQL / Postgres Pro # @see https://gist.github.com/coder4web/c6d7c3810518063f80ed145e1ed0e562 # @see https://github.com/openstreetmap/osm2pgsql/blob/master/install-postgis-osm-db.sh @@ -121,9 +120,9 @@ cd .. # Renderd and mod_tile # -------------------- nano /usr/local/etc/renderd.conf # TODO: source nano /etc/httpd/conf.d/mod_tile.conf # TODO: source # Start Renderd sudo mkdir /var/run/renderd @@ -133,3 +132,11 @@ sudo chown apache /var/run/renderd # test foreground launch sudo su -l apache -s /usr/local/bin/renderd -f -c /usr/local/etc/renderd.conf # renderd service # TODO! # -------------------- # Apache2 service # -------------------- systemctl start httpd.service -
coder4web revised this gist
Apr 9, 2019 . 1 changed file with 7 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,18 +22,22 @@ clang --version #5.x.x # Postgres Pro # @see https://gist.github.com/coder4web/c6d7c3810518063f80ed145e1ed0e562 # @see https://github.com/openstreetmap/osm2pgsql/blob/master/install-postgis-osm-db.sh # must be run by superuser! createdb -E UTF8 gis #CREATE DATABASE gis WITH ENCODING = 'UTF8'; psql gis -c 'CREATE EXTENSION postgis; CREATE EXTENSION hstore;' psql gis < /usr/pgsql-11/share/contrib/postgis-2.5/postgis.sql psql gis < /usr/pgsql-11/share/contrib/postgis-2.5/spatial_ref_sys.sql psql -h 127.0.0.1 -d gis SELECT pg_size_pretty(pg_database_size('gis')); # main db user createuser apache -W # @see https://github.com/openstreetmap/osm2pgsql/blob/master/install-postgis-osm-user.sh #echo "grant all on geometry_columns to apache;" | psql gis #echo "grant all on spatial_ref_sys to apache;" | psql gis psql -h 127.0.0.1 -d gis -U postgres -
coder4web revised this gist
Apr 9, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -91,7 +91,7 @@ export PATH=$PATH:/usr/pgsql-11/bin mkdir ~/osm_data cd ~/osm_data wget -c https://download.bbbike.org/osm/bbbike/Moscow/Moscow.osm.pbf osm2pgsql -d gis --create --slim -G --hstore --tag-transform-script ~/osm_tile_server/openstreetmap-carto/openstreetmap-carto.lua -C 2500 --number-processes 1 -S ~/osm_tile_server/openstreetmap-carto/openstreetmap-carto.style ~/osm_data/Moscow.osm.pbf #psql -h 127.0.0.1 -d gis -U osm #osm2pgsql -H 127.0.0.1 -d gis -U osm --slim -C 1600 --number-process 1 -S /usr/local/share/osm2pgsql/default.style Moscow.osm.pbf -
coder4web revised this gist
Apr 9, 2019 . 1 changed file with 8 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,12 +22,14 @@ clang --version #5.x.x # Postgres Pro # @see https://gist.github.com/coder4web/c6d7c3810518063f80ed145e1ed0e562 createuser osm -W createdb -E UTF8 -O osm gis #CREATE DATABASE gis WITH ENCODING = 'UTF8'; psql gis -c 'CREATE EXTENSION postgis; CREATE EXTENSION hstore;' psql gis < /usr/pgsql-11/share/contrib/postgis-2.5/postgis.sql psql gis < /usr/pgsql-11/share/contrib/postgis-2.5/spatial_ref_sys.sql psql -h 127.0.0.1 -d gis -U osm SELECT pg_size_pretty(pg_database_size('gis')); @@ -86,9 +88,12 @@ cd .. # Import Map Data into PostgreSQL export PATH=$PATH:/usr/pgsql-11/bin mkdir ~/osm_data cd ~/osm_data wget -c https://download.bbbike.org/osm/bbbike/Moscow/Moscow.osm.pbf osm2pgsql -d gis -U osm --create --slim -G --hstore-all --tag-transform-script ~/osm_tile_server/openstreetmap-carto/openstreetmap-carto.lua -C 2500 --number-processes 1 -S ~/osm_tile_server/openstreetmap-carto/openstreetmap-carto.style ~/osm_data/Moscow.osm.pbf #psql -h 127.0.0.1 -d gis -U osm #osm2pgsql -H 127.0.0.1 -d gis -U osm --slim -C 1600 --number-process 1 -S /usr/local/share/osm2pgsql/default.style Moscow.osm.pbf # mod_tile - renders and serves map tiles using Apache and mapnik # https://github.com/openstreetmap/mod_tile -
coder4web revised this gist
Apr 9, 2019 . 1 changed file with 8 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -32,8 +32,14 @@ psql -h 127.0.0.1 -d gis -U osm SELECT pg_size_pretty(pg_database_size('gis')); createuser apache -W #echo "grant all on geometry_columns to apache;" | psql gis #echo "grant all on spatial_ref_sys to apache;" | psql gis psql -h 127.0.0.1 -d gis -U postgres \c gis GRANT ALL ON schema public TO apache; GRANT ALL ON ALL TABLES IN SCHEMA public TO apache; GRANT ALL ON ALL SEQUENCES IN SCHEMA public TO apache; GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA public TO apache; # mapnik # https://mapnik.org/ -
coder4web revised this gist
Apr 9, 2019 . 1 changed file with 15 additions and 14 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,6 +23,7 @@ clang --version #5.x.x # Postgres Pro # @see https://gist.github.com/coder4web/c6d7c3810518063f80ed145e1ed0e562 CREATE DATABASE gis WITH ENCODING = 'UTF8'; psql gis -c 'CREATE EXTENSION postgis; CREATE EXTENSION hstore;' psql gis < /usr/pgsql-11/share/contrib/postgis-2.5/postgis.sql psql gis < /usr/pgsql-11/share/contrib/postgis-2.5/spatial_ref_sys.sql @@ -54,6 +55,20 @@ sudo make install sudo ldconfig cd .. # carto AKA CartoCSS - is a language for map design, allowing you to edit the style of maps including shapes, polygons, fonts and colours # https://github.com/mapbox/carto/ sudo yum install nodejs #Carto can be installed via NodeJS npm -v #3.10.10 sudo npm install -g carto # OpenStreetMap Carto - stylesheet for the standard map layer for Open Street Map-based maps # https://github.com/gravitystorm/openstreetmap-carto git clone git://github.com/gravitystorm/openstreetmap-carto.git cd openstreetmap-carto # Compile and download shape files carto project.mml > mapnik.xml scripts/get-shapefiles.py # osm2pgsql - converts OpenStreetMap data to postGIS-enabled PostgreSQL databases. # https://wiki.openstreetmap.org/wiki/Osm2pgsql git clone git://github.com/openstreetmap/osm2pgsql.git @@ -87,20 +102,6 @@ sudo make install-mod_tile sudo ldconfig cd .. # -------------------- # Renderd and mod_tile # -------------------- -
coder4web revised this gist
Apr 3, 2019 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -114,6 +114,6 @@ sudo mkdir /var/run/renderd sudo mkdir /var/lib/mod_tile sudo chown apache /var/lib/mod_tile sudo chown apache /var/run/renderd # test foreground launch sudo su -l apache -s /usr/local/bin/renderd -f -c /usr/local/etc/renderd.conf -
coder4web revised this gist
Apr 3, 2019 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,9 @@ # Based on next manuals: # CentOS 7 - https://www.keisan.io/en/knowledgebase/centos-7-open-street-map-tile-server # CentOS 6 - http://gis-lab.info/qa/mod_tile.html#.D0.9D.D0.B0.D1.81.D1.82.D1.80.D0.BE.D0.B9.D0.BA.D0.B0_renderd (on Russian) # Updated to latest CentOS / deps packages # WORK IN PROGRESS! INCOMPLETE FOR NOW! # Dependencies sudo yum install git libpng libtiff libjpeg freetype gdal cairo cairo-devel pycairo sqlite geos boost curl libcurl libicu bzip2-devel libpng-devel libtiff-devel zlib-devel libjpeg-devel libxml2-devel python-setuptools proj-devel proj proj-epsg proj-nad freetype-devel libicu-devel gdal-devel sqlite-devel libcurl-devel cairo-devel pycairo-devel geos-devel protobuf-devel protobuf-c-devel lua-devel cmake proj boost-thread proj-devel autoconf automake libtool pkgconfig ragel gtk-doc glib2 glib2-devel libpng libpng-devel libwebp libtool-ltdl-devel python-devel harfbuzz harfbuzz-devel harfbuzz-icu boost-devel cabextract xorg-x11-font-utils fontconfig perl-DBD-Pg mesa-libGLU-devel
NewerOlder