- Home
- Docs
- Installation and configuration
- Community
- Linux version
- Installing ONLYOFFICE Docs on CentOS or RHEL for arm64
Installing ONLYOFFICE Docs on CentOS or RHEL for arm64
Introduction
Starting from version 7.1, ONLYOFFICE Docs can be installed on CentOS or RHEL for the 64-bit ARM architecture.
Community Edition allows you to install ONLYOFFICE Docs on your local server and integrate online editors with ONLYOFFICE collaboration platform or other popular systems.
ONLYOFFICE Docs is an online office suite comprising viewers and editors for texts, spreadsheets and presentations, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.
Functionality
- Document Editor
- Spreadsheet Editor
- Presentation Editor
- Mobile web viewers
- Collaborative editing
- Hieroglyph support
- Support for all the popular formats: DOC, DOCX, TXT, ODT, RTF, ODP, EPUB, ODS, XLS, XLSX, CSV, PPTX, HTML
See the detailed list of features available for ONLYOFFICE Docs Community Edition.
Using it within ONLYOFFICE Workspace, you will be able to:
- share files;
- manage access rights to documents;
- embed documents on a website;
- view and edit files stored on Drive, Box, Dropbox, OneDrive, OwnCloud connected to ONLYOFFICE.
This guide will show you how to install ONLYOFFICE Docs Community Edition Linux version 7.1 and later on CentOS Stream 9, RHEL 8, and RHEL 9 for the 64-bit ARM architecture.
System requirements
- CPU: 64-bit ARM processors
- RAM: at least 2 GB, but depends on the host OS. More is better
- HDD: at least 40 GB of free space
- SWAP: at least 4 GB, but depends on the host OS. More is better
- OS: CentOS Stream 9, RHEL 8, or RHEL 9 for arm64
- Additional requirements
- PostgreSQL: version 12.9 or later
- NGINX: version 1.3.13 or later
- RabbitMQ
Installing dependencies
Installing the up-to-date NGINX package version
To set up the yum repository for RHEL/CentOS, create the file named /etc/yum.repos.d/nginx.repo
with the following contents:
[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true
Install NGINX:
sudo yum install nginx
Remove the following file:
sudo rm /etc/nginx/conf.d/default.conf
After that, edit the /etc/nginx/nginx.conf
NGINX configuration file, so that it looks the following way:
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
include /etc/nginx/conf.d/*.conf;
}
Installing EPEL repository
sudo yum install epel-release
Installing and configuring PostgreSQL
To install EPEL on CentOS 9, use the following commands:
sudo yum config-manager --set-enabled crb
sudo yum install epel-release epel-next-release
To install EPEL on RHEL, use the following commands:
sudo subscription-manager repos --enable codeready-builder-for-rhel-$REV-$(arch)-rpms
sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-$REV.noarch.rpm
Change $REV to your OS version manually (8 for versions 8.x, 9 for versions 9.x and so on).
Initialize the PostgreSQL database
sudo service postgresql initdb
sudo chkconfig postgresql on
Turn on the 'scram-sha-256' authentication method for IPv4 and IPv6 localhost
Open the /var/lib/pgsql/data/pg_hba.conf
file in a text editor.
Find the host all all 127.0.0.1/32 ident
string and replace it with the following one:
host all all 127.0.0.1/32 scram-sha-256
Then find the host all all ::1/128 ident
string and replace it with the following one:
host all all ::1/128 scram-sha-256
Save the changes.
Open the /var/lib/pgsql/data/postgresql.conf
file in a text editor.
Find 'password_encryption'
, uncomment it and replace the value with 'scram-sha-256'
:
password_encryption = 'scram-sha-256'
Save the changes.
Restart the PostgreSQL service:
sudo service postgresql restart
Create the PostgreSQL database and user:
First run the command
cd /tmp
to prevent the could not change directory to "/root"
warning if running from root. Then the database and the user must be created:
sudo -i -u postgres psql -c "CREATE USER onlyoffice WITH PASSWORD 'onlyoffice';"
sudo -i -u postgres psql -c "CREATE DATABASE onlyoffice OWNER onlyoffice;"
Installing Redis
sudo yum install redis
Start the redis service and enable start on boot:
sudo service redis start
sudo systemctl enable redis
Installing RabbitMQ
sudo curl -s https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/script.rpm.sh | sudo bash
ERLANG_LATEST_VERSION=$(curl -s https://api.github.com/repos/rabbitmq/erlang-rpm/releases | sed -n 's/.*"tag_name":\s*"v\([^"]*\)".*/\1/p' | head -1)
sudo rpm -ivh https://github.com/rabbitmq/erlang-rpm/releases/latest/download/erlang-${ERLANG_LATEST_VERSION}-1.el${REV}.aarch64.rpm
Change $REV to your OS version manually (8 for versions 8.x, 9 for versions 9.x and so on).
sudo yum install rabbitmq-server
Alternatively, you can install RabbitMQ on CentOS 8 or CentOS 9 from the official site.
Start the rabbitmq service and enable start on boot:
sudo systemctl enable --now rabbitmq-server
Installing ONLYOFFICE Docs
Adding the ONLYOFFICE Docs repository
Add the yum ONLYOFFICE Docs repository with the following command:
sudo yum install https://download.onlyoffice.com/repo/centos/main/noarch/onlyoffice-repo.noarch.rpm
Commands for installing ONLYOFFICE Docs
Execute the following command for the Community edition:
sudo yum install onlyoffice-documentserver
Start the nginx service and enable start on boot:
sudo service nginx start
sudo systemctl enable nginx
After that, ONLYOFFICE Docs will be run as a process. The package will be updated just like any other rpm package.
Changing the default ONLYOFFICE Docs port
By default, ONLYOFFICE Docs listens for the incoming connections using port 80. Starting with version 4.3, you can change the port for ONLYOFFICE Docs if you plan to use it instead of the default one.
To do that, you will need to edit the DS_PORT environment variable running the command:
export DS_PORT=<PORT_NUMBER>
Please write the port number instead of the <PORT_NUMBER>
in the above command.
After that, you can continue configuring ONLYOFFICE Docs.
Configuring ONLYOFFICE Docs
Run a configuration script
export DB_TYPE=mysql
export DB_PORT=6443
After adding these two variables, you will be able to switch the DB using the script.
Run the documentserver-configure.sh
script:
bash documentserver-configure.sh
You will be asked to specify the PostgreSQL and RabbitMQ connection parameters. Use the following data:
For PostgreSQL:
- Host: localhost
- Database: onlyoffice
- User: onlyoffice
- Password: onlyoffice
For RabbitMQ:
- Host: localhost
- User: guest
- Password: guest
Add a firewall exception
sudo firewall-cmd --zone=public --add-port=80/tcp --permanent
sudo firewall-cmd --reload
Disable SELinux
Open the /etc/selinux/config
file using any text editor, replace the SELINUX=enforcing
or SELINUX=permissive
string with the SELINUX=disabled
one, and save the changes.
Reboot your server for the changes to take effect.
Launching ONLYOFFICE Docs in a browser
Once the configuration is finished, you can enter http://localhost in your browser address bar to open the ONLYOFFICE Docs welcome page, where you will find further instructions on how to enable document examples or integrate online editors into your web application using the provided API.