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
[nginx-mainline]
name=nginx mainline repo
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://nginx.org/keys/nginx_signing.key
Official instruction
Install NGINX:
sudo yum install nginx
After that edit the /etc/nginx/nginx.conf
NGINX configuration file, so that it looked 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
Install the PostgreSQL version included in your version of CentOS:
sudo yum install postgresql postgresql-server
Initialize the PostgreSQL database
sudo service postgresql initdb
sudo chkconfig postgresql on
Turn on the 'trust' 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 trust
Then find the host all all ::1/128 ident
string and replace it with the following one:
host all all ::1/128 trust
Save the changes.
Restart the PostgreSQL service:
sudo service postgresql restart
Create the PostgreSQL database and user:
The created database must have onlyoffice both for user and password.
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 yum install rabbitmq-server
To install RabbitMQ on CentOS 8, please refer to the official instruction.
Start the rabbitmq service and enable start on boot:
sudo service rabbitmq-server start
sudo systemctl enable rabbitmq-server
Installing mscorefonts
Install the cabextract
and xorg-x11-font-utils
packages:
sudo yum install cabextract xorg-x11-font-utils
For CentOS 7.8(2003), fontconfig
is also required:
sudo yum install fontconfig
Install the msttcore fonts package:
sudo rpm -i https://sourceforge.net/projects/mscorefonts2/files/rpms/msttcore-fonts-installer-2.6-1.noarch.rpm