1. Prepare the Docker environment2. Search for fastdfs images3. Pull the imagedocker 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 servicedocker run -d --network=host --name tracker -v /root/fastdfs/tracker:/var/fdfs delron/fastdfs tracker 5. Start the storage servicedocker 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. Notes1. 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 portEnter 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:
|
<<: Theory: The two years of user experience
>>: CSS3 realizes the website product display effect diagram
30 free high-quality English ribbon fonts for down...
I used the label tag when I was doing something re...
First, let's introduce a few key points about...
This article example shares the specific code of ...
Using the official MySQL image requires some modi...
Normally, when you run a command in the terminal,...
Table of contents 1. React.Children.map 2. React....
Sometimes it is slow to download large network fi...
This article shares the specific code for using j...
This article will introduce an interesting pseudo...
Introduction to Linux top command The top command...
1. Background The following two problems are enco...
A web server can build multiple web sites with in...
Sometimes you will see English commas ",&quo...
This article shares the specific code of Vue to i...