*HowTo* Install Collabora Online on Ubuntu 16.04. (without Docker!)

Diese Anleitung soll die umfangreiche Installation von Collabora Online 2.0 ohne Docker beschreiben.
Installiert wird auf einem Ubuntu 16.04 LTS (aber alle Befehle müssten auch auf Debian funktionieren).
Falls jemand Fehler in der Beschreibung findet oder Hinweise bzw Verbesserungsvorschläge hat, schreibt es in die Kommentare und ich werde die Anleitung weiter optimieren.


Inhaltsangabe:

Vorbereitung
Preinstallation
Step 1: Libreoffice kompilieren
Step 2: LibreofficeOnline herunterladen
Step 3: Poco kompilieren
Step 4: loolwsd kompilieren
Step 5: loleaflet kompilieren
Step 6: Abschlussarbeiten
Step 7: Zertifikate
Step 8: Dienst starten
QUELLEN


Vorbereitung:

  • OS: Ubuntu 16.04. LTS
  • vieles wurde von folgender Quelle[https://www.youtube.com/watch?v=3-NTTrSRaaw] übernommen
  • lokaler Ubuntunutzer wird im Folgenden user bezeichnet (bitte ersetzen!)
  • der FQDN wird im folgenden mit office.your-domain.com bezeichnet (bitte ersetzen!)
  • Hardware Sizing:
    --> 10 users  / CPU thread
    --> 100MB RAM / user
    --> 100kbits  / user



Preinstallation:

sudo apt-get update
sudo apt-get upgrade
sudo apt install apache2 -y
sudo nano /etc/apache2/sites-available/office.your-domain.com.conf

<VirtualHost *:80>
  ServerName office.your-domain.com
</VirtualHost>

sudo a2ensite office.your-domain.com.conf
sudo systemctl restart apache2


Step 1: Libreoffice kompilieren:

sudo apt-get install git libkrb5-dev make openssl g++ libtool && sudo apt-get build-dep libreoffice -y
cd /opt/
sudo mkdir libreoffice && cd libreoffice
sudo git clone git://anongit.freedesktop.org/libreoffice/core
sudo chown -R user:user /opt/libreoffice/
cd core/
./autogen.sh --without-help --without-myspell-dicts
make -j4

[wobei -j4 die Anzahl der zu nutzenden CPUs angibt, sollte die Prozedur beschleunigen und kann trotzdem mehrere Stunden dauern]

make check


Step 2: LibreofficeOnline herunterladen:

cd /opt/
sudo git clone https://github.com/LibreOffice/online.git
sudo mv online/lo* .
sudo rm -R online/
sudo chown -R user:user loleaflet/
sudo chown -R user:user loolwsd/
sudo apt-get install libpng12-0 libpng12-dev libpcap0.8 libpcap0.8-dev libcunit1 libcunit1-dev -y


Step 3: Poco kompilieren:

cd /opt/
sudo apt-get install openssl libssl-dev -y
sudo apt-get install libiodbc2 libiodbc2-dev -y
sudo apt-get install libmysqlclient-dev -y
sudo wget https://pocoproject.org/releases/poco-1.7.6/poco-1.7.6-all.tar.gz

[http://pocoproject.org/download/index.html >> Complete Edition - Sources for Linux]

sudo gunzip poco-1.7.6-all.tar.gz
sudo tar -xf poco-1.7.6-all.tar
cd poco-1.7.6-all
sudo ./configure
sudo make -j4
sudo make install


Step 4: loolwsd kompilieren:

sudo apt-get install libcap-dev -y
cd /opt/loolwsd/
libtoolize
aclocal
automake --add-missing
autoheader
automake --add-missing
autoheader
autoreconf
./configure --enable-silent-rules --with-lokit-path=/opt/loolwsd/bundled/include --with-lo-path=/opt/libreoffice/core/instdir --with-poco-includes=/usr/local/include --with-poco-libs=/usr/local/lib --enable-debug
make -j4


Step 5: loleaflet kompilieren:

cd /opt/loleaflet/
sudo apt-get install npm nodejs-legacy -y
sudo npm install -g jake
make -j4


Step 6: Abschlussarbeiten:

sudo chown -R user:user /opt/loolwsd
sudo chown -R user:user /opt/loleaflet
sudo chown -R user:user /opt/libreoffice
cd /etc
sudo mkdir loolwsd
sudo chown -R user:user /etc/loolwsd
sudo mkdir /usr/local/var
sudo mkdir /usr/local/var/cache
sudo mkdir /usr/local/var/cache/loolwsd
sudo chown -R user:user /usr/local/var/cache/loolwsd


Step 7: Zertifikate:

In dieser Installation werden Zertifikate von Let’s Encrypt genutzt.

sudo apt install letsencrypt python-letsencrypt-apache -y
sudo letsencrypt --apache --agree-tos --email your-email-address -d office.your-domain.com

[Bei der Installation ist "Secure" auszuwählen - office.your-domain.com ist der FQDN eures CollaboraOnline Servers]

sudo a2enmod proxy
sudo a2enmod proxy_wstunnel
sudo a2enmod proxy_http
sudo a2enmod ssl
sudo nano /etc/apache2/sites-enabled/office.your-domain.com-le-ssl.conf

[Angepasster Inhalt der office.your-domain.com-le-ssl.conf einfügen]

sudo systemctl restart apache2

sudo nano /opt/loolwsd/loolwsd.xml.in

[Angepasster Inhalt der loolwsd.xml.in einfügen - office.your-domain.com ist der Next- oder ownCloudserver]


Step 8: Dienst starten:

cd /opt/loolwsd
make run

Test: im Browser folgende URL aufrufen:
https://office.your-domain.com/loleaflet/1.9.0/loleaflet.html?file_path=file:///opt/loolwsd/test/data/hello.odt

Log liegt in /tmp/loolwsd.log

QUELLEN:


https://www.linuxbabe.com/cloud-storage/integrate-collabora-online-server-nextcloud-ubuntu-16-04
https://www.linuxbabe.com/cloud-storage/setup-nextcloud-server-ubuntu-16-04-apache-mariadb-php7
collaboraonline
1 Like

Can someone please confirm that this works?

hi, no i´t doesn´t work because:

sudo git clone https://github.com/LibreOffice/online.git21
sudo mv online/lo* .
sudo rm -R online/
sudo chown -R user:user loleaflet/
sudo chown -R user:user loolwsd/

=> there is no loolwsd folder anymore at git.

any ideas?

The first step is always to check that github repository. There you can see that the folder was renamed from loolwsd to just wsd:

Unfortunately, that is not the solution. Loolwsd isn't just renamed to wsd. Step 4 in the HowTo doesn't work anymore.

The ./configure command (an other command before that in the step are just possible in /opt/online and not in the subdirectories like wsd. I had to run the ./configure command with another Option --with-lokit-path=/opt/online/bundled/include/LibreOfficeKit/LibreOfficeKit.h

./configure --enable-silent-rules --with-lokit-path=/opt/online/wsd/bundled/include --with-lo-path=/opt/libreoffice/core/instdir --with-poco-includes=/usr/local/include --with-poco-libs=/usr/local/lib --with-lokit-path=/opt/online/bundled/include/LibreOfficeKit/LibreOfficeKit.h --enable-debug

But it wont compile until the end. Any ideas how to fix it?

Why is this tutorial still online when no one can confirm that it is (still) working?

Tutorials always stay online. If they get deleted / removed people can't take it and update it for newer releases of that software. So feel free to update it to make it working again and re-post it in here in a working state.

Hi,
Unfortunately, tutorial not working anymore (loolwsd)
Is someone can help and correct ? I'm kind of a newbie with Ubuntu, I installed Owncloud, now I'm trying to have LibreOffice-online too.

Thanks

Es geht auch viel einfacher, dank dem Team von Collabora CODE!

Gemäss https://www.collaboraoffice.com/code/ z.B. für Ubuntu 16.04 LTS:

import the signing key

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0C54D189F4BA284D

add the repository URL to /etc/apt/sources.list

echo 'deb https://collaboraoffice.com/repos/CollaboraOnline/CODE ./' >> /etc/apt/sources.list

perform the installation

apt-get update && apt-get install loolwsd code-brand

Dann kontrollieren, dass SSL-Zertifikate in /etc/loolwsd vorhanden sind, sonst wie folgt generieren (aus officeonline-install.sh):

mkdir /etc/loolwsd
openssl genrsa -out /etc/loolwsd/key.pem 4096
openssl req -out /etc/loolwsd/cert.csr -key /etc/loolwsd/key.pem -new -sha256 -nodes -subj "/C=DE/OU=onlineoffice-install.com/CN=onlineoffice-install.com/emailAddress=nomail@nodo.com"
openssl x509 -req -days 365 -in /etc/loolwsd/cert.csr -signkey /etc/loolwsd/key.pem -out /etc/loolwsd/cert.pem
openssl x509 -req -days 365 -in /etc/loolwsd/cert.csr -signkey /etc/loolwsd/key.pem -out /etc/loolwsd/ca-chain.cert.pem

und dann noch gemäss Anleitung den Apache2-Proxy einrichten.

Der Vorteil liegt auch darin, dass ganz einfach zusätzliche Schriften in Collaboraonline kopiert werden können, nämlich in den Ordner /opt/collaboraoffice5.3/share/fonts/truetype. Danach muss nur noch mit

sudo systemctl restart loolwsd.service

loolwsd neu gestartet werden und alles klappt, wenn in OwnCloud/Nextcoud die App richtig aktiviert wurde.

2 Likes