Install Document Server CentOS 7 - Juliniho/Pitagoras GitHub Wiki

Onlyoffice to Centos 7 edit 06/2019

Centos 7

  • Procesador procesador de doble núcleo con una frecuencia de reloj de 2 GHz o superior
  • RAM 2 GB or more
  • HDD at least 40 GB of free space
  • Requisitos adicionales at least 4 GB of swap
  • OS RHEL 7 or CentOS 7
  • Additional requirements
  • PostgreSQL: version 9.1 or later
  • NGINX: version 1.3.13 or later
  • Node.js: version 8.12.0
  • Redis
  • RabbitMQ

NODE

if you want delete
yum remove nodejs
rm -rf bin/node bin/node-waf include/node lib/node lib/pkgconfig/nodejs.pc share/man/man1/node
rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/npm*
install, sometimes is necesary reboot
wget https://nodejs.org/dist/v8.12.0/node-v8.12.0-linux-x64.tar.gz
tar --strip-components 1 -xzvf node-v* -C /usr/local

NGINX

official the repository
yum -y install yum-utils
edit /etc/yum.repos.d/nginx.repo and add this

[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

yum-config-manager --enable nginx-mainline
yum -y install nginx

see the configuration in /etc/nginx/nginx.conf

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;
}

yum -y install epel-release

PostgreSQL

Install Repo RPM
yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
yum -y install postgresql11
yum -y install postgresql11-server

Optionally initialize the database and enable automatic start
/usr/pgsql-11/bin/postgresql-11-setup initdb
systemctl enable postgresql-11
systemctl start postgresql-11
chkconfig postgresql-11 on

Turn on the 'trust' authentication method for IPv4 and IPv6 localhost
edit /var/lib/pgsql/11/data/pg_hba.conf
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

service postgresql-11 restart

Create the PostgreSQL database and user cd /tmp
sudo -u postgres psql -c "CREATE DATABASE onlyoffice;"
sudo -u postgres psql -c "CREATE USER onlyoffice WITH password 'onlyoffice';"
sudo -u postgres psql -c "GRANT ALL privileges ON DATABASE onlyoffice TO onlyoffice;"

Redis

yum -y install redis
service redis start
systemctl enable redis

RabbitMQ

yum -y install rabbitmq-server
service rabbitmq-server start
systemctl enable rabbitmq-server

Install onlyoffice document server

install Repo RPM
yum -y install https://download.onlyoffice.com/repo/centos/main/noarch/onlyoffice-repo.noarch.rpm
see the version P.e
yum install onlyoffice-documentserver
Reinstall is necesary one clean
yum --enablerepo=onlyoffice clean metadata

  • Run dependent services and enable start of them on boot:
    service supervisord start
    systemctl enable supervisord
    service nginx start
    systemctl enable nginx

  • Configuring Document Server
    run script
    documentserver-configure.sh

For PostgreSQL:
Host: localhost
Database: onlyoffice
User: onlyoffice
Password: onlyoffice

For Redis:
Host: localhost

For RabbitMQ:
Host: localhost
User: guest
Password: guest

  • Add rules firewall
    firewall-cmd --zone=public --add-port=80/tcp --permanent
    firewall-cmd --zone=public --add-port=443/tcp --permanent
    firewall-cmd --reload
    Check
    firewall-cmd --list-all

  • disable SElinux
    edit /etc/selinux/config
    SELINUX=disabled
    ckeck SELinux
    sestatus

⚠️ **GitHub.com Fallback** ⚠️