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
Button is used quite a lot. Here I have sorted ou...
Install jdk: Oracle official download https://www...
First, let’s take a look at the general practices...
Preface Forgotten passwords are a problem we ofte...
This article shares the specific code of js to re...
I will use three days to complete the static page...
Preface In the case of primary key conflict or un...
Git is integrated in vscode, and many operations ...
Docker officially recommends that we use port map...
I just learned some html yesterday, and I couldn...
Table of contents 1 Indicators in stress testing ...
Table of contents Method 1: Call the function dir...
Table of contents Preface 1. insert ignore into 2...
After a long period of transplantation and inform...
Copy code The code is as follows: <html xmlns=...