= Set up GPSphoto server on CentOS = * Install a bare web server * Add the Epel repository {{{ yum install epel-release }}} * In order for GPSphoto to work you also need the following packages: {{{ yum install mod_wsgi python-webob python-pillow python2-boto python-dateutil pytz }}} * To make sure exif data is kept with the images install piexif (attached) '''Does not seem to be needed''' {{{ yum install piexif-1.0.7-1.noarch.rpm }}} * For KML export functionality install simplekml (attached) {{{ yum install python-lxml simplekml-1.3.0-1.noarch.rpm }}} * For geojson support install {{{ yum install python-geojson }}} * For cookie management in WSGI install the following: {{{ yum install python2-cookies }}} * To use Google openid authentication install: {{{ yum install mod_auth_openidc }}} == PostgresQL / PostGIS == If you chose postgis as your DB back-end, continue with this section. If you prefer sqlite, which is more lightweight, but also does not scale that well continue at the next section. Get the latest postgres / postgis by install the Yum repo from https://yum.postgresql.org/repopackages.php and install the following packages: {{{ yum install postgresql96-server postgresql96 postgresql96-contrib postgis2_96 postgis2_96-utils\ postgis2_96-client python-psycopg2 python-psycopg2-doc ogr_fdw96 pgrouting_96 }}} Edit /etc/sysconfig/pgsql/postgresql-9.6 to contain the following content: {{{ PGPORT=5440 }}} Initialize the database and start and enable it: {{{ /usr/pgsql-9.6/bin/postgresql96-setup initdb systemctl enable postgresql-9.6.service systemctl start postgresql-9.6 }}} Make sure the path is updated by creating /var/lib/pgsql/.pgsql_profile with the content: {{{ export PATH=/usr/pgsql-9.5/bin:$PATH }}} Create the DB schema: {{{ su -i postgres createdb mapserver createuser mapserver psql mapserver > alter user mapserver with password > CREATE EXTENSION postgis; > CREATE EXTENSION postgis_topology; > CREATE EXTENSION ogr_fdw; }}} To verify the install do: {{{ SELECT postgis_full_version(); }}} === Load the gpsphoto table === {{{ psql -f gpsphoto/table.sql -d mapserver }}} === update postgresql configuration === Add the following line to /var/lib/pgsql/9.6/data/postgresql.conf {{{ listen_addresses = '*' }}} Comment all original lines in pg_hba.conf and put the following at the bottom: {{{ local all all md5 host all all 127.0.0.1/32 md5 host all all ::1/128 md5 }}} Add the following line to pg_ident.conf: {{{ gpsphoto apache mapserver }}} === Selinux for Postgres / Apache === Allow httpd to connect to postgres: {{{ setsebool -P httpd_can_network_connect_db 1 }}} == Spatialite == * install spatiallite if you chose SQLite as the backend DB from the epel repository: {{{ yum install libspatialite }}} Also install pyspatialite (attached on this page) and if you want to be able to create and modify the spatialite db having spatialite-tools (also attached) is advised: {{{ yum install spatialite-tools-4.1.1-13.el7.centos.x86_64.rpm pyspatialite-2.6.2_spatialite.2.4.0_4-1.x86_64.rpm }}} == QGIS Server == {{{ http://gpsphoto.fritz.box/qgis/qgis_mapserv.fcgi?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities&map=/var/www/wms/project.qgs }}} == Useful tools and commands == print detailed exif information of image: {{{ identify -verbose P1100818.JPG }}}