:::info
官网:https://www.seafile.com/
GitHub:https://github.com/haiwen/seafile
:::
Seafile 是一款开源的企业云盘,注重可靠性和性能。
支持 Windows,Mac,Linux,iOS,Android 平台。
支持文件同步或者直接挂载到本地访问。
- 可靠的文件同步
- 挂载盘客户端
- 团队协作
- 高性能
- Wiki 与知识管理
- 适用于企业环境
cat /etc/os-release
// 1) 低版本 Docker 安装
yum install docker -y
----
// < '推荐' >
// 2) 高版本 Docker 安装
curl -fsSL https://get.docker.com/ | sh
----
// 关闭防火墙
systemctl disable --now firewalld
setenforce 0
// 启用 Docker
systemctl enable --now docker
docker info
[root@blog ~] echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
[root@blog ~] systemctl restart network
[root@blog ~] sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 1
curl -L https://github.com/docker/compose/releases/download/v2.2.2/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
docker-compose -v
mkdir /docker/seafile -p && cd /docker/seafile
[root@blog seafile] vim docker-compose.yaml
version: '2.0'
services:
db:
image: mariadb:10.5
container_name: seafile-mysql
environment:
- MYSQL_ROOT_PASSWORD=P@ssw0rd123456 # Requested, set the root's password of MySQL service.
- MYSQL_LOG_CONSOLE=true
volumes:
- /docker/seafile/db:/var/lib/mysql # Requested, specifies the path to MySQL data persistent store.
networks:
- seafile-net
memcached:
image: memcached:1.6
container_name: seafile-memcached
entrypoint: memcached -m 256
networks:
- seafile-net
seafile:
image: seafileltd/seafile-mc:latest
container_name: seafile
ports:
- 8099:80
# - "443:443" # If https is enabled, cancel the comment.
volumes:
- /docker/seafile/data:/shared # Requested, specifies the path to Seafile data persistent store.
environment:
- DB_HOST=db
- DB_ROOT_PASSWD=P@ssw0rd123456 # Requested, the value shuold be root's password of MySQL service.
# - TIME_ZONE=Asia/Shanghai # Optional, default is UTC. Should be uncomment and set to your local time zone.
- SEAFILE_ADMIN_EMAIL=me@example.com # Specifies Seafile admin user, default is 'me@example.com'.
- SEAFILE_ADMIN_PASSWORD=asecret # Specifies Seafile admin password, default is 'asecret'.
- SEAFILE_SERVER_LETSENCRYPT=false # Whether use letsencrypt to generate cert.
- SEAFILE_SERVER_HOSTNAME=seafile.example.com # Specifies your host name.
depends_on:
- db
- memcached
networks:
- seafile-net
networks:
seafile-net:
docker-compose up -d
docker ps -a
docker-compose logs -f
:::info
**如下信息:**可以在 docker-compose 文件中修改
:::
me@example.com
asecret
此处必须修改,否则影响文件上传。
大工告成~