软件:onlyoffice

这是本文档旧的修订版!


OnlyOffice

https://www.onlyoffice.com/zh/download-community

系统需求

CPU:双核2GHz

内存:2GB

硬盘:40GB

交换空间:4GB

操作系统:64位Debian

依赖:PostgreSQL Nginx libstdc++6 RabbitMQ libcurl3 libxml2 fonts-dejavu fonts-liberation ttf-mscorefonts-installer fonts-crosextra-carlito fonts-takao-gothic fonts-opensymbol

#访问
https://github.com/ONLYOFFICE/DocumentServer/releases
#下载ONLYOFFICE-DocumentServer-9.2.0
wgit https://github.com/ONLYOFFICE/DocumentServer/releases/download/v9.2.0/onlyoffice-documentserver_amd64.deb
scp .\onlyoffice-documentserver_amd64.deb user@example.com:/home/user
sha256sum onlyoffice-documentserver_amd64.deb
sha256:2a42e5c47080650a70d2d5e7f9df9c126a37bbd5786e3bffb8adb88e8a01843e

sudo apt install postgresql libstdc++6 nginx
sudo apt install redis-server
sudo apt install rabbitmq-server
sudo apt install nginx-extras

#/etc/apt/sources.list 添加 contrib non-free
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ trixie main contrib non-free non-free-firmware
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ trixie main contrib non-free non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ trixie-updates main contrib non-free non-free-firmware
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ trixie-updates main contrib non-free non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ trixie-backports main contrib non-free non-free-firmware
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ trixie-backports main contrib non-free non-free-firmware
# 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换
deb https://security.debian.org/debian-security trixie-security main contrib non-free non-free-firmware
# deb-src https://security.debian.org/debian-security trixie-security main contrib non-free non-free-firmware
sudo apt install ttf-mscorefonts-installer

sudo -i -u postgres psql -c "CREATE USER onlyoffice WITH PASSWORD 'onlyoffice';"
sudo -i -u postgres psql -c "CREATE DATABASE onlyoffice OWNER onlyoffice;"
sudo -i -u postgres psql -c "ALTER ROLE onlyoffice WITH LOGIN CREATEDB;"

#更改debconf系统的默认端口
echo onlyoffice-documentserver onlyoffice/ds-port select <PORT_NUMBER> | sudo debconf-set-selections
#PostgreSQL
echo onlyoffice-documentserver onlyoffice/ds-port select <PORT_NUMBER> | sudo debconf-set-selections
echo onlyoffice-documentserver onlyoffice/db-host string <DB_HOST> | sudo debconf-set-selections
echo onlyoffice-documentserver onlyoffice/db-user string <DB_USER> | sudo debconf-set-selections
echo onlyoffice-documentserver onlyoffice/db-pwd password <DB_PASSWORD> | debconf-set-selections
echo onlyoffice-documentserver onlyoffice/db-name string <DB_NAME> | sudo debconf-set-selections
#RabbitMQ 选项
echo onlyoffice-documentserver onlyoffice/rabbitmq-host string <RABBITMQ_HOST> | sudo debconf-set-selections
echo onlyoffice-documentserver onlyoffice/rabbitmq-user string <RABBITMQ_USER> | sudo debconf-set-selections
echo onlyoffice-documentserver onlyoffice/rabbitmq-pwd password <RABBITMQ_PWD> | sudo debconf-set-selections
JWT选项
echo onlyoffice-documentserver onlyoffice/jwt-enabled boolean true | sudo debconf-set-selections
echo onlyoffice-documentserver onlyoffice/jwt-secret password <JWT_SECRET> | sudo debconf-set-selections
sudo apt install ./onlyoffice-documentserver_amd64.deb
#软件包设置Database Password:输入数据库密码 ********

sudo systemctl start ds-*
http://example.com/welcome/
sudo systemctl start ds-example
sudo systemctl enable ds-example
http://example.com/example/
sudo systemctl start ds-adminpanel
sudo systemctl enable ds-adminpanel
http://example.com/admin/

sudo vi /etc/onlyoffice/documentserver/local.json
services.CoAuthoring.secret.browser.string
sudo cat /var/log/onlyoffice/documentserver/adminpanel/out.log
AdminPanel SETUP REQUIRED | Bootstrap code: ********
systemctl restart ds-*
  • 软件/onlyoffice.1766221864.txt.gz
  • 最后更改: 2026/01/02 02:07
  • (外部编辑)