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
What is the reason for the Last_IO_Errno:1236 err...
Preface: The storage engine is the core of the da...
1. Use the installation package to install MySQL ...
Preface 1. Debounce: After a high-frequency event...
Element UI implements multiple tables scrolling a...
Linux change hostname command 1. If you only need...
IP masquerading and port forwarding Firewalld sup...
This article shares the specific code of JavaScri...
1. Background I recently made a website, uidea, w...
This article shares the second article of using j...
Back in the Kernel 2.6 era, a new security system...
【author】 Liu Bo: Senior Database Manager at Ctrip...
disabled definition and usage The disabled attrib...
Table of contents Preface analyze Data Total Repe...
This article shares the detailed steps of install...