📄 install
字号:
Copy right 2009 Happy Fish / YuQingFastDFS may be copied only under the terms of the GNU GeneralPublic License V3, which may be found in the FastDFS source kit.Please visit the FastDFS Home Page for more detail.English language: http://english.csource.org/Chinese language: http://www.csource.org/#step 1. download FastDFS source package and unpack ittar xzf FastDFS_v1.x.tar.gz#for example:tar xzf FastDFS_v1.13.tar.gz#step 2. enter the FastDFS dircd FastDFS#step 3. make all./make.sh#step 4. make install./make.sh install#step 5. edit/modify the config file of tracker and storage#step 6. run server programs#start the tracker server:/usr/local/bin/fdfs_trackerd <tracker_conf_filename>#start the storage server:/usr/local/bin/fdfs_storaged <storage_conf_filename>#step 7. run test program#run the client test program:/usr/local/bin/fdfs_test <storage_conf_filename> <operation>#for example, upload a file:/usr/local/bin/fdfs_test conf/storage.conf upload /usr/include/stdlib.h#step 8. run monitor program#run the monitor program:/usr/local/bin/fdfs_monitor <storage_conf_filename>tracker server config file sample:###start of tracker server config###disabled=falsebind_addr=port=22122network_timeout=20base_path=/home/yuqing/FastDFSmax_connections=256# the method of selecting group to upload files# 0: round robin# 1: specify group# 2: load balance, select the max free space group to upload filestore_lookup=0# which group to upload file# when store_lookup set to 1, must set store_group to the group namestore_group=group2# which storage server to upload file# 0: round robin (default)# 1: the first server order by ip addressstore_server=0# which path(means disk or mount point) of the storage server to upload file# 0: round robin# 2: load balance, select the max free space path to upload filestore_path=0# which storage server to download file# 0: round robin (default)# 1: the source storage server which the current file uploaded todownload_server=0#reserved storage space for system or other applications.#if the free(available) space of any stoarge server in a group <= reserved_storage_space,#no file can be uploaded to this group.#bytes unit can be one of follows:### G or g for gigabyte(GB)### M or m for megabyte(MB)### K or k for kilobyte(KB)### no unit for byte(B)reserved_storage_space = 4GB#standard log level as syslog, case insensitive, value list:### emerg for emergency### alert### crit for critical### error### warn for warning### notice### info### debuglog_level=info#unix group name to run this program,#not set (empty) means run by the group of current userrun_by_group=#unix username to run this program,#not set (empty) means run by current userrun_by_user=# allow_hosts can ocur more than once, host can be hostname or ip address,# "*" means match all ip addresses, can use range like this: 10.0.1.[1-15,20] or# host[01-08,20-25].domain.com, for example:# allow_hosts=10.0.1.[1-15,20]# allow_hosts=host[01-08,20-25].domain.comallow_hosts=*###end of tracker server config###storage server config file sample:###start of storage server config###disabled=falsegroup_name=group1bind_addr=port=23000network_timeout=20heart_beat_interval=30stat_report_interval=600base_path=/home/yuqing/FastDFSmax_connections=256# when no entry to sync, try read binlog again after X milliseconds# 0 for try again immediately (not need to wait)sync_wait_msec=200# after sync a file, usleep milliseconds# 0 for sync successively (never call usleep)sync_interval=0# sync start time of a day, time format: Hour:Minute# Hour from 0 to 23, Minute from 0 to 59sync_start_time=00:00# sync end time of a day, time format: Hour:Minute# Hour from 0 to 23, Minute from 0 to 59sync_end_time=23:59# path(disk or mount point) count, default value is 1store_path_count=1# store_path#, based 0, if store_path0 not exists, it's value is base_path# the paths must be existstore_path0=/home/yuqing/fastdfs#store_path1=/home/yuqing/fastdfs2# subdir_count * subdir_count directories will be auto created under each# store_path (disk), value can be 1 to 256, default value is 256subdir_count_per_path=256tracker_server=10.62.164.83:22122tracker_server=10.62.164.84:22122#standard log level as syslog, case insensitive, value list:### emerg for emergency### alert### crit for critical### error### warn for warning### notice### info### debuglog_level=info#unix group name to run this program,#not set (empty) means run by the group of current userrun_by_group=#unix username to run this program,#not set (empty) means run by current userrun_by_user=# allow_hosts can ocur more than once, host can be hostname or ip address,# "*" means match all ip addresses, can use range like this: 10.0.1.[1-15,20] or# host[01-08,20-25].domain.com, for example:# allow_hosts=10.0.1.[1-15,20]# allow_hosts=host[01-08,20-25].domain.comallow_hosts=*###end of storage server config###Item detail1. common items---------------------------------------------------| item name | type | default | Must |---------------------------------------------------| base_path | string | | Y |---------------------------------------------------| disabled | boolean| false | N |---------------------------------------------------| bind_addr | string | | N |---------------------------------------------------| network_timeout | int | 30(s) | N |---------------------------------------------------| max_connections | int | 256 | N |---------------------------------------------------| log_level | string | info | N |---------------------------------------------------| run_by_group | string | | N |---------------------------------------------------| run_by_user | string | | N |---------------------------------------------------| allow_hosts | string | * | N |---------------------------------------------------| sync_log_buff_interval| string | 10(s) | N |---------------------------------------------------memo: * base_path is the base path of sub dirs: data and logs. base_path must exist and it's sub dirs will be automatically created if not exist. $base_path/data: store data files $base_path/logs: store log files * log_level is the standard log level as syslog, case insensitive # emerg: for emergency # alert # crit: for critical # error # warn: for warning # notice # info # debug * allow_hosts can ocur more than once, host can be hostname or ip address, "*" means match all ip addresses, can use range like this: 10.0.1.[1-15,20] or host[01-08,20-25].domain.com, for example: allow_hosts=10.0.1.[1-15,20] allow_hosts=host[01-08,20-25].domain.com2. tracker server items---------------------------------------------------| item name | type | default | Must |---------------------------------------------------| port | int | 22000 | N |---------------------------------------------------| store_lookup | int | 0 | N |---------------------------------------------------| store_group | string | | N |---------------------------------------------------| store_server | int | 0 | N |---------------------------------------------------| store_path | int | 0 | N |---------------------------------------------------| download_server | int | 0 | N |---------------------------------------------------| reserved_storage_space| string | 1GB | N |---------------------------------------------------memo: * the value of store_lookup is: 0: round robin (default) 1: specify group 2: load balance (supported since V1.1) * store_group is the name of group to store files. when store_lookup set to 1(specify group), store_group must be set to a specified group name. * reserved_storage_space is the reserved storage space for system or other applications. if the free(available) space of any stoarge server in a group <= reserved_storage_space, no file can be uploaded to this group (since V1.1) bytes unit can be one of follows: # G or g for gigabyte(GB) # M or m for megabyte(MB) # K or k for kilobyte(KB) # no unit for byte(B)3. storage server items-------------------------------------------------| item name | type | default | Must |-------------------------------------------------| group_name | string | | Y |-------------------------------------------------| tracker_server | string | | Y |-------------------------------------------------| port | int | 23000 | N |-------------------------------------------------| heart_beat_interval | int | 30(s) | N |-------------------------------------------------| stat_report_interval| int | 300(s) | N |-------------------------------------------------| sync_wait_msec | int | 100(ms) | N |-------------------------------------------------| sync_interval | int | 0(ms) | N |-------------------------------------------------| sync_start_time | string | 00:00 | N |-------------------------------------------------| sync_end_time | string | 23:59 | N |-------------------------------------------------| store_path_count | int | 1 | N |-------------------------------------------------| store_path0 | string |base_path| N |-------------------------------------------------| store_path# | string | | N |-------------------------------------------------|subdir_count_per_path| int | 256 | N |-------------------------------------------------memo: * tracker_server can ocur more than once, and tracker_server format is "host:port", host can be hostname or ip address. * store_path#, # for digital, based 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -