Updating ONLYOFFICE Docs Enterprise Edition on Linux
Introduction
This guide will show you how to update your ONLYOFFICE Docs Enterprise Edition Linux version to the latest version.
Our support policy is that we support only the latest stable version. We regularly release new versions of ONLYOFFICE Docs which include new features and bug fixes. If you are using an old version of ONLYOFFICE Docs, we recommend upgrading to the latest version.
Starting from version 4.1, ONLYOFFICE Docs uses PostgreSQL instead of MySQL database which had been used in previous versions, so in this guide we will show the upgrade from version 4.1 to the latest available version. This update procedure cannot be applied to earlier versions that use MySQL.
If you are using an old Integration Edition version, the only way to update it is to uninstall Integration Edition (onlyoffice-documentserver-ie) and install Enterprise Edition instead of it.
- On Ubuntu, you can use the following command to uninstall the DEB package:
sudo apt-get remove onlyoffice-documentserver-ie - On CentOS, you can use the following command to uninstall the RPM package:
sudo yum remove onlyoffice-documentserver-ie
Shutting down ONLYOFFICE Docs
Due to how ONLYOFFICE Docs handles document saving, a document is saved only after it has been closed by all the users who edited it. To avoid data loss, you must forcefully disconnect the ONLYOFFICE Docs users when you need to stop ONLYOFFICE Docs in case of the application update. To do that, execute the following script:
documentserver-prepare4shutdown.sh
Executing the script may take a long time (up to 5 minutes).
Disconnecting users may take a long time (up to 5 minutes).
Updating ONLYOFFICE Docs for Linux
Make sure to replace old Document Server config files with the new ones provided by the update.
Updating using the script
Download the installation script:
curl -O http://download.onlyoffice.com/docs/docs-enterprise-install.sh
Execute the following command:
bash docs-enterprise-install.sh -u true
Type N and press Enter to update ONLYOFFICE Docs from DEB/RPM packages.
Updating manually
Installing dependencies
Some of the dependencies required for ONLYOFFICE Docs to work correctly are not included in Ubuntu 14.04 by default, so newer versions of ONLYOFFICE Docs require some additional steps.
The following dependencies will be installed automatically if you use Ubuntu 14.04 LTS or later when you update ONLYOFFICE Docs (in case some of them were not installed with ONLYOFFICE Docs in earlier versions for some reason):
- libcurl3
- libxml2
- fonts-dejavu
- fonts-liberation
- ttf-mscorefonts-installer
- fonts-crosextra-carlito
- fonts-takao-gothic
- fonts-opensymbol
Earlier distributions might require their manual installation.
If you want to update version 4.1, you will need to manually add the repository containing the proper Node.js package version (this action is not required when updating version 4.2).
Add the repository:
curl -sL https://deb.nodesource.com/setup_8.x | sudo bash -
Ubuntu distributions prior to 14.04 LTS might require some other dependencies to be installed.
Installing the new version of ONLYOFFICE Docs
For Ubuntu and derivatives
Update the repository:
sudo apt-get update
And install the latest version of ONLYOFFICE Docs:
sudo apt-get dist-upgrade
For CentOS and derivatives
sudo yum update onlyoffice-documentserver-ee
The database and all necessary files should be picked up automatically from the previous version. Please run ONLYOFFICE Docs and check it for correct work.
The database schema has been changed in v6.3. When updating to v6.3, you may also need to upgrade the database schema to ensure the ability to use the password protection feature.
-
Find the script for upgrading the database schema in the ONLYOFFICE Docs installation folder.
- For PostgreSQL:
/var/www/onlyoffice/documentserver/server/schema/postgresql/upgrade/upgradev630.sql - For MySQL:
/var/www/onlyoffice/documentserver/server/schema/mysql/upgrade/upgradev630.sql
- For PostgreSQL:
-
Execute the script using the command line.
- For PostgreSQL:
psql -U onlyoffice -W onlyoffice < {path-to-upgradev630.sql} - For MySQL:
mysql -u root -p onlyoffice < {path-to-upgradev630.sql}
Specify the password used when creating the database (
onlyoffice). - For PostgreSQL: