On-Premise installation
Deploy on Linux
Learn how to install on Linux manually
To use Carbone Enterprise Edition on Linux, you need a Carbone license. Talk to us to find out more.
You can use Carbone via Docker on your Linux machine. To do so, go to the Deploy with Docker.
This documentation explains how to run the application directly on Linux.
Installation
- Download the license and the Carbone On-premise binary for Linux. Binary is available on your account
- On your terminal run
chmod +x carbone-ee
in order to execute the binary. - Install LibreOffice Link to instructions.
- Prepare the license key to be loaded, multiple solution:
- Set the Environment Variable
CARBONE_EE_LICENSE
with the license key as the value - Or pass the CLI option
--license
followed by the license key as the value when you start the server (step 5) - Or insert the license file in the "config" directory. If the directory doesn't exist, it must be created next to the Carbone On-premise binary. If multiple licenses are available, only the latest license is selected. The binary can't start if the license is outdated or invalid.
- Set the Environment Variable
- Start Carbone web server. It is possible to pass options to Carbone On-Premise through the CLI:
./carbone-ee webserver --studio
If an error appears during the start up, you must verify:
- if your license is valid
- if CLI options and values are valid
LibreOffice Install
Carbone uses efficiently LibreOffice to convert documents. Among all tested solutions, it is the most reliable and stable one in production for now. Behind the scene, Carbone server does:
- starts LibreOffice in "server-mode": headless, no User Interface loaded
- manages multiple LibreOffice workers to maximize performance (configurable number of workers)
- automatically restarts LibreOffice worker if it crashes or does not respond
- job queue, re-try conversion two times if something bad happen
# remove all old version of LibreOffice
sudo apt remove --purge libreoffice*
sudo apt autoremove --purge
# Download LibreOffice debian package. Select the right one (64-bit or 32-bit) for your OS.
# Get the latest from http://download.documentfoundation.org/libreoffice/stable
# or download the version currently "carbone-tested":
wget https://downloadarchive.documentfoundation.org/libreoffice/old/7.4.1.1/deb/x86_64/LibreOffice_7.4.1.1_Linux_x86-64_deb.tar.gz
# Install required dependencies on ubuntu server for LibreOffice 7.0+
sudo apt update
sudo apt install libxinerama1 libfontconfig1 libdbus-glib-1-2 libcairo2 libcups2 libglu1-mesa libsm6 libnss3
# Uncompress package
tar -zxvf LibreOffice_7.4.1.1_Linux_x86-64_deb.tar.gz
cd LibreOffice_7.4.1.1_Linux_x86-64_deb/DEBS
# Install LibreOffice
sudo dpkg -i *.deb
# If you want to use Microsoft fonts in reports, you must install the fonts
# Andale Mono, Arial Black, Arial, Comic Sans MS, Courier New, Georgia, Impact,
# Times New Roman, Trebuchet, Verdana,Webdings)
sudo apt install ttf-mscorefonts-installer
# If you want to use special characters, such as chinese ideograms, you must install a font that support them
# For example:
sudo apt install fonts-wqy-zenhei
Generate systemd script
Carbone On-Premise contains automatic installation scripts to daemonize with systemd. It has been carefully configured to provide a high level of security. The Systemd installation is working only for Ubuntu or Debian.
# Generate installation scripts
./carbone install
# Execute installation scripts and follow instructions
sudo ./install.sh
The service is configured to run with "carbone" user (automatically created) in the "/var/www/carbone-ee" directory.
It is possible to overwrite values through environment variables CARBONE_USER
and CARBONE_WORKDIR
.
You must install LibreOffice to generate PDF documents, read instructions.
Usage
By default, Carbone is executed at startup.
To check is service is running :
sudo service carbone-ee status
If running correclty, API is usable from :
http://localhost:4000
Stopping the service
When the Carbone server receives SIGTERM signal, (what we call "SOFT STOP")
- The
GET /status
API request returns HTTP status503
instead of200
. It can be used as a trigger (liveness, readiness probes) for a load balancer, reverse-proxy, or kubernetes. - If there is no report generation in progress, it will exist within 15 seconds.
- If there is a report in progress, it waits until the process is finished before exiting
- After 5 minutes, it still exists, even if there is some report generation in progress