onlyoffice源码编译

本文详细描述了在64位Ubuntu16.04环境下,如何为搭建ONLYOFFICE社区版服务器做准备,包括硬件要求、操作系统设置、源码编译、安装NGINX、PostgreSQL和RabbitMQ,以及解决连接数限制等问题,适用于Windows11宿主机和Vagrant虚拟机环境。
摘要由CSDN通过智能技术生成

环境准备

官网要求

CPU dual core 2 GHz or better
RAM at least 2 GB, but depends of the host OS. More is better
HDD at least 40 GB of free space
SWAP at least 4 GB, but depends of the host OS. More is better
Software

OS 64-bit Ubuntu 16.04
The solution has been tested on Ubuntu 16.04. Other distributions might require some specific actions which are not described here.

博主的环境

宿主机: window11   64g   24核

vwmare16里面装的ubuntu16.04(x86),虚拟机配置如下图

  1. 搭建以及配置安装源加速(自行解决,没有会很慢)
  2. 参照官网Compiling ONLYOFFICE Docs for a local server - ONLYOFFICE
  3. 安装git    apt-get install -y python git
  4. 下载代码  git clone https://github.com/ONLYOFFICE/build_tools.git
  5. Go to the build_tools/tools/linux directory:
    cd build_tools/tools/linux
    
  6. Run the automate.py script specifying the server parameter to compile the ONLYOFFICE Docs:
    ./automate.py server
  7. 编译的这步骤会遇到很多错误
  8. 某个文件夹不能存在,或者无法下载,手动下载相关的包放在指定位置
  9. Installing and configuring NGINX, PostgreSQL and RabbitMQ

    ONLYOFFICE Docs uses NGINX as a web server and PostgreSQL as a database. RabbitMQ is also required for ONLYOFFICE Docs to work correctly.

    Installing and configuring NGINX
  10. Install NGINX:
    sudo apt-get install nginx
    
  11. Disable the default website:
    sudo rm -f /etc/nginx/sites-enabled/default
    
  12. Now you need to set up the new website. To do that create the /etc/nginx/sites-available/onlyoffice-documentserver file with the following contents:
    map $http_host $this_host {
      "" $host;
      default $http_host;
    }
    map $http_x_forwarded_proto $the_scheme {
      default $http_x_forwarded_proto;
      "" $scheme;
    }
    map $http_x_forwarded_host $the_host {
      default $http_x_forwarded_host;
      "" $this_host;
    }
    map $http_upgrade $proxy_connection {
      default upgrade;
      "" close;
    }
    proxy_set_header Host $http_host;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $proxy_connection;
    proxy_set_header X-Forwarded-Host $the_host;
    proxy_set_header X-Forwarded-Proto $the_scheme;
    server {
      listen 0.0.0.0:80;
      listen [::]:80 default_server;
      server_tokens off;
      rewrite ^\/OfficeWeb(\/apps\/.*)$ /web-apps$1 redirect;
      location / {
        proxy_pass http://localhost:8000;
        proxy_http_version 1.1;
      }  
    }
  13. Add the symlink to the newly created website to the /etc/nginx/sites-available directory:
    sudo ln -s /etc/nginx/sites-available/onlyoffice-documentserver /etc/nginx/sites-enabled/onlyoffice-documentserver
    
  14. And restart NGINX to apply the changes:
    sudo nginx -s reload
    
  15. Start the FileConverter service:
    cd out/linux_64/onlyoffice/documentserver/server/FileConverter
    
    LD_LIBRARY_PATH=$PWD/bin NODE_ENV=development-linux NODE_CONFIG_DIR=$PWD/../Common/config ./converter
    
  16. Start the DocService service:
    cd out/linux_64/onlyoffice/documentserver/server/DocService
    
    NODE_ENV=development-linux NODE_CONFIG_DIR=$PWD/../Common/config ./docservice
  17. 参照文档

Installation Guides - Docs Community Edition - ONLYOFFICE

onlyoffice 源码编译,破解20连接数限制,并部署到centos7_onlyoffice 源码编译-CSDN博客

  • 17
    点赞
  • 19
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

finbarr45

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值