安装unbuntu22.04
https://blog.csdn.net/qq_36437991/article/details/135915360
安装onlyoffice
sudo apt-get update
sudo apt-get upgrade
postgresql
sudo apt-get install postgresql
创建用户和数据库
sudo -i -u postgres psql -c "CREATE USER onlyoffice WITH PASSWORD 'onlyoffice';"
sudo -i -u postgres psql -c "CREATE DATABASE onlyoffice OWNER onlyoffice;"
安装rabbit-mq
sudo apt-get install rabbitmq-server
安装nginx-extras
sudo apt-get install nginx-extras
安装onlyoffice server
下载unlimited-onlyoffice-package-builder,上传到服务器上
sudo apt-get install /home/wjl/onlyoffice-documentserver_8.0.1-31-btactic_amd64.deb
如果不带路径会从其他源中查找导致报错
依赖包会自动安装,等待安装完成
访问http://ip:80即可,出现如下界面说明安装成功
如果安装正版需要执行如下操作
mkdir -p -m 700 ~/.gnupg
curl -fsSL https://download.onlyoffice.com/GPG-KEY-ONLYOFFICE | gpg --no-default-keyring --keyring gnupg-ring:/tmp/onlyoffice.gpg --import
chmod 644 /tmp/onlyoffice.gpg
sudo chown root:root /tmp/onlyoffice.gpg
sudo mv /tmp/onlyoffice.gpg /usr/share/keyrings/onlyoffice.gpg
echo "deb [signed-by=/usr/share/keyrings/onlyoffice.gpg] https://download.onlyoffice.com/repo/debian squeeze main" | sudo tee /etc/apt/sources.list.d/onlyoffice.list
sudo apt-get update
sudo apt-get install ttf-mscorefonts-installer
sudo apt-get install onlyoffice-documentserver
后续操作一样,存储key的位置/etc/onlyoffice/documentserver/local.json
api访问出现502
systemctl status ds-*
systemctl status ds-docservice
sudo systemctl start ds-docservice
/bin/sh -c exec /var/www/onlyoffice/documentserver/server/DocService/docservice 2>&1 | tee -a /var/log/onlyoffice/documentserver/docservice/out.log
# 查看日志分析原因
vim /var/log/onlyoffice/documentserver/docservice/out.log
groups ds
sudo chown ds:ds /etc/onlyoffice/documentserver/default.json
sudo chmod 666 /etc/onlyoffice/documentserver/default.json
sudo chown ds:ds /etc/onlyoffice/documentserver/production-linux.json
sudo chown 666 /etc/onlyoffice/documentserver/production-linux.json
设置好权限之后重启一下其他的服务也就都可以了
几个位置需要记录一下
/var/www/onlyoffice
/etc/onlyoffice
/var/log/onlyoffice
/var/lib/onlyoffice
缓存文件地址/var/lib/onlyoffice/documentserver/App_Data/cache/files/data
参考
https://www.onlyoffice.com/download-docs.aspx#docs-community