VMware Workstation一键Docker部署私有网盘教程
企业私有网盘介绍:
数据安全:私有网盘可提供更高级别的数据加密和安全防护,确保隐私和敏感数据不被未经授权的人员访问或泄露。
数据控制和定制化:私有网盘能够提供更灵活的数据管理和定制化服务,满足企业特定的业务需求,提升工作效率和数据管理水平。
避免第三方风险:部署私有网盘可以降低对第三方服务的依赖,减少数据被黑客攻击或服务提供商内部员工滥用的风险。
本教程对Seafile细致功能不做演示,欢迎评论留言探讨。
准备工具:
VMware Workstation 17,可直接部署Vmware Vsphere环境。
Centos7系统,推荐使用最小化安装
Seafile的docker-compose.yml 文件。
Centos7系统镜像及docker-compose.yml文件请点击下载
第一步docker-compose.yml介绍
说明:如下为配置文件,由于测试环境,我这里就不做修改了。可以根据实际情况修改。
部署完成后直接使用浏览器访问Centos的ip地址即可,
登录用户名:dengpeng@powershell.com.cn 登录密码:123456
注意:如果修改seafile容器的外部80访问端口后,需要在登录seafile后,在设置里面修改端口,否则无法无法上传文件。
services: db: image: mariadb:10.11 container_name: seafile-mysql restart: always environment: - MYSQL_ROOT_PASSWORD=db_dev # Requested, set the root's password of MySQL service. - MYSQL_LOG_CONSOLE=true - MARIADB_AUTO_UPGRADE=1 volumes: - /root/seafile/db:/var/lib/mysql # Requested, specifies the path to MySQL data persistent store. networks: - bridge memcached: image: memcached:1.6.18 container_name: seafile-memcached restart: always entrypoint: memcached -m 256 networks: - bridge seafile: image: seafileltd/seafile-mc:11.0-latest restart: always container_name: seafile ports: - "80:80" # - "443:443" # If https is enabled, cancel the comment. volumes: - /root/seafile:/shared # Requested, specifies the path to Seafile data persistent store. environment: - DB_HOST=db - DB_ROOT_PASSWD=db_dev # 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=dengpeng@powershell.com.cn # Specifies Seafile admin user, default is 'me@example.com'. - SEAFILE_ADMIN_PASSWORD=123456 # Specifies Seafile admin password, default is 'asecret'. - SEAFILE_SERVER_LETSENCRYPT=false # Whether use letsencrypt to generate cert. - SEAFILE_SERVER_HOSTNAME=wangpan.powershell.com.cn # Specifies your host name. depends_on: - db - memcached networks: - bridge networks: bridge:
第二步:准备好Centos7系统,并一键安装容器。
1 确定Centos7能连接互联网,需要通过网络下载yum源及Docker镜像文件。
2 运行如下命令,更新yum源。
sudo yum install -y yum-utils sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
3 使用 sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y命令安装容器
第三步:上传docker-compose.yml至Centos的opt目录下,由于测试环境使用默认配置。
1 如下图,其中另外三个目录在部署过程中,docker-compose.yml脚本会自动创建,其实就是容器映射的物理地址。
2 使用cd /opt命令切换到opt目录下,执行 docker compose up -d 命令。
3 使用Docker ps 命令查看容器运行情况,如下容器运行正常。
第四步:通过浏览器访问Centos主机的IP地址并登录:
如下图,创建目录了一个我的文件目录后,进入点击上传即可上传文件如下图,Seafile手机客户端,输入服务器IP地址即可登录。
