阐明
onlyoffice 有三个版本
- 社区版(基于 AGPL v.3 协定)
- 企业版
-
开发版
其中企业版和开发版都须要购买商业受权,本次以装置社区版为例
装置
onlyoffice 反对 docker 装置和主机装置,docker 装置比较简单,参考官网文档即可,这里就不再介绍,本次介绍的是在主机上安装 onlyoffice
装置环境
- OS:CentOS 7.8
- CPU:2 核
- 内存:8G
装置 nginx
创立文件/etc/yum.repos.d/nginx.repo
# cat <<EOF > /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
批改为
host all all 127.0.0.1/32 trust
- 将
host all all ::1/128 ident
批改为
host all all ::1/128 trust
- 重启 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
对于 RabbitMQ
Host: localhost
User: guest
Password: guest