实验环境
cat /etc/redhat-release && uname -a
CentOS Linux release 7.8.2003 (Core)
Linux centos7-1 3.10.0-1127.el7.x86_64
systemctl stop firewalld && systemctl disable firewalld
echo SELINUX=disabled > /etc/sysconfig/selinux
cp -pv /etc/sysctl.conf /etc/sysctl.conf.bak
echo net.ipv4.tcp_syncookies = 1 >> /etc/sysctl.conf
echo net.ipv4.tcp_tw_reuse = 1 >> /etc/sysctl.conf
echo net.ipv4.tcp_tw_recycle = 1 >> /etc/sysctl.conf
echo net.ipv4.tcp_fin_timeout = 10 >> /etc/sysctl.conf
echo net.ipv4.ip_forward = 1 >> /etc/sysctl.conf
sysctl -p
seafile服务端配置
yum install -y docker-ce
cat docker.service | grep dockerd
ExecStart=/usr/bin/dockerd --exec-opt native.cgroupdriver=systemd
systemctl daemon-reload && systemctl restat docker && systemctl enable docker chronyd --now && docker info | grep systemd
Cgroup Driver: systemd 修改docker默认驱动为 systemd
docker pull seafileltd/seafile
docker pull nginx:1.10.2
mkdir -pv /usr/local/docker/seafile
docker run -itd --name seafile \
--restart=always -p 88:80 \
-e SEAFILE_SERVER_HOSTNAME=seafile服务端ip \
-e [email protected] \ 管理员登入账号
-e SEAFILE_ADMIN_PASSWORD=admin \ 管理员密码
-v /usr/local/docker/seafile/:/shared \
seafileltd/seafile
cp -pv /usr/local/docker/seafile/seafile/conf/seafile.conf /usr/local/docker/seafile/seafile/conf/seafile.conf.bak
head -n4 /usr/local/docker/seafile/seafile/conf/seafile.conf
[fileserver]
port = 8082
max_upload_size=1048576 配置上传文件限制 手动配置
max_download_dir_size=1048576 配置下载文件限制 手动配置
docker logs -f seafile 查看seafile容器日志
run seafile server: ./seafile.sh { start | stop | restart }
run seahub server: ./seahub.sh { start <port> | stop | restart <port> }
-----------------------------------------------------------------
If you are behind a firewall, remember to allow input/output of these tcp ports:
-----------------------------------------------------------------
port of seafile fileserver: 8082
port of seahub: 8000
netstat -tuplna | grep LISTEN
tcp 0 0 0.0.0.0:88 0.0.0.0:* LISTEN 3376/docker-proxy
http://serverip:88/accounts/login/?next=/