...
The web application is written as a servlet using GWT. The following command will install Apache HTTPD as well as Tomcat.
Code Block |
---|
borderStyle | solid |
---|
title | Ubuntu |
---|
borderStyle | solid |
---|
|
apt-get -qq -y install apache2 tomcat6
|
...
We need to make two modifications to the tomcat script under Linux. The first one will allow Medici to read from the local file system, the second change will allow the extraction service to run as tomcat (otherwise tomcat gets confused and thinks it is already running). We also bump the memory of tomcat. While this is not required, it might improve performance.
Code Block |
---|
borderStyle | solid |
---|
title | Ubuntu | borderStyle | solid |
---|
|
sed -i -e 's#TOMCAT6_SECURITY=yes#TOMCAT6_SECURITY=no#g' \
-e "s#-x /bin/bash --#--pidfile /tmp/tomcatsh.pid -x /bin/bash --#g" \
-e 's#-Xmx128M#-Xmx256M#' /etc/init.d/tomcat6
|
...
Once the jar files are installed you will need to restart tomcat
Code Block |
---|
borderStyle | solid |
---|
title | Ubuntu | borderStyle | solid |
---|
|
/etc/init.d/tomcat6 restart
|
...
MySQL is used to store the metadata, the database will be created in the next section.
Code Block |
---|
borderStyle | solid |
---|
title | Ubuntu |
---|
borderStyle | solid |
---|
|
apt-get -qq -y install mysql-server-5.1
|
...
FFmpeg is used to convert video to FLV video to be played in the browser as well to extract a single frame from the video.
Code Block |
---|
borderStyle | solid |
---|
title | Ubuntu | borderStyle | solid |
---|
|
wget http://www.medibuntu.org/sources.list.d/`lsb_release -cs`.list --output-document=/etc/apt/sources.list.d/medibuntu.list
apt-get -qq update
apt-get -qq -y --allow-unauthenticated install medibuntu-keyring
apt-get -qq update
apt-get -qq -y install ffmpeg libavcodec-extra-52
|
...
UnZip is needed to unzip the war file, modifying the file telling Medici where to find the database as well as the datafolder. The following command will install Unzip.
Code Block |
---|
borderStyle | solid |
---|
title | Ubuntu | borderStyle | solid |
---|
|
apt-get -qq -y install unzip
|
...
To enable the conversion from PDF to preview images some fonts need to be installed.
Code Block |
---|
borderStyle | solid |
---|
title | Ubuntu | borderStyle | solid |
---|
|
apt-get -qq -y install ttf-dejavu-core ttf-baekmuk ttf-kochi-gothic ttf-kochi-mincho ttf-wqy-zenhei ttf-indic-fonts-core ttf-telugu-fonts ttf-oriya-fonts ttf-kannada-fonts ttf-bengali-fonts
|
...
The time on the server is used for many interactions with the system and thus it is important for this to be correct. This can be achieved using NTP.
Code Block |
---|
borderStyle | solid |
---|
title | Ubuntu |
---|
borderStyle | solid |
---|
|
apt-get -qq -y install ntp
|
...
Next, install extractor as a Unix service and start it.
Code Block |
---|
borderStyle | solid |
---|
title | Ubuntu | borderStyle | solid |
---|
|
cp extractor/service/extractor.ubuntu /etc/init.d/extractor
sed -i -e "s#DIR=/home/kooper/Extractor#DIR=/home/medici/extractor#" -e "s#USER=kooper#USER=tomcat6#" /etc/init.d/extractor
chmod 755 /etc/init.d/extractor
update-rc.d extractor defaults
/etc/init.d/extractor start
|
Code Block |
---|
borderStyle | solid |
---|
title | Redhat (not tested) | borderStyle | solid |
---|
|
cp extractor/service/extractor.redhat /etc/init.d/extractor
sed -i -e "s#DIR=/home/kooper/Extractor#DIR=/home/medici/extractor#" -e "s#USER=kooper#USER=tomcat#" /etc/init.d/extractor
chmod 755 /etc/init.d/extractor
/sbin/chkconfig extractor on
/etc/init.d/extractor start
|
...
Finally the proxy http module needs to be enabled and Apache Httpd needs to be restarted.
Code Block |
---|
borderStyle | solid |
---|
title | Ubuntu | borderStyle | solid |
---|
|
a2enmod proxy_http
/etc/init.d/apache2 restart
|