seafile部署onlyoffice

为seafile部署onlyoffice

  • 准备工作

    • 成功安装seafie
    • 成功安装onlyoffice
  • 配置seafile

1
2
3
4
5
6
7
编辑 seahub_settings.py 加入下方配置
# Enable Only Office
ENABLE_ONLYOFFICE = True
VERIFY_ONLYOFFICE_CERTIFICATE = False
ONLYOFFICE_APIJS_URL = 'http://172.16.76.13:8001/web-apps/apps/api/documents/api.js'
ONLYOFFICE_FILE_EXTENSION = ('doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx')
ONLYOFFICE_EDIT_FILE_EXTENSION = ('doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx')

注1:其中 VERIFY_ONLYOFFICE_CERTIFICATE 选项如果 onlyoffice 使用了 https 的话可以选择更改为 True 提高安全性,如果是使用 http 协议则改为 False

注2:如果没使用 memcached 的话,还需要执行 rm /tmp/seahub_cached/ 清空缓存

  • 重启seahub
1
2
3
rm -f /opt/seafile/conf/seahub_settings.pyc
cd /opt/seafile/seafile-server-latest
./seahub.sh restart