共计 1959 个字符,预计需要花费 5 分钟才能阅读完成。
环境
类目 | 版本 | 备注 |
---|---|---|
操作系统 | centos 7 64 位 | |
Docker | 最新版 | |
Docker compose | 最新版 | 临时没有用上能够不装置 |
nextcloud | 最新版 | |
onlyoffice | 最新版 | |
mysql | 最新版 |
装置
根底依赖
yum install epel-release -y
yum install lynx wget expect iptables net-tools -y
敞开防火墙
systemctl stop firewalld
systemctl disable firewalld
装置 docker 相干
yum install git docker docker-compose -y
配置 docker 国内镜像源
curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://e674da1e.m.daocloud.io
启动 docker 并设置开机自启
systemctl start docker.service
systemctl enable docker
拉取 mysql、nextcloud、onlyoffice 镜像
docker pull mysql
docker pull nextcloud
docker pull onlyoffice/documentserver
装置 MySQL
docker run -p 3306:3306 --restart=always --name mysql -v /usr/local/mysql/conf:/etc/mysql/conf.d -v /usr/local/mysql/logs:/logs -v /usr/local/mysql/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456 -d mysql
配置 MySQL
docker exec -it mysql 容器 ID /bin/bash
root@ID:/# mysql -u root -p
mysql> GRANT ALL PRIVILEGES on *.* to root@'%' WITH GRANT OPTION;
mysql> ALTER USER 'root'@'%' IDENTIFIED BY '123456' PASSWORD EXPIRE NEVER;
Query OK, 0 rows affected (0.02 sec)
mysql> ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456';
Query OK, 0 rows affected (0.01 sec)
mysql> FLUSH PRIVILEGES;
mysql> exit
装置 nextcloud
docker run -p 8080:80 --restart=always -v /root/nextcloud/html:/var/www/html -v /root/nextcloud/apps:/var/www/html/custom_apps -v /root/nextlcoud/config:/var/www/html/config -v /root/nextcloud/nextcloud/data:/var/www/html/data -v /rott/nextcloud/themes:/var/www/html/themes -d nextcloud
配置 nextcloud
- 设置用户名、明码
- 配置连贯 mysql 数据库配置信息(数据库【没有时可主动创立】、用户名、明码、IP 地址)
装置 onlyoffice
docker run -i -t -d -p 6060:80 --restart=always -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data -v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice -v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql onlyoffice/documentserver
配置 onlyoffice
-
nextcloud 装置 onlyoffice app
点击右上角用户图标 –》利用 –》office & text–》only office –》点击下载安装并启用
- 批改 nextcloud config.php 设置
增加如下语句,门路 /root/nextlcoud/config
'allow_local_remot_servers' => true;
-
配置 nextcloud onlyoffice 服务器地址
点击右上角用户图标 –》设置 –》onlyoffice–》配置相干信息
原文链接
正文完