Code Monkey home page Code Monkey logo

fastdfs-1's Introduction

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(多个IP集群用逗号分割)

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

 docker-compose up -d 或者 docker-compose -f docker-compose-linux.yml up -d
  1. 至此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

fastdfs-1's People

Contributors

qbanxiaoli avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.