onlyoffice教程0x01-安装

说明 onlyoffice有三个版本

  • 社区版(基于AGPL v.3协议)
  • 企业版
  • 开发版
    其中企业版和开发版都需要购买商业授权,本次以安装社区版为例
安装 onlyoffice支持docker安装和主机安装,docker安装比较简单,参考官方文档即可,这里就不再介绍,本次介绍的是在主机上安装onlyoffice
安装环境
  • OS:CentOS 7.8
  • CPU: 2核
  • 内存: 8G
安装nginx 创建文件/etc/yum.repos.d/nginx.repo
# cat < /etc/yum.repos.d/nginx.repo [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 EOF

使用yum安装nginx
yum install nginx

安装EPEL仓库
yum install epel-release

安装PostgreSQL
yum install postgresql postgresql-server service postgresql initdb chkconfig postgresql on

  • 修改配置文件/var/lib/pgsql/data/pg_hba.conf,将all all 127.0.0.1/32 ident修改为
hostallall127.0.0.1/32trust

  • host all all ::1/128 ident修改为
hostallall::1/128trust

  • 重启PostgreSQL
service postgresql restart

  • 创建onlyoffice数据库
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; "

必须用sudo -u postgres创建,pg不允许root用户进行创建
安装RabbitMQ
yum install rabbitmq-server service rabbitmq-server start systemctl enable rabbitmq-server

安装mscorefonts
yum install cabextract xorg-x11-font-utils yum install fontconfig rpm -i https://deac-ams.dl.sourceforge.net/project/mscorefonts2/rpms/msttcore-fonts-installer-2.6-1.noarch.rpm

如果rpm包下载不下来,可以先下载到本地,然后用rpm -i msttcore-fonts-installer-2.6-1.noarch.rpm进行安装
安装document server
  • 安装
yum install https://download.onlyoffice.com/repo/centos/main/noarch/onlyoffice-repo.noarch.rpm yum install onlyoffice-documentserver

  • 启动
service supervisord start systemctl enable supervisord service nginx start systemctl enable nginx

  • 关闭
service supervisord stop service nginx stop

  • 配置
直接执行命令documentserver-configure.sh,会提示输入PG信息和MQ信息
对于PG数据库
Host: localhost Database: onlyoffice User: onlyoffice Password: onlyoffice

【onlyoffice教程0x01-安装】对于RabbitMQ
Host: localhost User: guest Password: guest

    推荐阅读