Skip to content

heyibo8888/fastdfs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastDFS+FastDHT单机版

使用docker-compose创建FastDFS+FastDHT单机版服务(tracker,storage,fastdht,nginx)

搭建教程

  1. 安装docker和docker-compose
  2. 安装git
  3. clone项目
git clone https://[email protected]/qbanxiaoli/fastdfs.git 
  1. 进入fastdfs目录
 cd fastdfs
  1. 修改docker-compose.yml,指定IP

  2. 执行docker-compose命令,linux环境下需要指定使用docker-compose-linux.yml文件

 docker-compose up -d 或者 docker-compose -f docker-compose-linux.yml up -d
  1. 至此一个单机版的fastdfs文件系统已经搭建完成,下面测试fastdfs是否搭建成功
 docker exec -it fastdfs /bin/bash 

 echo "Hello FastDFS!">index.html

 fdfs_test /etc/fdfs/client.conf upload index.html

重启tracker_server

 /usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf restart

重启storage_server

 /usr/bin/fdfs_storaged /etc/fdfs/storage.conf restart

重启fastdht_server

 /usr/local/bin/fdhtd /etc/fdht/fdhtd.conf restart

查看storage状态

 fdfs_monitor /etc/fdfs/client.conf

该镜像已经上传到公开镜像仓库,也可跳过镜像构建步骤,直接从Docker Hub或者阿里云容器镜像仓库上拉取,linux环境下可用如下命令拉取镜像后直接运行容器

 docker pull qbanxiaoli/fastdfs 或者 docker pull registry.cn-hangzhou.aliyuncs.com/qbanxiaoli/fastdfs

 docker run -d --restart=always --net=host --name=fastdfs -e IP=192.168.0.105 -v ~/fastdfs:/var/local qbanxiaoli/fastdfs

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 100.0%