安装教程
1、安装wget
yum -y install wget
下载yum源
cd /etc/yum.repos.d/
wget https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
刷新yum集
yum repolist
2.安装docker-ce
yum -y install docker-ce
3.把docker服务启动
systemctl start docker
systemctl enable docker
4.更换docker容器镜像下载提升下载速度
编辑文件路径如下:
vi
docker/daemon.json添加如下代码(也可以自己注册阿里云并从自己的“容器镜像服务”中获取)
{ "registry-mirrors":["https://6w4lyiz2.mirror.aliyuncs.com"] }
编辑好后按“Esc”退出编辑并“:wq”结束
5、docker运行下载onlyoffice,此处设置onlyoffice监听端口为8889
docker run -i -t -d --restart=always -p 8889:80 onlyoffice/documentserver
#--restart=always表示每次开机,只要当docker被设置为开机启动,此onlyoffice就会自动运行
查看docker镜像是否运行
docker ps
测试是否能访问到onlyoffice
打开浏览器访问http://10.31.32.36:8889/welcome10.31.32.36替换成自己的服务器IP
6.编辑文件seahub_settings.py
命令:
vi
seafile seahub_settings.py在此文件下末尾添加如下内容:
# Enable Only Office
ENABLE_ONLYOFFICE = True
VERIFY_ONLYOFFICE_CERTIFICATE = False ONLYOFFICE_APIJS_URL = 'http://10.31.32.36: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')
然后重启Seafile服务
命令:
cd /opt/seafile/seafile-server-latest/
systemctl start seafile
systemctl start seahub
7.打开网址http://10.31.32.36,进入系统设置
在设置处的SERVICE_URL和FILE_SERVER_ROOT修改如下,如果是域名的,请把IP地址换成域名地址
退出系统设置
进入我的资料库/私人资料库中上传doc或xlxs或pptx文件
8.测试打开doc,docx,ppt,pptx,xlxs,xls
打开doc文件如下:
打开docx文件如下:
发布者:blog,转转请注明出处:https://www.04390.cn/jcbw/1030.html
评论列表(1条)
感谢分享,谢谢站长!!@天天下载