1. # 该配置文件是否生效
  2. # false:生效
  3. # true:无效
  4. disabled=false
  5. # 本storage server所属组名
  6. group_name=group1
  7. # 绑定IP
  8. # 后面为绑定的IP地址 (常用于服务器有多个IP但只希望一个IP提供服务)。
  9. # 如果不填则表示所有的(一般不填就OK),相信较熟练的SA都常用到类似功能,
  10. # 很多系统和应用都有
  11. bind_addr=
  12. # bind_addr通常是针对server的。当指定bind_addr时,本参数才有效。
  13. # 本storage server作为client连接其他服务器(如tracker server、其他storage server),是否绑定bind_addr。
  14. # if bind an address of this host when connect to other servers
  15. # (this storage server as a client)
  16. # true for binding the address configed by above parameter: "bind_addr"
  17. # false for binding any address of this host
  18. client_bind=true
  19. # storage server服务端口
  20. port=23000
  21. # 连接超时(秒)
  22. # 默认值 30s
  23. connect_timeout=30
  24. # 网络超时(秒)
  25. # 默认值 30s
  26. network_timeout=60
  27. # 心跳间隔时间,单位为秒 (这里是指主动向tracker server 发送心跳)
  28. heart_beat_interval=30
  29. # storage server向tracker server报告磁盘剩余空间的时间间隔,单位为秒。
  30. stat_report_interval=60
  31. # base_path目录地址,根目录必须存在子目录会自动生成
  32. # 注 :这里不是上传的文件存放的地址,之前是的,在某个版本后更改了
  33. base_path=/home/yuqing/fastdfs
  34. # 最大连接数
  35. # default value is 256
  36. # more max_connections means more memory will be used
  37. max_connections=256
  38. # the buff size to recv / send data
  39. # 该参数必须大于8KB
  40. # 默认值是64KB
  41. # since V2.00
  42. buff_size = 256KB
  43. # w线程数,通常设置CPU数,值 <= 最大连接数
  44. # 默认值 4
  45. # since V2.00
  46. work_threads=4
  47. # V2.09引入本参数。设置为true,表示不使用操作系统的文件内容缓冲特性。
  48. # 如果文件数量很多,且访问很分散,可以考虑将本参数设置为true
  49. # if read / write file directly
  50. # if set to true, open file will add the O_DIRECT flag to avoid file caching
  51. # by the file system. be careful to set this parameter.
  52. # default value is false
  53. disk_rw_direct = false
  54. # 磁盘IO读写是否分离,缺省是分离的。
  55. # if disk read / write separated
  56. ## false for mixed read and write
  57. ## true for separated read and write
  58. # default value is true
  59. # since V2.00
  60. disk_rw_separated = true
  61. # 针对单个存储路径的读线程数,缺省值为1。
  62. # 读写分离时,系统中的读线程数 = disk_reader_threads * store_path_count
  63. # 读写混合时,系统中的读写线程数 = (disk_reader_threads + disk_writer_threads) * store_path_count
  64. # disk reader thread count per store base path
  65. # for mixed read / write, this parameter can be 0
  66. # default value is 1
  67. # since V2.00
  68. disk_reader_threads = 1
  69. # 针对单个存储路径的写线程数,缺省值为1。
  70. # 读写分离时,系统中的写线程数 = disk_writer_threads * store_path_count
  71. # 读写混合时,系统中的读写线程数 = (disk_reader_threads + disk_writer_threads) * store_path_count
  72. # disk writer thread count per store base path
  73. # for mixed read / write, this parameter can be 0
  74. # default value is 1
  75. # since V2.00
  76. disk_writer_threads = 1
  77. # 同步文件时,如果从binlog中没有读到要同步的文件,休眠N毫秒后重新读取。0表示不休眠,立即再次尝试读取。
  78. # 出于CPU消耗考虑,不建议设置为0。如何希望同步尽可能快一些,可以将本参数设置得小一些,比如设置为10ms
  79. # when no entry to sync, try read binlog again after X milliseconds
  80. # must > 0, default value is 200ms
  81. sync_wait_msec=50
  82. # 同步上一个文件后,再同步下一个文件的时间间隔,单位为毫秒,0表示不休眠,直接同步下一个文件
  83. # after sync a file, usleep milliseconds
  84. # 0 for sync successively (never call usleep)
  85. sync_interval=0
  86. # 允许系统同步的时间开始时间段 (默认是全天) 一般用于避免高峰同步产生一些问题而设定
  87. # storage sync start time of a day, time format: Hour:Minute
  88. # Hour from 0 to 23, Minute from 0 to 59
  89. sync_start_time=00:00
  90. # 允许系统同步的时间结束时间段 (默认是全天) 一般用于避免高峰同步产生一些问题而设定
  91. # storage sync end time of a day, time format: Hour:Minute
  92. # Hour from 0 to 23, Minute from 0 to 59
  93. sync_end_time=23:59
  94. # 同步完N个文件后,把storage的mark文件同步到磁盘
  95. # 注:如果mark文件内容没有变化,则不会同步
  96. # write to the mark file after sync N files
  97. # default value is 500
  98. write_mark_file_freq=500
  99. # 存放文件时storage server支持多个路径(例如磁盘)。这里配置存放文件的基路径数目,通常只配一个目录
  100. # path(disk or mount point) count, default value is 1
  101. store_path_count=1
  102. # 逐一配置store_path个路径,索引号基于0。注意配置方法后面有0,1,2 ......,需要配置0到store_path - 1。
  103. # 如果不配置base_path0,那边它就和base_path对应的路径一样。
  104. # store_path#, based 0, if store_path0 not exists, it's value is base_path
  105. # the paths must be exist
  106. store_path0=/home/yuqing/fastdfs
  107. #store_path1=/home/yuqing/fastdfs2
  108. # FastDFS存储文件时,采用了两级目录。这里配置存放文件的目录个数 (系统的存储机制,大家看看文件存储的目录就知道了)
  109. # 如果本参数只为N(如:256),那么storage server在初次运行时,会自动创建 N * N 个存放文件的子目录
  110. # subdir_count * subdir_count directories will be auto created under each
  111. # store_path (disk), value can be 1 to 256, default value is 256
  112. subdir_count_per_path=256
  113. # tracker_server 的列表 要写端口的哦 (再次提醒是主动连接tracker_server )
  114. # 有多个tracker server时,每个tracker server写一行
  115. # tracker_server can ocur more than once, and tracker_server format is
  116. # "host:port", host can be hostname or ip address
  117. tracker_server=10.0.14.145:22122
  118. #tracker_server=10.0.14.93:22122
  119. # 日志级别
  120. #standard log level as syslog, case insensitive, value list:
  121. ### emerg for emergency
  122. ### alert
  123. ### crit for critical
  124. ### error
  125. ### warn for warning
  126. ### notice
  127. ### info
  128. ### debug
  129. log_level=info
  130. # 指定运行该程序的用户组(不填 就是当前用户组,哪个启动进程就是哪个)
  131. run_by_group=
  132. # 操作系统运行FastDFS的用户 (不填 就是当前用户,哪个启动进程就是哪个)
  133. run_by_user=
  134. # 可以连接到此 tracker server 的ip范围(对所有类型的连接都有影响,包括客户端,storage server)
  135. # "*" means match all ip addresses, can use range like this: 10.0.1.[1-15,20] or
  136. # host[01-08,20-25].domain.com, for example:
  137. # allow_hosts=10.0.1.[1-15,20]
  138. # allow_hosts=host[01-08,20-25].domain.com
  139. allow_hosts=*
  140. # 0: 轮流存放,在一个目录下存储设置的文件数后(参数file_distribute_rotate_count中设置文件数),使用下一个目录进行存储。
  141. # 1: 随机存储,根据文件名对应的hash code来分散存储。
  142. # the mode of the files distributed to the data path
  143. # 0: round robin(default)
  144. # 1: random, distributted by hash code
  145. file_distribute_path_mode=0
  146. # 当上面的参数file_distribute_path_mode配置为0(轮流存放方式)时,本参数有效。
  147. # 当一个目录下的文件存放的文件数达到本参数值时,后续上传的文件存储到下一个目录中。
  148. # default value is 100
  149. file_distribute_rotate_count=100
  150. # 当写入大文件时,每写入N个字节,调用一次系统函数fsync将内容强行同步到硬盘。0表示从不调用fsync
  151. # call fsync to disk when write big file
  152. # 0: never call fsync
  153. # other: call fsync when written bytes >= this bytes
  154. # default value is 0 (never call fsync)
  155. fsync_after_written_bytes=0
  156. # 同步或刷新日志信息到硬盘的时间间隔,单位为秒
  157. # 注意:storage server 的日志信息不是时时写硬盘的,而是先写内存。
  158. # must > 0, default value is 10 seconds
  159. sync_log_buff_interval=10
  160. # 同步binglog(更新操作日志)到硬盘的时间间隔,单位为秒
  161. # 本参数会影响新上传文件同步延迟时间
  162. # sync binlog buff / cache to disk every interval seconds
  163. # default value is 60 seconds
  164. sync_binlog_buff_interval=10
  165. # 把storage的stat文件同步到磁盘的时间间隔,单位为秒。
  166. # 注:如果stat文件内容没有变化,不会进行同步
  167. # sync storage stat info to disk every interval seconds
  168. # default value is 300 seconds
  169. sync_stat_file_interval=300
  170. # 线程栈的大小。FastDFS server端采用了线程方式。
  171. # 对于V1.x,storage server线程栈不应小于512KB;对于V2.0,线程栈大于等于128KB即可。
  172. # 线程栈越大,一个线程占用的系统资源就越多。
  173. # 对于V1.x,如果要启动更多的线程(max_connections),可以适当降低本参数值。
  174. # thread stack size, should >= 512KB
  175. # default value is 512KB
  176. thread_stack_size=512KB
  177. # 本storage server作为源服务器,上传文件的优先级,可以为负数。值越小,优先级越高。
  178. # 这里就和 tracker.conf 中store_server= 2时的配置相对应了
  179. # the priority as a source server for uploading file.
  180. # the lower this value, the higher its uploading priority.
  181. # default value is 10
  182. upload_priority=10
  183. # the NIC alias prefix, such as eth in Linux, you can see it by ifconfig -a
  184. # multi aliases split by comma. empty value means auto set by OS type
  185. # default values is empty
  186. if_alias_prefix=
  187. # 是否检测上传文件已经存在。如果已经存在,则不存文件内容,建立一个符号链接以节省磁盘空间。
  188. # 这个应用要配合FastDHT 使用,所以打开前要先安装FastDHT
  189. # 1或yes 是检测,0或no 是不检测
  190. # if check file duplicate, when set to true, use FastDHT to store file indexes
  191. # 1 or yes: need check
  192. # 0 or no: do not check
  193. # default value is 0
  194. check_file_duplicate=0
  195. # 文件去重时,文件内容的签名方式:
  196. ## hash: 4个hash code
  197. ## md5:MD5
  198. # file signature method for check file duplicate
  199. ## hash: four 32 bits hash code
  200. ## md5: MD5 signature
  201. # default value is hash
  202. # since V4.01
  203. file_signature_method=hash
  204. # 当参数check_file_duplicate设定为1 或 yes时 (true/on也是可以的) , 在FastDHT中的命名空间。
  205. # namespace for storing file indexes (key-value pairs)
  206. # this item must be set when check_file_duplicate is true / on
  207. key_namespace=FastDFS
  208. # 与FastDHT servers 的连接方式 (是否为持久连接) ,默认是0(短连接方式)。
  209. # 可以考虑使用长连接,这要看FastDHT server的连接数是否够用。
  210. # set keep_alive to 1 to enable persistent connection with FastDHT servers
  211. # default value is 0 (short connection)
  212. keep_alive=0
  213. # 可以通过 #include filename 方式来加载 FastDHT servers 的配置,装上FastDHT就知道该如何配置啦。
  214. # 同样要求 check_file_duplicate=1 时才有用,不然系统会忽略
  215. # fdht_servers.conf 记载的是 FastDHT servers 列表
  216. # you can use "#include filename" (not include double quotes) directive to
  217. # load FastDHT server list, when the filename is a relative path such as
  218. # pure filename, the base path is the base path of current/this config file.
  219. # must set FastDHT server list when check_file_duplicate is true / on
  220. # please see INSTALL of FastDHT for detail
  221. ##include /home/yuqing/fastdht/conf/fdht_servers.conf
  222. # 是否将文件操作记录到access log
  223. # if log to access log
  224. # default value is false
  225. # since V4.00
  226. use_access_log = false
  227. # 是否定期轮转access log,目前仅支持一天轮转一次
  228. # if rotate the access log every day
  229. # default value is false
  230. # since V4.00
  231. rotate_access_log = false
  232. # access log定期轮转的时间点,只有当rotate_access_log设置为true时有效
  233. # rotate access log time base, time format: Hour:Minute
  234. # Hour from 0 to 23, Minute from 0 to 59
  235. # default value is 00:00
  236. # since V4.00
  237. access_log_rotate_time=00:00
  238. # 是否定期轮转error log,目前仅支持一天轮转一次
  239. # if rotate the error log every day
  240. # default value is false
  241. # since V4.02
  242. rotate_error_log = false
  243. # error log定期轮转的时间点,只有当rotate_error_log设置为true时有效
  244. # rotate error log time base, time format: Hour:Minute
  245. # Hour from 0 to 23, Minute from 0 to 59
  246. # default value is 00:00
  247. # since V4.02
  248. error_log_rotate_time=00:00
  249. # access log按文件大小轮转
  250. # 设置为0表示不按文件大小轮转,否则当access log达到该大小,就会轮转到新文件中
  251. # rotate access log when the log file exceeds this size
  252. # 0 means never rotates log file by log file size
  253. # default value is 0
  254. # since V4.02
  255. rotate_access_log_size = 0
  256. # error log按文件大小轮转
  257. # 设置为0表示不按文件大小轮转,否则当error log达到该大小,就会轮转到新文件中
  258. # rotate error log when the log file exceeds this size
  259. # 0 means never rotates log file by log file size
  260. # default value is 0
  261. # since V4.02
  262. rotate_error_log_size = 0
  263. # 文件同步的时候,是否忽略无效的binlog记录
  264. # if skip the invalid record when sync file
  265. # default value is false
  266. # since V4.02
  267. file_sync_skip_invalid_record=false
  268. # 是否使用连接池
  269. # default value is false
  270. # since V4.05
  271. use_connection_pool = false
  272. # 连接的空闲时间超过这个时间将被关闭,单位:秒
  273. # default value is 3600
  274. # since V4.05
  275. connection_pool_max_idle_time = 3600
  276. # 下面是http的配置了。如果系统较大,这个服务有可能支持不了,可以自行换一个webserver,我喜欢lighttpd,当然ng也很好了。
  277. # HTTP是否生效
  278. # true 失效
  279. # false 生效
  280. http.disabled=false
  281. # Web服务器的这个存储服务器上的端口
  282. # the port of the web server on this storage server
  283. http.server_port=8888
  284. # http.trunk_size表示读取文件内容的buffer大小(一次读取的文件内容大小),也就是回复给HTTP client的块大小。
  285. http.trunk_size=256KB
  286. # storage server上web server域名,通常仅针对单独部署的web server。这样URL中就可以通过域名方式来访问storage server上的文件了,
  287. # 这个参数为空就是IP地址的方式。
  288. # use the ip address of this storage server if domain_name is empty,
  289. # else this domain name will ocur in the url redirected by the tracker server
  290. http.domain_name=
  291. # HTTP服务的其他配置文件
  292. #include http.conf

