In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the knowledge of "how to use Docker image to build a distributed file server". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
About FastDFS distributed File Server
I believe that when you click on this article, you already have some understanding of Docker and can easily apply it.
To tell you the truth, I don't know much about it.
However, according to the document step by step, you can build this server and realize the function of uploading and downloading.
But there will be a lot of problems in the process of building.
Therefore, a lot of time is spent on the construction of the system.
Then, in order to make it convenient to set up our file server quickly when we change the server next time, I chose to use docker's centos image to build fdfs and generate my fdfs image, and publish it to DockerHub.
The following is the open source documentation for fdfs
This is a simple pull can use fdfs distributed file system image, built-in run nginx with fdfs to achieve http download.
Related catalogue
Fdfs related configuration mount directory / etc/fdfs/tracker.conf / etc/fdfs/storage.conf nginx related configuration mount directory / etc/fdfs/mod_fastdfs.conf / opt/nginx/conf/nginx.conf fdfs related data mount directory / fastdfs/storage/data / fastdfs/tracker
Pull mode
$docker pull ly15326047083/fdfs:1.0
Related environmental variables
# nginx snooping ip NGINX_IP=127.0.0.1 # nginx snooping port FDFS_PORT=80 # tracker service ip TRACKER_IP=127.0.0.1 # tracker service port TRACKER_PORT=22122 # strage service port STORAGE_PORT=23000 # timeout CONNECT_TIMEOUT=10
Mode of use
# Mount configuration $docker run-d-v / host path / tracker.conf:/etc/fdfs/tracker.conf-v / host path / storage.conf:/etc/fdfs/storage.conf-- name custom container name ly15326047083/fdfs:1.0 # Mount data $docker run-d-v / host path / storage/data:/fastdfs/storage/data-- name custom container name ly15326047083/fdfs:1.0 With the environment variable $docker run-d-e "FDFS_PORT=80"-- name fdfs ly15326047083/fdfs:1.0 # use the example $docker run-d-p 80:80-p 22122-p 23000 docker run-e "NGINX_IP=192.168.2.23"-e "TRACKER_IP=192.168.2.23"-e "FDFS_PORT=80"-e "TRACKER_PORT=22122"-e "STORAGE_PORT=23000"-e "CONNECT_TIMEOUT=10"-- name fdfs This is the end of "how to use Docker Image to build a distributed File Server" Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.