NextCloud安装配置OnlyOffice
NextCloud离线安装应用
下载插件包
https://apps.nextcloud.com/apps/onlyoffice/releases
https://apps.nextcloud.com/apps/richdocuments/releases
OnlyOffice
tar -zxf onlyoffice.tar.gz
cp onlyoffice /usr/share/nginx/html/apps/
chown -R nginx:nginx /usr/share/nginx/html/apps/onlyoffice
也可通过以下方式添加
cd /usr/share/nginx/html/apps/
git clone https://github.com/ONLYOFFICE/onlyoffice-nextcloud.git onlyoffice
cd onlyoffice
git submodule update --init --recursive
cd ..
chown -R nginx:nginx onlyoffice
更新 Selinux 上下文
sudo restorecon -R '/usr/share/nginx/html/'
sudo restorecon -R '/usr/share/nginx/data/'
sudo setsebool -P httpd_can_network_connect on
然后到 NextCloud 的应用界面启用后就能在设置里面进行配置了
NextCloud关闭证书验证(OnlyOffice使用自签证书时)
添加如下代码或在页面配置时勾选禁用证书验证
'onlyoffice' =>
array (
'verify_peer_off' => TRUE,
),
OnlyOffice关闭证书验证(NextCloud使用自签证书时)
修改配置关闭证书验证
vim /etc/onlyoffice/documentserver/default.json
# 修改如下
"rejectUnauthorized": false
重启服务器
reboot