Linux|运维|docker+centos7部署最新版seafile私有网盘专业版-2026(可离线部署)

📅 2026/8/22 2:58:34
Linux|运维|docker+centos7部署最新版seafile私有网盘专业版-2026(可离线部署)
前言书接上回Linux|运维|dockercentos7部署最新版seafile私有网盘社区版-2026可离线部署-CSDN博客社区版部署完毕后总要看看专业版有点什么不一样的。据官网所说seafile专业版轻松符合等保也就是说安全方面专业版做了很大的加强其次是专业版可以文件内容检索用户的权限可以更细粒度分配。ok那么如何部署seafile专业版并且专业版的功能到底值不值的用本文将做一个详细的介绍。本次案例所使用的资料已整理为离线安装包下载地址通过网盘分享的文件seafile-image-pro链接: https://pan.baidu.com/s/1MZEC1Z5Lb4nv5-302mDBAA?pwd2nqj 提取码: 2nqj--来自百度网盘超级会员v8的分享一、seafile专业版部署步骤1、docker环境这个不在这里多余废话了systemctl status docker 看状态正常即可[rootlocalhost ~]# docker info Client: Context: default Debug Mode: false Plugins: compose: Docker Compose (Docker Inc., v2.27.1) Server: Containers: 7 Running: 7 Paused: 0 Stopped: 0 Images: 8 Server Version: 20.10.19 Storage Driver: overlay2 Backing Filesystem: xfs Supports d_type: true Native Overlay Diff: true userxattr: false Logging Driver: json-file Cgroup Driver: cgroupfs Cgroup Version: 1 Plugins: Volume: local Network: bridge host ipvlan macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog Swarm: inactive Runtimes: io.containerd.runtime.v1.linux runc io.containerd.runc.v2 Default Runtime: runc Init Binary: docker-init containerd version: 9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6 runc version: v1.1.4-0-g5fd4c4d1 init version: de40ad0 Security Options: seccomp Profile: default Kernel Version: 3.10.0-1062.el7.x86_64 Operating System: CentOS Linux 7 (Core) OSType: linux Architecture: x86_64 CPUs: 16 Total Memory: 15.59GiB Name: localhost.localdomain ID: IDU5:FTJ3:I5CR:FK5N:XWY4:YDVT:GSZT:K5VW:IRMK:BJ5Y:2SEO:WITG Docker Root Dir: /var/lib/docker Debug Mode: false Registry: https://index.docker.io/v1/ Labels: Experimental: false Insecure Registries: 127.0.0.0/8 Registry Mirrors: https://docker.m.daocloud.io/ https://dockerproxy.com/ https://docker.mirrors.ustc.edu.cn/ https://docker.nju.edu.cn/ https://hub-mirror.c.163.com/ https://docker.1ms.run/ https://docker.xuanyuan.me/ https://xuanyuan.cloud/ https://mirror.baidubce.com/ Live Restore Enabled: true Product License: Community Engine WARNING: bridge-nf-call-iptables is disabled WARNING: bridge-nf-call-ip6tables is disabled配置文件使用如下内容即可[rootlocalhost ~]# cat /etc/docker/daemon.json { registry-mirrors: [ https://dockerproxy.com, https://docker.mirrors.ustc.edu.cn, https://docker.nju.edu.cn, https://hub-mirror.c.163.com, https://docker.1ms.run, https://docker.xuanyuan.me, https://docker.m.daocloud.io, https://docker.xuanyuan.me, https://mirror.baidubce.com ], log-driver: json-file, log-opts: { max-size: 100m, max-file: 3 }, live-restore: true, storage-driver: overlay2 }2、导入所有镜像docker load -i 镜像名称即可专业版使用的镜像是7个依次导入即可镜像列表如下[rootlocalhost ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE seafileltd/seafile-pro-mc 13.0-latest c8ffa835e6f2 2 days ago 1.88GB clamav/clamav latest 05b26ab97d33 11 days ago 234MB redis latest 0458cdd27215 2 weeks ago 146MB mariadb 10.11 1a3c5f4fdaa7 2 weeks ago 326MB lucaslorentz/caddy-docker-proxy 2.12-alpine 1d972a2c817f 2 months ago 61.6MB seafileltd/sdoc-server 2.0-latest a6cd4318bb58 8 months ago 1.14GB elasticsearch 8.15.0 a249dfc37cb5 2 years ago 1.26GB3、docker-compose部署安装引入外部源tee /etc/yum.repos.d/docker-ce.repo EOF [docker-ce-stable] nameDocker CE Stable - $basearch baseurlhttps://mirrors.aliyun.com/docker-ce/linux/centos/7/$basearch/stable enabled1 gpgcheck1 gpgkeyhttps://mirrors.aliyun.com/docker-ce/linux/centos/gpg EOF安装docker-compose插件yum makecache fast yum install -y docker-compose-plugin内核优化cat /etc/sysctl.conf EOF vm.overcommit_memory 1 net.core.somaxconn 511 EOF4、下载docker-compose的编排文件和环境文件# Seafile PRO 13.0 wget -O .env https://manual.seafile.com/13.0/repo/docker/pro/env wget https://manual.seafile.com/13.0/repo/docker/seadoc.yml wget https://manual.seafile.com/13.0/repo/docker/pro/seafile-server.yml wget https://manual.seafile.com/13.0/repo/docker/caddy.yml wget https://manual.seafile.com/13.0/repo/docker/pro/elasticsearch.yml wget https://manual.seafile.com/13.0/repo/docker/pro/clamav.yml也可以直接使用上面的百度网盘的离线包内的文件设定MySQL密码和seafile登陆用户名和密码以及要暴露的端口env文件SEAFILE_SERVER_HOSTNAME 本机IP端口如果默认80的话端口可以省略本例是IP10087端口 TIME_ZONEAsia/Shanghai SEAFILE_MYSQL_DB_PASSWORD 这里尽量不使用默认密码设定密码的目的一个是为了安全一个是如果有维护需求方便进入数据库维护 IS_PRO_VERSIONtrue 文件末尾添加这个条目否则不识别专业版镜像 BASIC_STORAGE_PATH/opt 这个是容器映射存储位置可以按需更改有一些数据是本地化存储的 SEAF_SERVER_STORAGE_TYPEdisk # disk, s3, multiple 这里直接用disk表示本地磁盘存储 INIT_SEAFILE_MYSQL_ROOT_PASSWORD密码 ## Seafile admin user INIT_SEAFILE_ADMIN_EMAILXXX126.com #登陆账号管理员权限 INIT_SEAFILE_ADMIN_PASSWORD密码 #登陆密码管理员权限seafile-server.yml 文件这里主要就是修改端口seafile: image: ${SEAFILE_IMAGE:-seafileltd/seafile-pro-mc:13.0-latest} container_name: seafile restart: unless-stopped ports: - 10087:80 - 8082:80825、启动seafile[rootlocalhost opt]# docker compose up -d [] Running 8/8 ✔ Network seafile-net Created 0.1s ✔ Container seafile-clamav Started 0.8s ✔ Container seafile-mysql Healthy 21.4s ✔ Container seafile-elasticsearch Started 0.7s ✔ Container seafile-caddy Started 0.7s ✔ Container seafile-redis Started 0.9s ✔ Container seadoc Started 24.0s ✔ Container seafile Started这里需要注意所有配置文件都在同一个目录下在启动完成后稍等1 2分钟然后查看各个容器日志没有明显报错表示部署成功[rootlocalhost opt]# docker compose ps NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS seadoc seafileltd/sdoc-server:2.0-latest /sbin/my_init -- /s… seadoc 38 hours ago Up 38 hours 80/tcp seafile seafileltd/seafile-pro-mc:13.0-latest /sbin/my_init -- /s… seafile 38 hours ago Up 38 hours (healthy) 0.0.0.0:8082-8082/tcp, :::8082-8082/tcp, 0.0.0.0:10087-80/tcp, :::10087-80/tcp seafile-caddy lucaslorentz/caddy-docker-proxy:2.12-alpine /bin/caddy docker-p… caddy 38 hours ago Up 38 hours (healthy) 0.0.0.0:80-80/tcp, :::80-80/tcp, 0.0.0.0:443-443/tcp, :::443-443/tcp, 2019/tcp seafile-clamav clamav/clamav:latest /init av 38 hours ago Up 38 hours (healthy) 3310/tcp, 7357/tcp seafile-elasticsearch elasticsearch:8.15.0 /bin/tini -- /usr/l… elasticsearch 38 hours ago Up 38 hours 9200/tcp, 9300/tcp seafile-mysql mariadb:10.11 docker-entrypoint.s… db 38 hours ago Up 38 hours (healthy) 3306/tcp seafile-redis redis docker-entrypoint.s… redis 38 hours ago Up 38 hours 6379/tcpok下面进入web页面测试各项功能二、1、seafile的安全功能 防病毒该功能是由镜像seafile-clamav提供随便找一个Windows的激活工具此类工具通常都会识别成病毒类型上传防病毒会阻止此次上传这里就比较奇怪了防病毒这里拦截了但是日志那里看不到防病毒功能成功安全审计功能失败这里不得不说是一个遗憾啊2、文件内容搜索首先执行更新索引命令[rootlocalhost opt]# docker exec -it seafile bash -c cd seafile-server-latest/pro/ python3 pro.py search --update Updating file index, this may take a while... 2026-08-21 11:04:11,868 Load disk config: storage_dir/opt/seafile/seafile-data/storage/commits 2026-08-21 11:04:11,868 Load disk config: storage_dir/opt/seafile/seafile-data/storage/fs 2026-08-21 11:04:11,868 Load disk config: storage_dir/opt/seafile/seafile-data/storage/blocks 2026-08-21 11:04:12,158 storage: using filesystem storage backend 2026-08-21 11:04:12,158 index office pdf: True 2026-08-21 11:04:12,165 Index process initialized. 2026-08-21 11:04:12,165 starting worker0 worker threads for indexing 2026-08-21 11:04:12,165 starting worker1 worker threads for indexing 2026-08-21 11:04:14,194 worker1 worker updated at 2026-08-21 11:04 time 2026-08-21 11:04:14,196 Updating repo 263f64e3-9dd0-4f5a-8d89-46ba27a491db 2026-08-21 11:04:14,196 worker1 worker get 0 error 2026-08-21 11:04:14,280 file /冒牌大英雄.txt size exceeds limit 2026-08-21 11:04:14,348 worker0 worker updated at 2026-08-21 11:04 time 2026-08-21 11:04:14,348 worker0 worker get 0 error 2026-08-21 11:04:14,348 All worker threads has stopped. 2026-08-21 11:04:14,348 index updated, total time 2.1830897331237793 seconds 2026-08-21 11:04:14,348 start to clear deleted repo 2026-08-21 11:04:14,356 0 repos need to be deleted. 2026-08-21 11:04:14,356 deleted repo has been cleared 2026-08-21 11:04:14,356 Index updated, statistic report: 2026-08-21 11:04:14,356 [commit read] 2 2026-08-21 11:04:14,356 [dir read] 2 2026-08-21 11:04:14,356 [file read] 1 2026-08-21 11:04:14,357 [block read] 0 Updating wiki index, this may take a while... 2026-08-21 11:04:15,298 Load disk config: storage_dir/opt/seafile/seafile-data/storage/commits 2026-08-21 11:04:15,299 Load disk config: storage_dir/opt/seafile/seafile-data/storage/fs 2026-08-21 11:04:15,299 Load disk config: storage_dir/opt/seafile/seafile-data/storage/blocks 2026-08-21 11:04:15,603 storage: using filesystem storage backend 2026-08-21 11:04:15,611 Index process initialized. 2026-08-21 11:04:15,612 starting worker0 worker threads for indexing 2026-08-21 11:04:15,612 starting worker1 worker threads for indexing 2026-08-21 11:04:17,613 worker1 worker updated at 2026-08-21 11:04 time 2026-08-21 11:04:17,613 worker1 worker get 0 error 2026-08-21 11:04:17,616 worker0 worker updated at 2026-08-21 11:04 time 2026-08-21 11:04:17,616 worker0 worker get 0 error 2026-08-21 11:04:17,617 All worker threads has stopped. 2026-08-21 11:04:17,617 wiki index updated, total time 2.0050487518310547 seconds 2026-08-21 11:04:17,617 start to clear deleted wiki 2026-08-21 11:04:17,625 0 wikis need to be deleted. 2026-08-21 11:04:17,625 deleted wiki has been cleared 2026-08-21 11:04:17,625 Index updated, statistic report: 2026-08-21 11:04:17,625 [commit read] 0 2026-08-21 11:04:17,625 [dir read] 0 2026-08-21 11:04:17,626 [file read] 0 2026-08-21 11:04:17,626 [block read] 0看着日志没什么问题但内容搜索有点不好使一会正常一会失败该功能是es的分词器插件提供。这里需要特别注意的一点是如果文本文件体积超过10M可能不会建立索引经过查询配置文件该文件是容器内的seafevents.conf内容如下[SEAHUB EMAIL] enabled true ## interval of sending Seahub email. Can be s(seconds), m(minutes), h(hours), d(days) interval 30m # Enable statistics [STATISTICS] enabledtrue [AUDIT] enabled true [INDEX FILES] external_es_server true es_host elasticsearch es_port 9200 enabled true interval 10m highlight fvh ## If true, indexes the contents of office/pdf files while updating search index ## Note: If you change this option from false to true, then you need to clear the search index and update the index again. See the FAQ for details. index_office_pdf true # Enable file history [FILE HISTORY] enabled true suffix md,txt,doc,docx,xls,xlsx,ppt,pptx,sdoc[INDEX FILES] 条目下增加 max_size500然后重启seafile服务但经验证并没有效果此问题存疑。完结撒花