Onlyoffice Documentserver
ナビゲーションに移動
検索に移動
Onlyoffice Documentserver は Open Document, Word, Excel などの様々なオフィスドキュメントをブラウザからオンラインで編集するためのフル機能のバックエンドです。オープンソースのソフトウェアであり、既存のサーバーに簡単にデプロイ・統合することができます。フロントエンドとしては Nextcloud あるいは Onlyoffice CommunityServer が利用可能です。お手製のソフトウェアで使うこともできます。PHP や Nodejs などの サンプル を見てください。
インストール
onlyoffice-documentserverAUR パッケージをインストールしてください。さらにデータベースバックエンドとして PostgreSQL と Redis と RabbitMQ サービスが必要です。
設定
データベース
Postgresql データベースバックエンドの設定が必要です。データベースの設定は以下のようになります:
$ sudo -i -u postgres psql -c "CREATE DATABASE onlyoffice;" $ sudo -i -u postgres psql -c "CREATE USER onlyoffice WITH password 'onlyoffice';" $ sudo -i -u postgres psql -c "GRANT ALL privileges ON DATABASE onlyoffice TO onlyoffice;"
documentserver のデータベーススキーマを移動するために、以下のコマンドを実行:
$ psql -hlocalhost -Uonlyoffice -d onlyoffice -f /usr/share/webapps/onlyoffice/documentserver/server/schema/postgresql/createdb.sql
ウェブサーバー
Nginx ウェブサーバーの設定例:
/etc/nginx/sites-available/onlyoffice-documentserver
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;
}
location /spellchecker/ {
proxy_pass http://localhost:8080/;
proxy_http_version 1.1;
}
}
起動
同一のマシンでローカルで使用したい場合は次のサービスを起動・有効化してください: rabbitmq, redis, postgresql。最後に documentserver のサービスを起動してください: onlyoffice-spellchecker, onlyoffice-fileconverter, onlyoffice-docservice.