yum install docker -y yum install docker-compose -y
vi /etc/selinux/config
禁用一下SELINUX,重启一下服务器reboot
vim docker-compose.yml
version: '2.0' services: db: image: mariadb:10.5 container_name: seafile-mysql environment: - MYSQL_ROOT_PASSWORD=bigdata # Requested, set the root's password of MySQL service. - MYSQL_LOG_CONSOLE=true volumes: - /opt/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" volumes: - /opt/seafile-data:/shared # /opt/seafile-data可以换成任意目录,比如/mnt/seafile-data. environment: - DB_HOST=db - DB_ROOT_PASSWD=bigdata # Requested, the value shuold be root's password of MySQL service. - SEAFILE_ADMIN_EMAIL=账号 # Specifies Seafile admin user, default is 'me@example.com'. - SEAFILE_ADMIN_PASSWORD=密码 # Specifies Seafile admin password, default is 'asecret'. - SEAFILE_SERVER_LETSENCRYPT=false # Whether use letsencrypt to generate cert. depends_on: - db - memcached networks: - seafile-net networks: seafile-net:
如果有其他挂载的磁盘,可以改一下seafile:下面的volumes值
端口也可以改一下,不用默认的80,修改seafile-data/nginx/conf/seafile.nginx.conf中的80为任意端口
service docker start
docker-compose up -d
iptables -P INPUT ACCEPT
/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT
iptables-save > /etc/sysconfig/iptables
如果用了windows安装同步客户端的话,想要同步整个驱动器,需要建立一个软链接,用管理员打开CMD:
mklink /d tongbu_c c:
这样就可以把tongbu_c作为整个c盘驱动器上传到网盘了。