当前位置:   article > 正文

linux onlyOffice docker 离线部署_onlyoffice 离线部署

onlyoffice 离线部署


前言

docker 离线安装onlyoffice,如在线安装可直接跳过导出导入镜像步骤,拉取后直接运行。

1. 安装Docker容器

  1. 下载文件

wget https://download.docker.com/linux/static/stable/x86_64/docker-19.03.9.tgz

  1. 解压

把压缩文件存在指定目录下,并进行解压

tar -xvf docker-19.03.6.tgz
  • 1
  1. 将解压出来的docker文件内容移动到 /usr/bin/ 目录下
cp docker/\* /usr/bin/
  • 1

4、将docker注册为service

vim /etc/systemd/system/docker.service
  • 1
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network-online.target firewalld.service
Wants=network-online.target

[Service]
Type=notify
# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
# for containers run by docker
ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix://var/run/docker.sock
ExecReload=/bin/kill -s HUP $MAINPID
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
# Uncomment TasksMax if your systemd version supports it.
# Only systemd 226 and above support this version.
#TasksMax=infinity
TimeoutStartSec=0
# set delegate yes so that systemd does not reset the cgroups of docker containers
Delegate=yes
# kill only the docker process, not all processes in the cgroup
KillMode=process
# restart the docker process if it exits prematurely
Restart=on-failure
StartLimitBurst=3
StartLimitInterval=60s

[Install]
WantedBy=multi-user.target
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33

5、启动

systemctl daemon-reload #重载unit配置文件

systemctl start docker #启动Docker

systemctl enable docker.service #设置开机自启


2. 拉取镜像

  1. 搞个vmware,安装docker后执行 docker pull onlyoffice/documentserver
  2. 导出镜像
    1. 查看要导出的镜像 docker images
    2. 导出到当前所在目录 docker save 【镜像id】 -o onlyoffice.tar
  3. 导入到目标服务器 docker load -i onlyoffice.tar
  4. 启动 docker run -i -t -d -p 80:80 --restart=always 【镜像id】
    此时拉取的是最新版本,docker inspect 不显示版本号,经查询该版本可能是7.4.1 下载 ONLYOFFICE Docs | ONLYOFFICE
    在这里插入图片描述

3. 验证

浏览器访问服务器ip即可 例如:http://172.17.10.136/

在这里插入图片描述


在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/不正经/article/detail/477335
推荐阅读
相关标签
  

闽ICP备14008679号