In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces "how to use docker compose to install FastDfs file server". In daily operation, I believe many people have doubts about how to use docker compose to install FastDfs file server. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "how to use docker compose to install FastDfs file server". Next, please follow the editor to study!
Docker-compose.ymlversion: '2'services: fastdfs-tracker: hostname: fastdfs-tracker container_name: fastdfs-tracker image: season/fastdfs:1.2 network_mode: "host" command: tracker volumes: -. / tracker_data:/fastdfs/tracker/data fastdfs-storage: hostname: fastdfs-storage container_name: fastdfs-storage image: Season/fastdfs:1.2 network_mode: "host" volumes: -. / storage_data:/fastdfs/storage/data -. / store_path:/fastdfs/store_path environment:-TRACKER_SERVER=xxx.xxx.xxx.xxx:22122 command: storage depends_on:-fastdfs-tracker fastdfs-nginx: hostname: fastdfs-nginx Container_name: fastdfs-nginx image: season/fastdfs:1.2 network_mode: "host" volumes: -. / nginx.conf:/etc/nginx/conf/nginx.conf -. / store_path:/fastdfs/store_path environment:-TRACKER_SERVER=xxx.xxx.xxx.xxx:22122 command: nginx
It should be noted that:
Network_mode must be host, because when uploading files, tracker will send the IP and port of storage to client. If it is in bridge mode, the private network IP,client cannot be accessed.
Image uses season/fastdfs:1.2 instead of lastest, because lastest does not include nginx service, and other fasdfs images are not as streamlined as season.
Nginx.conf (used to download files in a way that provides http)
Listen 7003 is a ngingx service access port, which can be switched by itself.
# user nobody;worker_processes 1; # error_log logs/error.log;#error_log logs/error.log notice;#error_log logs/error.log info; # pid logs/nginx.pid; events {worker_connections 1024;} http {include mime.types; default_type application/octet-stream # log_format main'$remote_addr-$remote_user [$time_local] "$request" #'$status $body_bytes_sent "$http_referer" # "$http_user_agent" $http_x_forwarded_for "; # access_log logs/access.log main; sendfile on; # tcp_nopush on; # keepalive_timeout 0 Keepalive_timeout 65; # gzip on; server {listen 7003; server_name localhost; # charset koi8-r; # access_log logs/host.access.log main; location / group1/M00 {root / fastdfs/storage/data; ngx_fastdfs_module;} # error_page 404 / 404.html # redirect server error pages to the static page / 50x.html # error_page 500502503504 / 50x.hml; location = / 50x.html {root html;}} this is the end of the study on "how to use docker compose to install a FastDfs file server". I hope you can solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.