-
Notifications
You must be signed in to change notification settings - Fork 0
/
iip.conf
executable file
·49 lines (34 loc) · 1.27 KB
/
iip.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#! /bin/bash
set -x
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install apache2
sudo a2enmod fcgid
sudo apt-get install git
#Install the IIP server
sudo apt-get install iipimage-server
#The iipserver executable, iipsrv.fcgi, is installed in /usr/lib, but Apache2
#can only access files in /usr/share/ and /var/www, (unless you fiddle with permissions,
#so move to /usr/share
sudo cp -r /usr/lib/iipimage-server /usr/share/
cd /etc/apache2/mods-available
#The iipMOOViewer likes fcgi-bin as the server name
sudo sed -i 's/\/iipsrv\//\/fcgi-bin\//' iipsrv.conf
sudo sed -i 's/\"iipsrv\"/\"fcgi-bin\"/' iipsrv.conf
#We moved the iipsrv.fcgi executable to /usr/share
sudo sed -i 's/\/usr\/lib/\/usr\/share/' iipsrv.conf
#Enable the iipsrv module
sudo a2enmod iipsrv
#Now get the IIPMOOViewer
cd /tmp
sudo git clone https://github.com/ruven/iipmooviewer.git
#Copy everything to apache root
sudo cp -r iipmooviewer/* /var/www/html
sudo rm -rf iipmooviewer
#Get test image file
sudo mkdir /usr/share/images
sudo wget http://merovingio.c2rmf.cnrs.fr/iipimage/PalaisDuLouvre.tif -O /usr/share/images/PalaisDuLouvre.tif
#Point to the test image file
cd /var/www/html
sudo sed -i 's/\/path\/to\/image.tif/\/usr\/share\/images\/PalaisDuLouvre.tif/' index.html
sudo apachectl restart