IIPImage JPEG2000: Installation step by step

IIPImage can be installed on Linux, Mac or Windows. The provided binary package is for Linux only. To install and use the provided package for IIPImage you will need a Linux server installed with the latest stable version of Debian GNU/Linux or any other Debian-based distributions such as Ubuntu Linux.

Note: This step by step guide is installing Lighttpd webserver. To use the IIPImage software with another webserver like Apache please follow the original Server Documentation.

Fast step by step installation for Ubuntu:

1. Download the .deb package: for 32-bit system: iipimage-0.9.9-watermark-jp2-i386.deb or for 64-bit: iipimage-0.9.9-watermark-jp2-i386.deb 
2. Double-click and press the "Install package" button
3. Open "Applications" -> "Accessories" -> "Terminal" and type there:

sudo apt-get install lighttpd

sudo ln -s /etc/iipimage/iipimage-lighttpd.conf /etc/lighttpd/conf-available/99-iipimage.conf
sudo lighty-enable-mod iipimage
sudo /etc/init.d/lighttpd force-reload

sudo ln -s /usr/share/iipimage/www /var/www/iip

4. Open in Firefox the demo image: http://localhost/iip/ or http://address.to.your.server/iip/

Finished! You should see the zoomable image.
Now you can experiment with the viewers, customize the look&feel, add your own .jp2 or .tiff images, etc.

Alternative detailed command-line installation for a Debian server:

Here are the commands with comments to install IIPImage from the terminal.

1. Install prerequisites

sudo apt-get install libfcgi libjpeg62 libtiff4 zlib1g libstdc++6

2. Download and install the package with IIPImage and JPEG2000 support

wget http://oldmapsonline.googlecode.com/files/iipimage-0.9.9-jp2_i386.deb # or .._amd64.deb
sudo dpkg -i iipimage-0.9.9-jp2_i386.deb

The `iipsrv.fcgi` Fast CGI binary is installed into `/usr/lib/cgi-bin`.

3. Install and configure the Lighttpd webserver

A prepared Lighttpd configuration file is packaged with IIPImage.
First link it into the Lighttpd configuration directory and then enable it:

sudo apt-get install lighttpd
sudo ln -s /etc/iipimage/iipimage-lighttpd.conf /etc/lighttpd/conf-available/99-iipimage.conf
sudo lighty-enable-mod iipimage
sudo /etc/init.d/lighttpd force-reload

You can edit the *bin-environment* field in this file to configure IIPImage. Check the manual page of IIPImage for details about the Environment variables.

4. Link the default IIPMooViewer into the webserver root directory:

sudo ln -s /usr/share/iipimage/www /var/www/iip

5. Test if IIPImage is running correctly and view the sample .jp2 image

Open a web browser like Firefox and point it to the server web address, by the default image with the IIPMooViewer is now available at the /iip/ url of the server.

To test the availability of the image server you can always try: http://localhost/cgi-bin/iipsrv.fcgi
You should see the welcome screen of the IIPImage server.

The web viewers are internally always calling the iipsrv.fcgi script, where part of the request is always the path to the .jp2 or .tif files.
So you can point the viewers to your own files.

More documentation:

List of the alternative pan&zoom viewers - feel free to copy&paste the code or customize it for your need.