ubuntu16.04上onlyoffice环境搭建

1、安装onlyoffice镜像

  1. 安装 DocumentServer

    sudo docker run -i -t -d --name onlyoffice -p 9980:80 \

       -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice  \
       -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data  \
       -v /app/onlyoffice/DocumentServer/sdkjs-plugins:/var/www/onlyoffice/documentserver/sdkjs-plugins \
       -v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice  onlyoffice/documentserver

    备注:

        其中-v /app/onlyoffice/DocumentServer/sdkjs-plugins:/var/www/onlyoffice/documentserver/sdkjs-plugins

        将documentserver的插件目录挂载到宿主机上,这样我们就可以愉快地开发插件无缝连接到documentserver里面

  2. 打开浏览器http://192.168.1.154:9980,onlyofficer服务器正在运行


2、node服务器搭建

  1. 安装 nodejs:
    curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - (可跳过这一步)
    sudo apt-get install -y nodejs
  2. 下载Node.js工程并解压:
    wget https://api.onlyoffice.com/app_data/editor/Node.js%20Example.zip
    unzip Node.js\ Example.zip
  3. 进入工程目录:
    cd Node.js\ Example/
  4. 安装依赖包:
    npm install
  5. 编辑配置文件,指定ONLYOFFICE Document Server 服务器ip.
    nano config/default.json

    Edit the following lines:

    "siteUrl": "http://192.168.1.154:9980/"
    

    Where the documentserver is the name of the server with the ONLYOFFICE Document Server installed.

  6. 用node运行工程:
    nodejs bin/www
  7. 打开浏览器,可创建和上传文档:
    http://192.168.1.154:3000


参考官方网站:

官网:https://www.onlyoffice.com/

开发文档:https://api.onlyoffice.com/

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值