Configure FastDFS |
All FastDFS configuration files are in %FastDFS%/conf, including:
where, client.conf and http.conf do not need to be modified; the modifications of tracker.conf and storage.conf are as foolows:
Open the tracker.conf file in %FastDFS%/conf, and input the following orders:
cd FastDFS/conf
vi tracker.conf
Specify the directory to store the tracker log. This directory can be specified by the user, and this directory should be existed, or the tracker server can not be started. If there is no this directory, please create first. Find base_path and modify as follows:
base_path=/home/iserver/fastdfs/tracker
Modify store_group, which is corresponded to group_name of storage.conf. Find store_group, and modify as follows:
store_group=group1
Modify the download method. Default is download_server=0. Here we changed to download_server=1, that is, it will get from the source storage server of current file first.
download_server=1
Modify the reserved storage space of storage. You can also use the default value. If the storage space of FastDFS storage is less than this reserved value, the distributed tiling can not continue tiling.
reserved_storage_space=10%
Modify the storage mode. Default is use_trunk_file = false, here we changed to use_trunk_file = true
use_trunk_file = true
Open the storage.conf file in %FastDFS%/conf, and input the following orders:
cd FastDFS/conf
vi storage.conf
Specify the directory to store the storage log. This directory can be specified by the user, and this directory should be existed, or the storage server can not be started. If there is no this directory, please create first. Find base_path and modify as follows:
base_path=/home/iserver/fastdfs/storage
Specify the storage location of file. You can specify multiple locations on a storage server, and it should be existed. If not, please create first. Find store_path0 and modify as follows:
store_path0=/home/iserver/tiles
Modify the IP and port of tracker_server. The default port of tracker_server is 22122. Find tracker_server, and modify as follows:
tracker_server=192.168.112.251:22122
All FastDHT configuration files are in %FastDHT%/conf, including:
Open the fdhtd.conf file in %FastDHT%/conf, and input the following orders:
cd FastDFS/conf
vi fdhtd.conf
Specify the directory to store the fdhtd log. This directory can be specified by the user, and this directory should be existed. If there is no this directory, please create first. Find base_path and modify as follows:
base_path=/home/iserver/fastdht/server
Open the fdht_servers.conf file in %FastDHT%/conf, and input the following orders:
cd FastDHT/conf
vi fdht_servers.conf
Add the address of FastDHT server (IP: 192.168.112.12). Find group0 and modify as follows:
group_count = 1
group0=192.168.112.12:11411