环境准备
官网要求
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),虚拟机配置如下图
build_tools/tools/linux
?directory: cd build_tools/tools/linux
automate.py
?script specifying the?server
?parameter to compile the?ONLYOFFICE Docs: ./automate.py server
ONLYOFFICE Docs?uses?NGINX
?as a web server and?PostgreSQL
?as a database.?RabbitMQ
?is also required for?ONLYOFFICE Docs?to work correctly.
sudo apt-get install nginx
sudo rm -f /etc/nginx/sites-enabled/default
/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;
}
}
/etc/nginx/sites-available
?directory: sudo ln -s /etc/nginx/sites-available/onlyoffice-documentserver /etc/nginx/sites-enabled/onlyoffice-documentserver
sudo nginx -s reload
cd out/linux_64/onlyoffice/documentserver/server/FileConverter
LD_LIBRARY_PATH=$PWD/bin NODE_ENV=development-linux NODE_CONFIG_DIR=$PWD/../Common/config ./converter
cd out/linux_64/onlyoffice/documentserver/server/DocService
NODE_ENV=development-linux NODE_CONFIG_DIR=$PWD/../Common/config ./docservice
Installation Guides - Docs Community Edition - ONLYOFFICE
onlyoffice 源码编译,破解20连接数限制,并部署到centos7_onlyoffice 源码编译-CSDN博客