← zurück
Word Vorlagen: Installation unter Linux Server
libreoffice
Installation
- Das *.deb - Paketfile muss von der offiziellen Homepage heruntergeladen werden: https://www.libreoffice.org/download
- in den Ordner
LibreOffice_6.x.x.x_Linux_x86-64_deb/DEBS wechseln und dpkg -i *.deb ausführen
/opt/libreoffice6.1/program/soffice muss jetzt verfügbar sein und das Kommando /opt/libreoffice6.1/program/soffice --version muss der Version des Ordner oben entsprechen
- Testen ob libreoffice funktioniert:
/opt/libreoffice6.1/program/soffice --headless
- allenfalls muss noch die Bibliothek libdbus-glib-1-2 installiert werden:
sudo apt-get install libdbus-glib-1-2
phpdocx
- damit phpdocx richtig funktioniert muss unter
/var/www/ ein Ordner mit Namen .cache erstellt werden:
cd /var/www
mkdir .cache
chmod 777 .cache
Konfiguration via PHP (config.php)
// vor dem ersten Gebrauch von PHPDocx-Klassen:
require_once __DIR__ . '/components/phpdocx/classes/CreateDocx.php';
// Überschreiben der .ini-Direktiven direkt im Config-Array (Offizielle Methode von PHPDocx,
// siehe https://www.phpdocx.com/documentation/cookbook/setting-phpdocx-ini-php-code):
PhpdocxUtilities::$_phpdocxConfig['license']['code'] = 'custom key';
PhpdocxUtilities::$_phpdocxConfig['transform']['method'] = 'libreoffice';
PhpdocxUtilities::$_phpdocxConfig['transform']['path'] = '/opt/libreoffice6.1/program/soffice -env:UserInstallation=file:///tmp/biso/';
phpdocxconfig.ini (webroot/components/phpdocx/config/phpdocxconfig.ini)
; libreoffice or openoffice
method = "libreoffice"
; libreoffice installation path, absolute path
path = "/opt/libreoffice6.1/program/soffice -env:UserInstallation=file:///tmp/biso/"