1.安装docker
[root@lixian ~]# yum -y install yum-utils device-mapper-persistent-data lvm2 [root@lixian ~]# yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo [root@lixian ~]# yum makecache fast [root@lixian ~]# yum -y install docker-ce [root@lixian ~]# systemctl start docker
2.安装seafile
本文已经提前安装过seafile,具体安装seafile操作链接如下
使用docker部署seafile公司本地网盘系统【显哥出品,必为精品】 | 显哥博客
1.下载安装docker(如果系统有docker服务了,请跳过此步骤) [root@lixian ~]# yum -y install yum-utils device-mapper-persistent-data lvm2 [root@lixian ~]# yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.
3.docker运行安装OnlyOffice
[root@lixian ~]# docker run -i -t -d --restart=always -p 8889:80 onlyoffice/documentserver
[root@lixian ~]# docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 7de84c61aa0b onlyoffice/documentserver "/app/ds/run-documen…" 10 minutes ago Up 10 minutes 443/tcp, 0.0.0.0:8889->80/tcp, :::8889->80/tcp charming_mccarthy e83b2969c44e seafileltd/seafile:latest "/sbin/my_init -- /s…" 5 weeks ago Up 3 weeks 0.0.0.0:80->80/tcp, :::80->80/tcp seafile
4.测试onlyoffice
#测试是否能访问到onlyoffice #打开浏览器访问http://IP地址:8889/welcome
5.编辑文件seahub_settings.py
seahub_settings.py文件在seafile目录的conf文件夹下
# Enable Only Office ENABLE_ONLYOFFICE = True VERIFY_ONLYOFFICE_CERTIFICATE = False ONLYOFFICE_APIJS_URL = 'http://IP地址:8889/web-apps/apps/api/documents/api.js' ONLYOFFICE_FILE_EXTENSION = ('doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'odt', 'fodt', 'odp', 'fodp', 'ods', 'fods') ONLYOFFICE_EDIT_FILE_EXTENSION = ('docx', 'pptx', 'xlsx','ppt','xls','doc')