IIPImage now an official Fedora Package

IIPImage is now an official stable Fedora package and is included out of the box with the new release of Fedora 19! The package is based on a recent build of the development version of iipsrv available from the Github repository.

Information on the Fedora packages is available at https://apps.fedoraproject.org/packages/iipsrv with the package source at http://pkgs.fedoraproject.org/cgit/iipsrv.git

The packages are also included in Fedora-based enterprise distributions such as CentOS and Red Hat Enterprise Linux via the EPEL repository.

To install, simply use the default yum package manager:

sudo yum install iipsrv

This will install the IIPImage server in /usr/libexec/iipsrv/iipsrv.fcgi

Apache

To use with Apache, you will need to also install the Apache configuration files:

sudo yum install iipsrv-httpd-fcgi

which will install the configuration file iipsrv.conf in /etc/httpd/conf.d/. Modify this if necessary. You can find a full list of possible server parameters here. You will then need to start Apache (or restart if it is already running):

sudo service restart httpd

You should now have the IIPImage server running at  http://your.server/iipsrv

Lighttpd

There is no Lighttpd package at the moment, but to use iipsrv with lighttpd, first install lighttpd and it’s fcgi module (if not already installed):

sudo yum install lighttpd-fastcgi

Then add the following to the fastcgi configuration file /etc/lighttpd/conf.d/fastcgi.conf:

fastcgi.server = ( "/iipsrv" =>
  (( "socket" => "/tmp/iipsrv-fastcgi.socket",
     "check-local" => "disable",
     "min-procs" => 1,
     "max-procs" => 1,
     "bin-path" => "/usr/libexec/iipsrv/iipsrv.fcgi",
     "bin-environment" => (
        "LOGFILE" => "/tmp/iipsrv.log",
        "VERBOSITY" => "2",
      )
  ))
)

and activate fastcgi by uncommenting the following line from /etc/lighttpd/modules.conf:

Include "conf.d/fastcgi.conf"

Then start / restart lighttpd:

sudo service restart lighttpd

This will start the IIPImage server at http://your.server/iipsrv

Running as a Service

It is also possible to start the IIPImage server as an independent service without Apache or Lighttpd:

sudo service start iipsrv

which will start the server listening by default on 127.0.0.1 on port 9002. For the systemd-based Fedora, this is configurable by following the instructions in /lib/systemd/system/iipsrv.service. For sysv-based RHEL distributions, this is configurable in /etc/iipsrv/iipsrv.conf. Starting iipsrv this way allows you to use it with Nginx, Tomcat or if you are hosting your web server on a different machine and wish to proxy requests to iipsrv.

Note that if you are using SELinux, connections from Apache to unknown ports are not allowed by default. To fix this, use semanage, the SELinux policy management tool to add it:

sudo semanage port -a -t http_port_t -p tcp 9002

Clients

Only the server is included in this package, so you will need to install a client, such as IIPMooViewer or IIPZoom yourself. Note that the default server URL is /iipsrv and not the usual /fcgi-bin/iipsrv.fcgi, so don’t forget to set this correctly in the viewer configuration of IIPMooViewer, IIPZoom or whichever viewer you choose to use.

Many thanks to Johan Cwiklinkski for creating the package. You can find more details on his blog and on the Redhat bugzilla review.