Pull the imagedocker pull season/fastdfs:1.2 Start Trackerdocker run -ti -d --name trakcer -v /opt/fastdfs/tracker_data:/fastdfs/tracker/data --net=host season/fastdfs:1.2 tracker Start StorageNote that replace {ipaddress} docker run -ti -d --name storage -v /opt/fastdfs/storage_data:/fastdfs/storage/data -v /opt/fastdfs/store_path:/fastdfs/store_path --net=host -e TRACKER_SERVER:{ipaddress}:22122 season/fastdfs:1.2 storage Modify the configuration file The directory of vim is the directory after cp, such as my directory is /usr/local/fastdfs/conf docker cp storage:/fdfs_conf/. /usr/local/fastdfs/conf vim tracker.conf bind_addr=${ipaddress} vim storage.conf tracker_server=${ipaddress}:22122 vim-client.conf tracker_server=${ipaddress}:22122 #cp the modified configuration file back to the image docker cp /usr/local/fastdfs/conf/. storage:/fdfs_conf #Restart the storage service docker restart storage Configure NginxMount nginx.conf and mod_fastdfs.conf in the storage service #Add location /group1/M00 to the nginx.conf configuration file { #root /fastdfs/store_path/data; ngx_fastdfs_module; } #Configure cross-domain in the server. Configure cross-domain in the server. add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Credentials' 'true'; add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type'; #Add url_have_group_name=true in mod_fastdfs.conf Start NginxNote: When starting nginx, you need to map the paths of nginx.conf and mod_fastdfs.conf mounted in the previous step, so you need to write them according to your own paths, and remember to replace the {ipaddress} parameter docker run -id --name fastdfs_nginx --restart=always -v /opt/fastdfs/store_path:/fastdfs/store_path -v /usr/local/fastdfs/nginx_conf/nginx.conf:/etc/nginx/conf/nginx.conf -v /usr/local/fastdfs/nginx_conf/mod_fastdfs.conf:/etc/fdfs/mod_fastdfs.conf -p 8888:80 -e GROUP_NAME=group1 -e TRACKER_SERVER={ipaddress}:22122 -e STORAGE_SERVER_PORT=23000 season/fastdfs:1.2 nginx Configuring the Firewallfirewall-cmd --zone=public --add-port=22122/tcp --permanent firewall-cmd --zone=public --add-port=8888/tcp --permanent firewall-cmd --zone=public --add-port=23000/tcp --permanent firewall-cmd --reload This is the end of this article about the steps to install FastDFS on Docker. For more information about installing FastDFS on Docker, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Web page HTML code: production of scrolling text
>>: How to center images horizontally and vertically in DIV or DIV
Table of contents 1. Technical Overview 2. Techni...
Use the find command to find files larger than a ...
Maybe I started to think wrongly, and my descript...
I recently encountered a problem at work. There i...
This article shares the installation tutorial of ...
Recommended reading: Navicat12.1 series cracking ...
Table of contents 1. Introduction to NFS-Ganesha ...
1. MYSQL index Index: A data structure that helps...
Table of contents What is recursion and how does ...
This article mainly introduces the principle and ...
The isnull() function cannot be used as a substit...
Table of contents 1. Software and system image 2....
Previously, we knew several attributes of backgro...
Today is 618, and all major shopping malls are ho...
Connection query: It is the result of connecting ...