FastDFS配置文件(storage.conf)的更多相关文章

  1. FastDFS 配置文件 storage.conf

    FastDFS 版本5.05 配置文件分为三部分   控制器:tracker.conf存储器:storage.conf 客户端:client.conf 文件位置:/etc/fdfsstorage.co ...

  2. FastDFS 配置文件 client.conf storage_ids.conf

    client.conf : # connect timeout in seconds # default value is 30s connect_timeout=30              连接 ...

  3. FastDFS 配置文件 tracker.conf

    FastDFS 版本5.05 配置文件分为三部分   控制器:tracker.conf存储器:storage.conf 客户端:client.conf 文件位置:/etc/fdfs 基本配置(基础配置 ...

  4. FastDFS配置文件(tracker.conf)

    # ===========================基本配置==================================== # 该配置文件是否生效 # false:生效 # true: ...

  5. fastDFS配置文件 fdfs_client.conf

    # connect timeout in seconds# default value is 30sconnect_timeout=30 # network timeout in seconds# d ...

  6. 配置nginx为FastDFS的storage server提供http访问接口

    1.拉取模块代码 # git clone https://github.com/happyfish100/fastdfs-nginx-module.git 2.编译安装nginx,添加支持fastdf ...

  7. 分布式文件存储FastDFS(七)FastDFS配置文件具体解释

    配置FastDFS时.改动配置文件是非常重要的一个步骤,理解配置文件里每一项的意义更加重要,所以我參考了大神的帖子,整理了配置文件的解释.原帖例如以下:http://bbs.chinaunix.net ...

  8. (转) 分布式文件存储FastDFS(七)FastDFS配置文件详解

    http://blog.csdn.net/xingjiarong/article/details/50752586 配置FastDFS时,修改配置文件是很重要的一个步骤,理解配置文件中每一项的意义更加 ...

  9. docker安装fastdfs碰到storage的IP地址映射宿主地址问题

    一.概述 最近公司准备全面实施docker部署,解决每次项目实施安装部署环境工作量大问题,mysql5.7.oracle12c很顺利,在安装fastdfs时碰到storage的IP地址映射问题.服务器 ...

随机推荐

  1. 《第一行代码--Android》阅读笔记之Activity

    1.BaseActivity里面可以干什么 定义一个Context定义一个TAG 记录当前的Activity名字getClass().getSimpleName(); 2.Activity里面的几个重 ...

  2. dedecms 根据key取得联动类型(enum)值

    ---恢复内容开始--- //$key:如城市的ID,$enum_file  data/enums中的文件 function get_enum_data($key, $enum_file)    {  ...

  3. WordPress默认栏目设置

    WordPress是一个注重美学.易用性和网络标准的个人信息发布平台,是全球使用最多的博客系统,只需要在系统后台做一些简单的设计,基本就能实现我们日常个性化发布个人信息的需求,而博客后台的使用其实很简 ...

  4. web app 开发

    去除手机浏览器标签默认高亮边框 -webkit-tap-highlight-color 属性 属性描述:这个属性可以指设置透明度.如果未设置透明度,iOS上的Safari会给予颜色一个默认的透明度.把 ...

  5. MvcAdmin功能介绍

    应群友要求做一个介绍(QQ群:159227188) 已经迁移到这里,已经迁移到这里,已经迁移到这里,重要的事情说三遍 http://www.cnblogs.com/RainbowInTheSky/p/ ...

  6. word中让首页和目录不显示页码的方法

    在正文前一页,插入->分隔符->下一页,然后插入页码,取消与前一页页眉的链接,删除首页和目录的页码即可

  7. C语言中内存对齐方式

    一.什么是对齐,以及为什么要对齐: 1. 现代计算机中内存空间都是按照byte划分的,从理论上讲似乎对任何类型的变量的访问可以从任何地址开始,但实际情况是在访问特定变量的时候经常在特定的内存地址访问, ...

  8. 微软云平台媒体服务实践系列 2- 使用动态封装为iOS, Android , Windows 等多平台提供视频点播(VoD)方案

    文章微软云平台媒体服务实践系列 1- 使用静态封装为iOS, Android 设备实现点播(VoD)方案  介绍了如何针对少数iOS, Android 客户端的场景,出于节约成本的目的使用媒体服务的静 ...

  9. Windows PowerShell ISE

    Windows PowerShell 集成脚本环境 (ISE) 是 Windows PowerShell 的主机应用程序.在 Windows PowerShell ISE 中,可以在单一 Window ...

  10. MYSQL主键存在则更新,不存在则插入的解决方案(ON DUPLICATE KEY UPDATE)

    经常我们使用的最简单的数据库操作就是数据的更新,删除和插入,对于批量删除和插入的方法相信大家都很清楚,那么批量更新估计有的人就不知道了,并且还有批量插入,在插入时若有主键冲突则更新的操作,这在EAV模 ...