Code Monkey home page Code Monkey logo

viewer's Introduction

Manuscripta webapp (OBSOLETE)

This version of the eXist-db webapp for manuscripta.se is obsolete and does not reflect the current online version. The new webapp will be released in a different repository in the coming months.

Installation instructions

Install Apache2 with mod_fastcgi

sudo apt-get install apache2 libapache2-mod-fastcgi

In Ubuntu 16.04 it is necessary to enable the multiverse repository in /etc/apt/sources.list

sudo a2enmod fastcgi

sudo apache2ctl graceful

Install build essentials

sudo apt-get install build-essential git autoconf automake libtool checkinstall pkg-config

Install IIP Image Server

Install memcached

sudo apt-get install memcached libmemcached-dev

Build IIP

cd ~/

git clone https://github.com/ruven/iipsrv

cd iipsrv

sudo apt-get install libjpeg-dev libtiff-dev

./autogen.sh

./configure

make

sudo mkdir /var/www/html/fcgi-bin

sudo cp src/iipsrv.fcgi /var/www/html/fcgi-bin/iipsrv.fcgi

Configure Apache for IIP

Add the following to /etc/apache2/apache2.conf

# Create a directory for the iipsrv binary
ScriptAlias /iipsrv/ "/var/www/html/fcgi-bin/"

# Set the options on that directory
<Directory "/iipsrv/">
   AllowOverride None
   Options None

# Syntax for access is different in Apache 2.4 - uncomment appropriate version
# Apache 2.2
#   Order allow,deny
#   Allow from all

# Apache 2.4
   Require all granted

</Directory>

# Set the module handler
AddHandler fastcgi-script fcg fcgi fpl

# Initialise some variables for the FCGI server
FastCgiServer /var/www/html/fcgi-bin/iipsrv.fcgi \
-initial-env LOGFILE=/tmp/iipsrv.log \
-initial-env VERBOSITY=2 \
-initial-env FILESYSTEM_PREFIX=/srv/images/ \
-initial-env MAX_IMAGE_CACHE_SIZE=20 \
-initial-env JPEG_QUALITY=90 \
-initial-env MAX_CVT=5000

Restart Apache

sudo service apache2 restart

Install Open JDK

sudo apt-get install ant openjdk-8-jdk

Set JAVA_HOME

sudo nano /etc/environment

Add: JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"

Load variable

source /etc/environment

Build eXist-db

Create directory for eXist-db

sudo mkdir /usr/local/lib/exist

Create directory for eXist database

sudo mkdir /usr/local/lib/exist-data

Change user and group for eXist directories

sudo chown $USER:staff exist

sudo chown $USER:staff exist-data

Clone eXist-db from GitHub

cd /usr/local/lib/exist

git clone https://github.com/eXist-db/exist .

Change eXist data directory

cp build.properties local.build.properties

Edit local.build.properties

Change config.dataDir = webapp/WEB-INF/data to config.dataDir = /usr/local/lib/exist-data

Change config.journalDir = webapp/WEB-INF/data to config.journalDir = /usr/local/lib/exist-data

Build eXist-db

./build.sh

Edit conf.xml to preserve whitespace in mixed content

sudo nano /usr/local/eXist/conf.xml

Change preserve-whitespace-mixed-content="no" to preserve-whitespace-mixed-content="yes"in

<indexer caseSensitive="yes" index-depth="5" preserve-whitespace-mixed-content="yes" 
        stemming="no" suppress-whitespace="none"
        tokenizer="org.exist.storage.analysis.SimpleTokenizer" track-term-freq="yes">

Start eXist-db

sudo service eXist-db start

Reverse proxy for eXist-db

sudo a2enmod proxy proxy_http rewrite

Add the following to /etc/apache2/apache2.conf

<VirtualHost *:80>
	ProxyRequests       off
	ServerName      www.manuscripta.se	
	<Proxy>
	   Order deny,allow
	   Allow from all
	</Proxy>
	ProxyPass       /   http://localhost:8080/exist/apps/manuscripta/
	ProxyPassReverse    /   http://localhost:8080/exist/apps/manuscripta/
	ProxyPassReverseCookieDomain localhost manuscripta.se
	ProxyPassReverseCookiePath / /exist	
</VirtualHost>

Enable Jetty logginig through Apache web proxy

nano /usr/local/lib/exist/tools/jetty/etc/jetty-requestlog.xml

Add <Set name="PreferProxiedForAddress">true</Set> after <Set name="LogTimeZone"><Property name="jetty.requestlog.timezone" deprecated="requestlog.timezone" default="GMT"/></Set>

Restart eXist-db

sudo service eXist-db restart

viewer's People

Contributors

patrikgranholm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.