Some notes on installing fastdfs image in docker

Some notes on installing fastdfs image in docker

1. Prepare the Docker environment

2. Search for fastdfs images

3. Pull the image

docker pull delron/fastdfs

The reason for choosing the delron/fastdfs image is that it includes nginx so you don't have to install nginx forwarding yourself. You can also choose qbanxiaoli/fastdfs, which also includes nginx

4. Start the tracker service

docker run -d --network=host --name tracker -v /root/fastdfs/tracker:/var/fdfs delron/fastdfs tracker

5. Start the storage service

docker run -d --name storage --restart=always --net host -v /root/fastdfs/storage:/var/fdfs -e TRACKER_SERVER="IP:22122" delron/fastdfs storage

Note that if it is a cloud server, you need to change the IP to the external network IP

6. Notes

1. If it is a cloud server, you need to open ports 22122, 23000, and 8888 at the entrance of the security group of the cloud server background, and open the above three ports in the cloud server firewall configuration.

2. Test whether the build is successful

docker exec -it storage /bin/bash
echo "Hello FastDFS">index.html
fdfs_test /etc/fdfs/client.conf upload index.html

If the deployment is successful, the following screenshot should be returned after executing the above command

3. Access the resources just uploaded for testing

The default address is http://ip:8888/url, where ip is the external network ip, and url is the group_name value returned after uploading concatenated with the remote_filename value.

As shown in the figure above, the access address is http://ip:8888/group1/M00/00/00/wKgARmCu6TCAKyFbAAAADpNIeWE63_big.html

7. Modify the access port

Enter the storage container (docker exec -it storage bash), find the configuration file storage.conf in the /etc/fdfs directory, and modify http.server_port=8888 to the port you want.

Enter the conf under the nginx installation directory (/usr/local/nginx), modify the 8888 port in nginx.conf to the port you want, which must correspond to the http.server_port in the previous step

Restart nginx

Restart storage

Note: After modifying the port, if it is a cloud server, you need to open the modified ingress port in the cloud server background security group and open the modified port in the cloud server firewall.

The above is the detailed content of some precautions for installing fastdfs image in docker. For more information about installing fastdfs in docker, please pay attention to other related articles on 123WORDPRESS.COM!

You may also be interested in:
  • Detailed example of installing FastDfs file server using docker compose
  • Building FastDFS file system in Docker (multi-image tutorial)
  • How to install FastDFS in Docker
  • How to deploy FastDFS in Docker
  • How to use docker compose to build fastDFS file server

<<:  Theory: The two years of user experience

>>:  CSS3 realizes the website product display effect diagram

Recommend

30 free high-quality English ribbon fonts

30 free high-quality English ribbon fonts for down...

Analysis and solutions to problems encountered in the use of label tags

I used the label tag when I was doing something re...

Optimize the storage efficiency of BLOB and TEXT columns in InnoDB tables

First, let's introduce a few key points about...

Vue implements user login switching

This article example shares the specific code of ...

How to run Linux commands in the background

Normally, when you run a command in the terminal,...

Detailed usage of React.Children

Table of contents 1. React.Children.map 2. React....

js to achieve cool fireworks effect

This article shares the specific code for using j...

CSS pseudo-element::marker detailed explanation

This article will introduce an interesting pseudo...

Detailed explanation of using top command to analyze Linux system performance

Introduction to Linux top command The top command...

Two problems encountered when deploying rabbitmq with Docker

1. Background The following two problems are enco...

HTTP and HTTP Collaboration Web Server Access Flow Diagram

A web server can build multiple web sites with in...

About if contains comma expression in JavaScript

Sometimes you will see English commas ",&quo...

Vue implements DingTalk's attendance calendar

This article shares the specific code of Vue to i...