May 2017 Archives

Installing DigiPal - Part 2, Scripts and Configuration

Once you have all the parts installed, there is some configuration that the Dockerfile takes care of automatically that you will have to do by hand

Postgres

(The AWS-way to do this would be to spin up a Postgres RDS instance, but that was too many variables for a first try. I leave it as an exercise to the reader)

  • Login to postgres and create a digipal DB and digipal user, for that the instructions in GitHub are accurate, see the databasesection, until the step that starts "After that, run in your terminal the following commands:". 

  • By default postgres is not configured to allow password login locally, only "account" based socket login. You need to change that by editing /var/lib/pgsql93/data/pg_hba.conf. Set the line that looks like 

local   all             all                                   ident

to be

local   all             all                                     md5

Replace ident with md5 and restart postgres. You can now continue in the GitHub instructions from "After that, run in your terminal the following commands:"

Lighttpd

  • Add to /etc/lighttpd/lighttpd.conf, at the endinclude "vhosts.d/digipal.conf"
  • uncomment in /etc/lighttpd/modules.confinclude "conf.d/fastcgi.conf"
  • create /etc/lighttpd/vhosts.d/digipal.conf
#include_shell "/usr/share/lighttpd/create-mime.assign.pl"
#include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
fastcgi.server = ( "/iip/iipsrv.fcgi" =>
  (( "host" => "127.0.0.1",
     "port" => 9000,
     "check-local" => "disable",
     "min-procs" => 1,
     "max-procs" => 1,
     "bin-path" => "/etc/lighttpd/iipsrv.fcgi",
     "bin-environment" => (
        "LOGFILE" => "/tmp/iipsrv.log",
        "VERBOSITY" => "10",
        "MAX_IMAGE_CACHE_SIZE" => "20",
#        "FILENAME_PATTERN" => "_pyr_",
        "JPEG_QUALITY" => "75",
        "MAX_CVT" => "3000",
        "FILESYSTEM_PREFIX" => "/apps/digipal/images/"
      )
  ))
)

NB. you will need to set the FILESYSTEM_PREFIX as needed for your environment

  • Copy iipserv.cgi to /etc/lighttpd/ and set it as executable: chmod a+rx /etc/lighttpd/iipserv.cgi

Access

As I have my system configured these apps are not accessable to the outside world, but only to localhost. When I want to use it, I ssh to the machine and do local port forwarding, i.e.ssh -L 8000:localhost:8000 -L 8081:localhost:8081 ${USER}@${SERVER}The port 8000 is used for the web server, 8081 for the image server (that's what lighttpd does). You should then be able to access your digipal by pointing a browser to http://localhost:8000

NB. this worked for me, after some hacking around, but I provide no guarantee that these instructions are complete.  Moniti estis

About this Archive

This page is an archive of entries from May 2017 listed from newest to oldest.

April 2017 is the previous archive.

May 2019 is the next archive.

Find recent content on the main index or look in the archives to find all content.

OpenID accepted here Learn more about OpenID