Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save douglascrp/9de344222edacdb7d8b8aa52fc4b99d1 to your computer and use it in GitHub Desktop.
Save douglascrp/9de344222edacdb7d8b8aa52fc4b99d1 to your computer and use it in GitHub Desktop.
Installing jod on Ubuntu. Based on the Docker configuration available at https://bitbucket.org/xenit/docker-jodconverter-ws
Install Oracle JDK7
cd /opt
wget -O jod-tomcat.zip 'http://sourceforge.net/projects/jodconverter/files/JODConverter/2.2.2/jodconverter-tomcat-2.2.2.zip/download'
#unzip jod-tomcat.zip -d /usr/local/src
unzip jod-tomcat.zip -d /opt
# edit /opt/jodconverter-tomcat-2.2.2/bin/catalina.sh and make sure the JAVA_HOME variable points to the JDK 7
# Example: JAVA_HOME=/usr/lib/jvm/java-7-oracle
#ln -s /usr/local/src/jodconverter-tomcat-2.2.2/bin/startup.sh /usr/bin/jod
ln -s /opt/jodconverter-tomcat-2.2.2/bin/startup.sh /usr/bin/jod
# /usr/local/src/jodconverter-tomcat-2.2.2/webapps/converter/WEB-INF
cd /opt/jodconverter-tomcat-2.2.2/webapps/converter/WEB-INF
wget -O applicationContext.xml https://bitbucket.org/xenit/docker-jodconverter-ws/raw/89064ac3c94514cd467e9f6adc1f49cbae9a2c4c/applicationContext.xml
cd /opt/jodconverter-tomcat-2.2.2/conf
# edit server.xml and change ports if needed
cd /opt/jodconverter-tomcat-2.2.2/bin/
wget -O start-jod https://bitbucket.org/xenit/docker-jodconverter-ws/raw/89064ac3c94514cd467e9f6adc1f49cbae9a2c4c/start
chmod +x start-jod
ln -s /opt/jodconverter-tomcat-2.2.2/bin/start-jod /usr/bin/start-jod
# edit start-jod and add **#!/bin/sh** in the first line
# also change the libreoffice path if needed
# /opt/libreoffice5.1/program/soffice
In my tests, the best LibreOffice version I found was 5.1
So, in order to download and install it, follow the steps bellow:
wget http://downloadarchive.documentfoundation.org/libreoffice/old/5.1.6.2/deb/x86_64/LibreOffice_5.1.6.2_Linux_x86-64_deb.tar.gz
tar xf LibreOffice*.tar.gz
cd "$(find . -type d -name "LibreOffice*")"
cd DEBS
rm *gnome-integration*.deb &&\
rm *kde-integration*.deb &&\
rm *debian-menus*.deb &&\
sudo dpkg -i *.deb
## In the Alfresco side:
Build the project https://bitbucket.org/xenit/alfresco-remote-jodconverter
Follow the installation as described in the project's page.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment