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

Mysql master-slave synchronization Last_IO_Errno:1236 error solution

What is the reason for the Last_IO_Errno:1236 err...

Briefly describe the MySQL InnoDB storage engine

Preface: The storage engine is the core of the da...

Installation process of MySQL5.7.22 on Mac

1. Use the installation package to install MySQL ...

Correct use of Vue function anti-shake and throttling

Preface 1. Debounce: After a high-frequency event...

Example code for element multiple tables to achieve synchronous scrolling

Element UI implements multiple tables scrolling a...

Detailed explanation of Linux host name modification command

Linux change hostname command 1. If you only need...

Detailed description of the use of advanced configuration of Firewalld in Linux

IP masquerading and port forwarding Firewalld sup...

Implementing a web calculator based on JavaScript

This article shares the specific code of JavaScri...

Implementation of Vue package size optimization (from 1.72M to 94K)

1. Background I recently made a website, uidea, w...

jQuery plugin to implement minesweeper game (2)

This article shares the second article of using j...

SELinux Getting Started

Back in the Kernel 2.6 era, a new security system...

MySQL DeadLock troubleshooting full process record

【author】 Liu Bo: Senior Database Manager at Ctrip...

Specific usage of textarea's disabled and readonly attributes

disabled definition and usage The disabled attrib...

A practical record of checking and processing duplicate MySQL records on site

Table of contents Preface analyze Data Total Repe...

CentOS installation mysql5.7 detailed tutorial

This article shares the detailed steps of install...