a5060963
作者a5060963·2022-02-11 16:05
运维工程师·民营500强企业

SeaFile 部署说明

字数 1779阅读 604评论 1赞 1

1、申请https证书 阿里云申请免费的ssl证书,并下载准备好 创建好data目录,并丢入证书

Shell

复制代码

mkdir -p /data/seafile/ssl
# 目录形式
[root@git ssl]# pwd
/data/seafile/ssl
[root@git ssl]# tree
├── seafile.jinyafu.com.crt
└── seafile.jinyafu.com.key
0 directories, 2 files

2、安装docker、docker-compose
由于seafile官方推荐使用compose进行安装,需要在服务器安装该工具

安装docker-compose

yum install docker docker-compose -y

启动docker

systemctl start docker

systemctl enable docker

3、开始部署seafile

修改官方的compose配置文件

在家目录vi docker-compose.yml ,由于docker-compose是认当前目录的,在别的目录是无法执行的

cd ~

vi docker-compose.yml

version: '2.0'

services:

db:

image: mariadb:10.1

container_name: seafile-mysql

environment:

  • MYSQL_ROOT_PASSWORD=db_dev # Requested, set the root's password of MySQL service.
  • MYSQL_LOG_CONSOLE=true

volumes:

  • /data/seafile/seafile-mysql/db:/var/lib/mysql # Requested, specifies the path to MySQL data persistent store.

networks:

  • seafile-net

memcached:

image: memcached:1.5.6

container_name: seafile-memcached

entrypoint: memcached -m 256

networks:

  • seafile-net

seafile:

image: seafileltd/seafile-mc:latest

container_name: seafile

ports:

  • "80:80"
  • "443:443" # If https is enabled, cancel the comment.

volumes:

  • /data/seafile/seafile-data:/shared # Requested, specifies the path to Seafile data persistent store.

environment:

  • DB_HOST=db
  • DB_ROOT_PASSWD=db_dev
  • TIME_ZONE=Asia/Shanghai
  • SEAFILE_ADMIN_EMAIL=admin@jinyafu.com
  • SEAFILE_ADMIN_PASSWORD=Aa123456
  • SEAFILE_SERVER_LETSENCRYPT=true
  • SEAFILE_SERVER_HOSTNAME=seafile.jinyafu.com

depends_on:

  • memcached

networks:

  • seafile-net

networks:

seafile-net:

4、启动并验证

配置hub加速器

tee /etc/docker/daemon.json <<-'EOF'

{

"registry-mirrors": [

"https://registry.docker-cn.com",

"https://docker.mirrors.ustc.edu.cn"

]

}

EOF

重启生效

systemctl restart docker

运行seafile

docker-compose up -d

访问对应地址:http://xxx.xxx.xxx.xxx

输入对应账号密码信息

如果觉得我的文章对您有用,请点赞。您的支持将鼓励我继续创作!

1

添加新评论1 条评论

rexchowrexchow测试广州雅江光电
2022-02-11 16:24
6666666666
Ctrl+Enter 发表

作者其他文章

  • nodejs安装
    评论 1 · 赞 1
  • mysql 导出
    评论 1 · 赞 1
  • jenkins快速拷贝
    评论 1 · 赞 1
  • Linux LVM 分区
    评论 1 · 赞 1
  • nginx常用配置
    评论 1 · 赞 1
  • X社区推广