fastdfs 簡介
FastDFS是一個國產開源的輕量級分佈式文件系統,它對文件進行管理,功能包括:文件存儲、文件同步、文件訪問(文件上傳、文件下載)等,解決了大容量存儲和負載均衡的問題。特別適合以文件爲載體的在線服務,如相冊網站、視頻網站等等。FastDFS服務端有兩個角色:跟蹤器(tracker)和存儲節點(storage)。跟蹤器主要作調度工做,在訪問上起負載均衡的做用。
官方論壇: http://www.csource.org
下載地址: http://sourceforge.net/projects/fastdfs/files/
github軟件倉庫
libfastcommon-FastDFS和FastDHT的通用函數庫,地址:https://github.com/happyfish100/libfastcommon.git
FastDFS — FastDFS主代碼,地址: https://github.com/happyfish100/fastdfs.git
fastdfs-nginx-module — FastDFS的nginx模塊,地址:https://github.com/happyfish100/fastdfs-nginx-module.gitjavascript
FastDFS 5.x 取消了對 libevent 的依賴,添加了對 libfastcommon 的依賴。
本部署說明用到的軟件版本:css
libfastcommon v1.13html
FastDFS v5.08java
fastdfs-nginx-module v1.17nginx
# groupadd fdfsgit
# useradd fdfs -g fdfsgithub
在每一臺tracker和storage服務器上執行web
# tar xzvf FastDFS_v5.08.tar.gzjson
#cd FastDFS/bootstrap
#./make.sh
#./make.sh install
# yum install -y gcc perl # 安裝依賴的軟件包
#cd ~/fdfs/libfastcommon && ./make.sh && ./make.sh install
# cd ~/fdfs/fastdfs && ./make.sh && ./make.sh install
安裝完成後,全部可執行文件在目錄/usr/bin下,以fdfs_開頭:
# ls /usr/bin/fdfs*
fdfs_monitor fdfs_trackerd fdfs_storaged
配置文件在目錄/etc/fdfs下
client.conf.sample storage.conf.sample tracker.conf.sample
firewall-cmd --zone=public --add-port=22122/tcp --permanent
firewall-cmd --reload
vim /etc/sysconfig/iptables
service iptables restart
mkdir -p /data/fastdfs
cd /etc/fdfs
cp tracker.conf.sample tracker.conf
cp /root/fdfs/fastdfs/conf/http.conf .
cp /root/fdfs/fastdfs/conf/mime.types .
sed -i 's:base_path=.*:base_path=/data/fastdfs:g' tracker.conf
sed -i 's:http.server_port=.*:http.server_port=80:g' tracker.con
1 connect_timeout=30 2 network_timeout=60 3 base_path=/data/fastdfs 4 tracker_server=10.143.92.61:22122 5 tracker_server=10.143.92.62:22122 6 log_level=info 7 use_connection_pool = false 8 connection_pool_max_idle_time = 3600 9 load_fdfs_parameters_from_tracker=false 10 use_storage_id = false 11 storage_ids_filename = storage_ids.conf 12 http.tracker_server_port=8080
1 # This is a comment. I love comments. 2 3 # This file controls what Internet media types are sent to the client for 4 # given file extension(s). Sending the correct media type to the client 5 # is important so they know how to handle the content of the file. 6 # Extra types can either be added here or by using an AddType directive 7 # in your config files. For more information about Internet media types, 8 # please read RFC 2045, 2046, 2047, 2048, and 2077. The Internet media type 9 # registry is at <http://www.iana.org/assignments/media-types/>. 10 11 # MIME type Extensions 12 application/activemessage 13 application/andrew-inset ez 14 application/applefile 15 application/atom+xml atom 16 application/atomcat+xml atomcat 17 application/atomicmail 18 application/atomsvc+xml atomsvc 19 application/auth-policy+xml 20 application/batch-smtp 21 application/beep+xml 22 application/cals-1840 23 application/ccxml+xml ccxml 24 application/cellml+xml 25 application/cnrp+xml 26 application/commonground 27 application/conference-info+xml 28 application/cpl+xml 29 application/csta+xml 30 application/cstadata+xml 31 application/cybercash 32 application/davmount+xml davmount 33 application/dca-rft 34 application/dec-dx 35 application/dialog-info+xml 36 application/dicom 37 application/dns 38 application/dvcs 39 application/ecmascript ecma 40 application/edi-consent 41 application/edi-x12 42 application/edifact 43 application/epp+xml 44 application/eshop 45 application/fastinfoset 46 application/fastsoap 47 application/fits 48 application/font-tdpfr pfr 49 application/h224 50 application/http 51 application/hyperstudio stk 52 application/iges 53 application/im-iscomposing+xml 54 application/index 55 application/index.cmd 56 application/index.obj 57 application/index.response 58 application/index.vnd 59 application/iotp 60 application/ipp 61 application/isup 62 application/javascript js 63 application/json json 64 application/kpml-request+xml 65 application/kpml-response+xml 66 application/lost+xml lostxml 67 application/mac-binhex40 hqx 68 application/mac-compactpro cpt 69 application/macwriteii 70 application/marc mrc 71 application/mathematica ma nb mb 72 application/mathml+xml mathml 73 application/mbms-associated-procedure-description+xml 74 application/mbms-deregister+xml 75 application/mbms-envelope+xml 76 application/mbms-msk+xml 77 application/mbms-msk-response+xml 78 application/mbms-protection-description+xml 79 application/mbms-reception-report+xml 80 application/mbms-register+xml 81 application/mbms-register-response+xml 82 application/mbms-user-service-description+xml 83 application/mbox mbox 84 application/media_control+xml 85 application/mediaservercontrol+xml mscml 86 application/mikey 87 application/moss-keys 88 application/moss-signature 89 application/mosskey-data 90 application/mosskey-request 91 application/mp4 mp4s 92 application/mpeg4-generic 93 application/mpeg4-iod 94 application/mpeg4-iod-xmt 95 application/msword doc dot 96 application/mxf mxf 97 application/nasdata 98 application/news-transmission 99 application/nss 100 application/ocsp-request 101 application/ocsp-response 102 application/octet-stream bin dms lha lzh class so iso dmg dist distz pkg bpk dump elc 103 application/oda oda 104 application/oebps-package+xml 105 application/ogg ogx 106 application/parityfec 107 application/patch-ops-error+xml xer 108 application/pdf pdf 109 application/pgp-encrypted pgp 110 application/pgp-keys 111 application/pgp-signature asc sig 112 application/pics-rules prf 113 application/pidf+xml 114 application/pidf-diff+xml 115 application/pkcs10 p10 116 application/pkcs7-mime p7m p7c 117 application/pkcs7-signature p7s 118 application/pkix-cert cer 119 application/pkix-crl crl 120 application/pkix-pkipath pkipath 121 application/pkixcmp pki 122 application/pls+xml pls 123 application/poc-settings+xml 124 application/postscript ai eps ps 125 application/prs.alvestrand.titrax-sheet 126 application/prs.cww cww 127 application/prs.nprend 128 application/prs.plucker 129 application/qsig 130 application/rdf+xml rdf 131 application/reginfo+xml rif 132 application/relax-ng-compact-syntax rnc 133 application/remote-printing 134 application/resource-lists+xml rl 135 application/resource-lists-diff+xml rld 136 application/riscos 137 application/rlmi+xml 138 application/rls-services+xml rs 139 application/rsd+xml rsd 140 application/rss+xml rss 141 application/rtf rtf 142 application/rtx 143 application/samlassertion+xml 144 application/samlmetadata+xml 145 application/sbml+xml sbml 146 application/scvp-cv-request scq 147 application/scvp-cv-response scs 148 application/scvp-vp-request spq 149 application/scvp-vp-response spp 150 application/sdp sdp 151 application/set-payment 152 application/set-payment-initiation setpay 153 application/set-registration 154 application/set-registration-initiation setreg 155 application/sgml 156 application/sgml-open-catalog 157 application/shf+xml shf 158 application/sieve 159 application/simple-filter+xml 160 application/simple-message-summary 161 application/simplesymbolcontainer 162 application/slate 163 application/smil 164 application/smil+xml smi smil 165 application/soap+fastinfoset 166 application/soap+xml 167 application/sparql-query rq 168 application/sparql-results+xml srx 169 application/spirits-event+xml 170 application/srgs gram 171 application/srgs+xml grxml 172 application/ssml+xml ssml 173 application/timestamp-query 174 application/timestamp-reply 175 application/tve-trigger 176 application/ulpfec 177 application/vemmi 178 application/vividence.scriptfile 179 application/vnd.3gpp.bsf+xml 180 application/vnd.3gpp.pic-bw-large plb 181 application/vnd.3gpp.pic-bw-small psb 182 application/vnd.3gpp.pic-bw-var pvb 183 application/vnd.3gpp.sms 184 application/vnd.3gpp2.bcmcsinfo+xml 185 application/vnd.3gpp2.sms 186 application/vnd.3gpp2.tcap tcap 187 application/vnd.3m.post-it-notes pwn 188 application/vnd.accpac.simply.aso aso 189 application/vnd.accpac.simply.imp imp 190 application/vnd.acucobol acu 191 application/vnd.acucorp atc acutc 192 application/vnd.adobe.xdp+xml xdp 193 application/vnd.adobe.xfdf xfdf 194 application/vnd.aether.imp 195 application/vnd.americandynamics.acc acc 196 application/vnd.amiga.ami ami 197 application/vnd.anser-web-certificate-issue-initiation cii 198 application/vnd.anser-web-funds-transfer-initiation fti 199 application/vnd.antix.game-component atx 200 application/vnd.apple.installer+xml mpkg 201 application/vnd.arastra.swi swi 202 application/vnd.audiograph aep 203 application/vnd.autopackage 204 application/vnd.avistar+xml 205 application/vnd.blueice.multipass mpm 206 application/vnd.bmi bmi 207 application/vnd.businessobjects rep 208 application/vnd.cab-jscript 209 application/vnd.canon-cpdl 210 application/vnd.canon-lips 211 application/vnd.cendio.thinlinc.clientconf 212 application/vnd.chemdraw+xml cdxml 213 application/vnd.chipnuts.karaoke-mmd mmd 214 application/vnd.cinderella cdy 215 application/vnd.cirpack.isdn-ext 216 application/vnd.claymore cla 217 application/vnd.clonk.c4group c4g c4d c4f c4p c4u 218 application/vnd.commerce-battelle 219 application/vnd.commonspace csp cst 220 application/vnd.contact.cmsg cdbcmsg 221 application/vnd.cosmocaller cmc 222 application/vnd.crick.clicker clkx 223 application/vnd.crick.clicker.keyboard clkk 224 application/vnd.crick.clicker.palette clkp 225 application/vnd.crick.clicker.template clkt 226 application/vnd.crick.clicker.wordbank clkw 227 application/vnd.criticaltools.wbs+xml wbs 228 application/vnd.ctc-posml pml 229 application/vnd.ctct.ws+xml 230 application/vnd.cups-pdf 231 application/vnd.cups-postscript 232 application/vnd.cups-ppd ppd 233 application/vnd.cups-raster 234 application/vnd.cups-raw 235 application/vnd.curl curl 236 application/vnd.cybank 237 application/vnd.data-vision.rdz rdz 238 application/vnd.denovo.fcselayout-link fe_launch 239 application/vnd.dna dna 240 application/vnd.dolby.mlp mlp 241 application/vnd.dpgraph dpg 242 application/vnd.dreamfactory dfac 243 application/vnd.dvb.esgcontainer 244 application/vnd.dvb.ipdcesgaccess 245 application/vnd.dvb.iptv.alfec-base 246 application/vnd.dvb.iptv.alfec-enhancement 247 application/vnd.dxr 248 application/vnd.ecdis-update 249 application/vnd.ecowin.chart mag 250 application/vnd.ecowin.filerequest 251 application/vnd.ecowin.fileupdate 252 application/vnd.ecowin.series 253 application/vnd.ecowin.seriesrequest 254 application/vnd.ecowin.seriesupdate 255 application/vnd.enliven nml 256 application/vnd.epson.esf esf 257 application/vnd.epson.msf msf 258 application/vnd.epson.quickanime qam 259 application/vnd.epson.salt slt 260 application/vnd.epson.ssf ssf 261 application/vnd.ericsson.quickcall 262 application/vnd.eszigno3+xml es3 et3 263 application/vnd.eudora.data 264 application/vnd.ezpix-album ez2 265 application/vnd.ezpix-package ez3 266 application/vnd.fdf fdf 267 application/vnd.ffsns 268 application/vnd.fints 269 application/vnd.flographit gph 270 application/vnd.fluxtime.clip ftc 271 application/vnd.font-fontforge-sfd 272 application/vnd.framemaker fm frame maker 273 application/vnd.frogans.fnc fnc 274 application/vnd.frogans.ltf ltf 275 application/vnd.fsc.weblaunch fsc 276 application/vnd.fujitsu.oasys oas 277 application/vnd.fujitsu.oasys2 oa2 278 application/vnd.fujitsu.oasys3 oa3 279 application/vnd.fujitsu.oasysgp fg5 280 application/vnd.fujitsu.oasysprs bh2 281 application/vnd.fujixerox.art-ex 282 application/vnd.fujixerox.art4 283 application/vnd.fujixerox.hbpl 284 application/vnd.fujixerox.ddd ddd 285 application/vnd.fujixerox.docuworks xdw 286 application/vnd.fujixerox.docuworks.binder xbd 287 application/vnd.fut-misnet 288 application/vnd.fuzzysheet fzs 289 application/vnd.genomatix.tuxedo txd 290 application/vnd.gmx gmx 291 application/vnd.google-earth.kml+xml kml 292 application/vnd.google-earth.kmz kmz 293 application/vnd.grafeq gqf gqs 294 application/vnd.gridmp 295 application/vnd.groove-account gac 296 application/vnd.groove-help ghf 297 application/vnd.groove-identity-message gim 298 application/vnd.groove-injector grv 299 application/vnd.groove-tool-message gtm 300 application/vnd.groove-tool-template tpl 301 application/vnd.groove-vcard vcg 302 application/vnd.handheld-entertainment+xml zmm 303 application/vnd.hbci hbci 304 application/vnd.hcl-bireports 305 application/vnd.hhe.lesson-player les 306 application/vnd.hp-hpgl hpgl 307 application/vnd.hp-hpid hpid 308 application/vnd.hp-hps hps 309 application/vnd.hp-jlyt jlt 310 application/vnd.hp-pcl pcl 311 application/vnd.hp-pclxl pclxl 312 application/vnd.httphone 313 application/vnd.hydrostatix.sof-data sfd-hdstx 314 application/vnd.hzn-3d-crossword x3d 315 application/vnd.ibm.afplinedata 316 application/vnd.ibm.electronic-media 317 application/vnd.ibm.minipay mpy 318 application/vnd.ibm.modcap afp listafp list3820 319 application/vnd.ibm.rights-management irm 320 application/vnd.ibm.secure-container sc 321 application/vnd.iccprofile icc icm 322 application/vnd.igloader igl 323 application/vnd.immervision-ivp ivp 324 application/vnd.immervision-ivu ivu 325 application/vnd.informedcontrol.rms+xml 326 application/vnd.intercon.formnet xpw xpx 327 application/vnd.intertrust.digibox 328 application/vnd.intertrust.nncp 329 application/vnd.intu.qbo qbo 330 application/vnd.intu.qfx qfx 331 application/vnd.iptc.g2.conceptitem+xml 332 application/vnd.iptc.g2.knowledgeitem+xml 333 application/vnd.iptc.g2.newsitem+xml 334 application/vnd.iptc.g2.packageitem+xml 335 application/vnd.ipunplugged.rcprofile rcprofile 336 application/vnd.irepository.package+xml irp 337 application/vnd.is-xpr xpr 338 application/vnd.jam jam 339 application/vnd.japannet-directory-service 340 application/vnd.japannet-jpnstore-wakeup 341 application/vnd.japannet-payment-wakeup 342 application/vnd.japannet-registration 343 application/vnd.japannet-registration-wakeup 344 application/vnd.japannet-setstore-wakeup 345 application/vnd.japannet-verification 346 application/vnd.japannet-verification-wakeup 347 application/vnd.jcp.javame.midlet-rms rms 348 application/vnd.jisp jisp 349 application/vnd.joost.joda-archive joda 350 application/vnd.kahootz ktz ktr 351 application/vnd.kde.karbon karbon 352 application/vnd.kde.kchart chrt 353 application/vnd.kde.kformula kfo 354 application/vnd.kde.kivio flw 355 application/vnd.kde.kontour kon 356 application/vnd.kde.kpresenter kpr kpt 357 application/vnd.kde.kspread ksp 358 application/vnd.kde.kword kwd kwt 359 application/vnd.kenameaapp htke 360 application/vnd.kidspiration kia 361 application/vnd.kinar kne knp 362 application/vnd.koan skp skd skt skm 363 application/vnd.kodak-descriptor sse 364 application/vnd.liberty-request+xml 365 application/vnd.llamagraphics.life-balance.desktop lbd 366 application/vnd.llamagraphics.life-balance.exchange+xml lbe 367 application/vnd.lotus-1-2-3 123 368 application/vnd.lotus-approach apr 369 application/vnd.lotus-freelance pre 370 application/vnd.lotus-notes nsf 371 application/vnd.lotus-organizer org 372 application/vnd.lotus-screencam scm 373 application/vnd.lotus-wordpro lwp 374 application/vnd.macports.portpkg portpkg 375 application/vnd.marlin.drm.actiontoken+xml 376 application/vnd.marlin.drm.conftoken+xml 377 application/vnd.marlin.drm.license+xml 378 application/vnd.marlin.drm.mdcf 379 application/vnd.mcd mcd 380 application/vnd.medcalcdata mc1 381 application/vnd.mediastation.cdkey cdkey 382 application/vnd.meridian-slingshot 383 application/vnd.mfer mwf 384 application/vnd.mfmp mfm 385 application/vnd.micrografx.flo flo 386 application/vnd.micrografx.igx igx 387 application/vnd.mif mif 388 application/vnd.minisoft-hp3000-save 389 application/vnd.mitsubishi.misty-guard.trustweb 390 application/vnd.mobius.daf daf 391 application/vnd.mobius.dis dis 392 application/vnd.mobius.mbk mbk 393 application/vnd.mobius.mqy mqy 394 application/vnd.mobius.msl msl 395 application/vnd.mobius.plc plc 396 application/vnd.mobius.txf txf 397 application/vnd.mophun.application mpn 398 application/vnd.mophun.certificate mpc 399 application/vnd.motorola.flexsuite 400 application/vnd.motorola.flexsuite.adsi 401 application/vnd.motorola.flexsuite.fis 402 application/vnd.motorola.flexsuite.gotap 403 application/vnd.motorola.flexsuite.kmr 404 application/vnd.motorola.flexsuite.ttc 405 application/vnd.motorola.flexsuite.wem 406 application/vnd.motorola.iprm 407 application/vnd.mozilla.xul+xml xul 408 application/vnd.ms-artgalry cil 409 application/vnd.ms-asf asf 410 application/vnd.ms-cab-compressed cab 411 application/vnd.ms-excel xls xlm xla xlc xlt xlw 412 application/vnd.ms-fontobject eot 413 application/vnd.ms-htmlhelp chm 414 application/vnd.ms-ims ims 415 application/vnd.ms-lrm lrm 416 application/vnd.ms-playready.initiator+xml 417 application/vnd.ms-powerpoint ppt pps pot 418 application/vnd.ms-project mpp mpt 419 application/vnd.ms-tnef 420 application/vnd.ms-wmdrm.lic-chlg-req 421 application/vnd.ms-wmdrm.lic-resp 422 application/vnd.ms-wmdrm.meter-chlg-req 423 application/vnd.ms-wmdrm.meter-resp 424 application/vnd.ms-works wps wks wcm wdb 425 application/vnd.ms-wpl wpl 426 application/vnd.ms-xpsdocument xps 427 application/vnd.mseq mseq 428 application/vnd.msign 429 application/vnd.multiad.creator 430 application/vnd.multiad.creator.cif 431 application/vnd.music-niff 432 application/vnd.musician mus 433 application/vnd.muvee.style msty 434 application/vnd.ncd.control 435 application/vnd.ncd.reference 436 application/vnd.nervana 437 application/vnd.netfpx 438 application/vnd.neurolanguage.nlu nlu 439 application/vnd.noblenet-directory nnd 440 application/vnd.noblenet-sealer nns 441 application/vnd.noblenet-web nnw 442 application/vnd.nokia.catalogs 443 application/vnd.nokia.conml+wbxml 444 application/vnd.nokia.conml+xml 445 application/vnd.nokia.isds-radio-presets 446 application/vnd.nokia.iptv.config+xml 447 application/vnd.nokia.landmark+wbxml 448 application/vnd.nokia.landmark+xml 449 application/vnd.nokia.landmarkcollection+xml 450 application/vnd.nokia.n-gage.ac+xml 451 application/vnd.nokia.n-gage.data ngdat 452 application/vnd.nokia.n-gage.symbian.install n-gage 453 application/vnd.nokia.ncd 454 application/vnd.nokia.pcd+wbxml 455 application/vnd.nokia.pcd+xml 456 application/vnd.nokia.radio-preset rpst 457 application/vnd.nokia.radio-presets rpss 458 application/vnd.novadigm.edm edm 459 application/vnd.novadigm.edx edx 460 application/vnd.novadigm.ext ext 461 application/vnd.oasis.opendocument.chart odc 462 application/vnd.oasis.opendocument.chart-template otc 463 application/vnd.oasis.opendocument.formula odf 464 application/vnd.oasis.opendocument.formula-template otf 465 application/vnd.oasis.opendocument.graphics odg 466 application/vnd.oasis.opendocument.graphics-template otg 467 application/vnd.oasis.opendocument.image odi 468 application/vnd.oasis.opendocument.image-template oti 469 application/vnd.oasis.opendocument.presentation odp 470 application/vnd.oasis.opendocument.presentation-template otp 471 application/vnd.oasis.opendocument.spreadsheet ods 472 application/vnd.oasis.opendocument.spreadsheet-template ots 473 application/vnd.oasis.opendocument.text odt 474 application/vnd.oasis.opendocument.text-master otm 475 application/vnd.oasis.opendocument.text-template ott 476 application/vnd.oasis.opendocument.text-web oth 477 application/vnd.obn 478 application/vnd.olpc-sugar xo 479 application/vnd.oma-scws-config 480 application/vnd.oma-scws-http-request 481 application/vnd.oma-scws-http-response 482 application/vnd.oma.bcast.associated-procedure-parameter+xml 483 application/vnd.oma.bcast.drm-trigger+xml 484 application/vnd.oma.bcast.imd+xml 485 application/vnd.oma.bcast.ltkm 486 application/vnd.oma.bcast.notification+xml 487 application/vnd.oma.bcast.provisioningtrigger 488 application/vnd.oma.bcast.sgboot 489 application/vnd.oma.bcast.sgdd+xml 490 application/vnd.oma.bcast.sgdu 491 application/vnd.oma.bcast.simple-symbol-container 492 application/vnd.oma.bcast.smartcard-trigger+xml 493 application/vnd.oma.bcast.sprov+xml 494 application/vnd.oma.bcast.stkm 495 application/vnd.oma.dcd 496 application/vnd.oma.dcdc 497 application/vnd.oma.dd2+xml dd2 498 application/vnd.oma.drm.risd+xml 499 application/vnd.oma.group-usage-list+xml 500 application/vnd.oma.poc.detailed-progress-report+xml 501 application/vnd.oma.poc.final-report+xml 502 application/vnd.oma.poc.groups+xml 503 application/vnd.oma.poc.invocation-descriptor+xml 504 application/vnd.oma.poc.optimized-progress-report+xml 505 application/vnd.oma.xcap-directory+xml 506 application/vnd.omads-email+xml 507 application/vnd.omads-file+xml 508 application/vnd.omads-folder+xml 509 application/vnd.omaloc-supl-init 510 application/vnd.openofficeorg.extension oxt 511 application/vnd.osa.netdeploy 512 application/vnd.osgi.dp dp 513 application/vnd.otps.ct-kip+xml 514 application/vnd.palm prc pdb pqa oprc 515 application/vnd.paos.xml 516 application/vnd.pg.format str 517 application/vnd.pg.osasli ei6 518 application/vnd.piaccess.application-licence 519 application/vnd.picsel efif 520 application/vnd.poc.group-advertisement+xml 521 application/vnd.pocketlearn plf 522 application/vnd.powerbuilder6 pbd 523 application/vnd.powerbuilder6-s 524 application/vnd.powerbuilder7 525 application/vnd.powerbuilder7-s 526 application/vnd.powerbuilder75 527 application/vnd.powerbuilder75-s 528 application/vnd.preminet 529 application/vnd.previewsystems.box box 530 application/vnd.proteus.magazine mgz 531 application/vnd.publishare-delta-tree qps 532 application/vnd.pvi.ptid1 ptid 533 application/vnd.pwg-multiplexed 534 application/vnd.pwg-xhtml-print+xml 535 application/vnd.qualcomm.brew-app-res 536 application/vnd.quark.quarkxpress qxd qxt qwd qwt qxl qxb 537 application/vnd.rapid 538 application/vnd.recordare.musicxml mxl 539 application/vnd.recordare.musicxml+xml 540 application/vnd.renlearn.rlprint 541 application/vnd.rn-realmedia rm 542 application/vnd.route66.link66+xml link66 543 application/vnd.ruckus.download 544 application/vnd.s3sms 545 application/vnd.sbm.mid2 546 application/vnd.scribus 547 application/vnd.sealed.3df 548 application/vnd.sealed.csf 549 application/vnd.sealed.doc 550 application/vnd.sealed.eml 551 application/vnd.sealed.mht 552 application/vnd.sealed.net 553 application/vnd.sealed.ppt 554 application/vnd.sealed.tiff 555 application/vnd.sealed.xls 556 application/vnd.sealedmedia.softseal.html 557 application/vnd.sealedmedia.softseal.pdf 558 application/vnd.seemail see 559 application/vnd.sema sema 560 application/vnd.semd semd 561 application/vnd.semf semf 562 application/vnd.shana.informed.formdata ifm 563 application/vnd.shana.informed.formtemplate itp 564 application/vnd.shana.informed.interchange iif 565 application/vnd.shana.informed.package ipk 566 application/vnd.simtech-mindmapper twd twds 567 application/vnd.smaf mmf 568 application/vnd.software602.filler.form+xml 569 application/vnd.software602.filler.form-xml-zip 570 application/vnd.solent.sdkm+xml sdkm sdkd 571 application/vnd.spotfire.dxp dxp 572 application/vnd.spotfire.sfs sfs 573 application/vnd.sss-cod 574 application/vnd.sss-dtf 575 application/vnd.sss-ntf 576 application/vnd.street-stream 577 application/vnd.sun.wadl+xml 578 application/vnd.sus-calendar sus susp 579 application/vnd.svd svd 580 application/vnd.swiftview-ics 581 application/vnd.syncml+xml xsm 582 application/vnd.syncml.dm+wbxml bdm 583 application/vnd.syncml.dm+xml xdm 584 application/vnd.syncml.ds.notification 585 application/vnd.tao.intent-module-archive tao 586 application/vnd.tmobile-livetv tmo 587 application/vnd.trid.tpt tpt 588 application/vnd.triscape.mxs mxs 589 application/vnd.trueapp tra 590 application/vnd.truedoc 591 application/vnd.ufdl ufd ufdl 592 application/vnd.uiq.theme utz 593 application/vnd.umajin umj 594 application/vnd.unity unityweb 595 application/vnd.uoml+xml uoml 596 application/vnd.uplanet.alert 597 application/vnd.uplanet.alert-wbxml 598 application/vnd.uplanet.bearer-choice 599 application/vnd.uplanet.bearer-choice-wbxml 600 application/vnd.uplanet.cacheop 601 application/vnd.uplanet.cacheop-wbxml 602 application/vnd.uplanet.channel 603 application/vnd.uplanet.channel-wbxml 604 application/vnd.uplanet.list 605 application/vnd.uplanet.list-wbxml 606 application/vnd.uplanet.listcmd 607 application/vnd.uplanet.listcmd-wbxml 608 application/vnd.uplanet.signal 609 application/vnd.vcx vcx 610 application/vnd.vd-study 611 application/vnd.vectorworks 612 application/vnd.vidsoft.vidconference 613 application/vnd.visio vsd vst vss vsw 614 application/vnd.visionary vis 615 application/vnd.vividence.scriptfile 616 application/vnd.vsf vsf 617 application/vnd.wap.sic 618 application/vnd.wap.slc 619 application/vnd.wap.wbxml wbxml 620 application/vnd.wap.wmlc wmlc 621 application/vnd.wap.wmlscriptc wmlsc 622 application/vnd.webturbo wtb 623 application/vnd.wfa.wsc 624 application/vnd.wmc 625 application/vnd.wmf.bootstrap 626 application/vnd.wordperfect wpd 627 application/vnd.wqd wqd 628 application/vnd.wrq-hp3000-labelled 629 application/vnd.wt.stf stf 630 application/vnd.wv.csp+wbxml 631 application/vnd.wv.csp+xml 632 application/vnd.wv.ssp+xml 633 application/vnd.xara xar 634 application/vnd.xfdl xfdl 635 application/vnd.xmi+xml 636 application/vnd.xmpie.cpkg 637 application/vnd.xmpie.dpkg 638 application/vnd.xmpie.plan 639 application/vnd.xmpie.ppkg 640 application/vnd.xmpie.xlim 641 application/vnd.yamaha.hv-dic hvd 642 application/vnd.yamaha.hv-script hvs 643 application/vnd.yamaha.hv-voice hvp 644 application/vnd.yamaha.smaf-audio saf 645 application/vnd.yamaha.smaf-phrase spf 646 application/vnd.yellowriver-custom-menu cmp 647 application/vnd.zzazz.deck+xml zaz 648 application/voicexml+xml vxml 649 application/watcherinfo+xml 650 application/whoispp-query 651 application/whoispp-response 652 application/winhlp hlp 653 application/wita 654 application/wordperfect5.1 655 application/wsdl+xml wsdl 656 application/wspolicy+xml wspolicy 657 application/x-ace-compressed ace 658 application/x-bcpio bcpio 659 application/x-bittorrent torrent 660 application/x-bzip bz 661 application/x-bzip2 bz2 boz 662 application/x-cdlink vcd 663 application/x-chat chat 664 application/x-chess-pgn pgn 665 application/x-compress 666 application/x-cpio cpio 667 application/x-csh csh 668 application/x-director dcr dir dxr fgd 669 application/x-dvi dvi 670 application/x-futuresplash spl 671 application/x-gtar gtar 672 application/x-gzip 673 application/x-hdf hdf 674 application/x-latex latex 675 application/x-ms-wmd wmd 676 application/x-ms-wmz wmz 677 application/x-msaccess mdb 678 application/x-msbinder obd 679 application/x-mscardfile crd 680 application/x-msclip clp 681 application/x-msdownload exe dll com bat msi 682 application/x-msmediaview mvb m13 m14 683 application/x-msmetafile wmf 684 application/x-msmoney mny 685 application/x-mspublisher pub 686 application/x-msschedule scd 687 application/x-msterminal trm 688 application/x-mswrite wri 689 application/x-netcdf nc cdf 690 application/x-pkcs12 p12 pfx 691 application/x-pkcs7-certificates p7b spc 692 application/x-pkcs7-certreqresp p7r 693 application/x-rar-compressed rar 694 application/x-sh sh 695 application/x-shar shar 696 application/x-shockwave-flash swf 697 application/x-stuffit sit 698 application/x-stuffitx sitx 699 application/x-sv4cpio sv4cpio 700 application/x-sv4crc sv4crc 701 application/x-tar tar 702 application/x-tcl tcl 703 application/x-tex tex 704 application/x-texinfo texinfo texi 705 application/x-ustar ustar 706 application/x-wais-source src 707 application/x-x509-ca-cert der crt 708 application/x400-bp 709 application/xcap-att+xml 710 application/xcap-caps+xml 711 application/xcap-el+xml 712 application/xcap-error+xml 713 application/xcap-ns+xml 714 application/xenc+xml xenc 715 application/xhtml+xml xhtml xht 716 application/xml xml xsl 717 application/xml-dtd dtd 718 application/xml-external-parsed-entity 719 application/xmpp+xml 720 application/xop+xml xop 721 application/xslt+xml xslt 722 application/xspf+xml xspf 723 application/xv+xml mxml xhvml xvml xvm 724 application/zip zip 725 audio/32kadpcm 726 audio/3gpp 727 audio/3gpp2 728 audio/ac3 729 audio/amr 730 audio/amr-wb 731 audio/amr-wb+ 732 audio/asc 733 audio/basic au snd 734 audio/bv16 735 audio/bv32 736 audio/clearmode 737 audio/cn 738 audio/dat12 739 audio/dls 740 audio/dsr-es201108 741 audio/dsr-es202050 742 audio/dsr-es202211 743 audio/dsr-es202212 744 audio/dvi4 745 audio/eac3 746 audio/evrc 747 audio/evrc-qcp 748 audio/evrc0 749 audio/evrc1 750 audio/evrcb 751 audio/evrcb0 752 audio/evrcb1 753 audio/evrcwb 754 audio/evrcwb0 755 audio/evrcwb1 756 audio/g722 757 audio/g7221 758 audio/g723 759 audio/g726-16 760 audio/g726-24 761 audio/g726-32 762 audio/g726-40 763 audio/g728 764 audio/g729 765 audio/g7291 766 audio/g729d 767 audio/g729e 768 audio/gsm 769 audio/gsm-efr 770 audio/ilbc 771 audio/l16 772 audio/l20 773 audio/l24 774 audio/l8 775 audio/lpc 776 audio/midi mid midi kar rmi 777 audio/mobile-xmf 778 audio/mp4 mp4a 779 audio/mp4a-latm 780 audio/mpa 781 audio/mpa-robust 782 audio/mpeg mpga mp2 mp2a mp3 m2a m3a 783 audio/mpeg4-generic 784 audio/ogg oga ogg spx 785 audio/parityfec 786 audio/pcma 787 audio/pcmu 788 audio/prs.sid 789 audio/qcelp 790 audio/red 791 audio/rtp-enc-aescm128 792 audio/rtp-midi 793 audio/rtx 794 audio/smv 795 audio/smv0 796 audio/smv-qcp 797 audio/sp-midi 798 audio/t140c 799 audio/t38 800 audio/telephone-event 801 audio/tone 802 audio/ulpfec 803 audio/vdvi 804 audio/vmr-wb 805 audio/vnd.3gpp.iufp 806 audio/vnd.4sb 807 audio/vnd.audiokoz 808 audio/vnd.celp 809 audio/vnd.cisco.nse 810 audio/vnd.cmles.radio-events 811 audio/vnd.cns.anp1 812 audio/vnd.cns.inf1 813 audio/vnd.digital-winds eol 814 audio/vnd.dlna.adts 815 audio/vnd.dolby.mlp 816 audio/vnd.dts dts 817 audio/vnd.dts.hd dtshd 818 audio/vnd.everad.plj 819 audio/vnd.hns.audio 820 audio/vnd.lucent.voice lvp 821 audio/vnd.ms-playready.media.pya pya 822 audio/vnd.nokia.mobile-xmf 823 audio/vnd.nortel.vbk 824 audio/vnd.nuera.ecelp4800 ecelp4800 825 audio/vnd.nuera.ecelp7470 ecelp7470 826 audio/vnd.nuera.ecelp9600 ecelp9600 827 audio/vnd.octel.sbc 828 audio/vnd.qcelp 829 audio/vnd.rhetorex.32kadpcm 830 audio/vnd.sealedmedia.softseal.mpeg 831 audio/vnd.vmx.cvsd 832 audio/vorbis 833 audio/vorbis-config 834 audio/wav wav 835 audio/x-aiff aif aiff aifc 836 audio/x-mpegurl m3u 837 audio/x-ms-wax wax 838 audio/x-ms-wma wma 839 audio/x-pn-realaudio ram ra 840 audio/x-pn-realaudio-plugin rmp 841 audio/x-wav wav 842 chemical/x-cdx cdx 843 chemical/x-cif cif 844 chemical/x-cmdf cmdf 845 chemical/x-cml cml 846 chemical/x-csml csml 847 chemical/x-pdb pdb 848 chemical/x-xyz xyz 849 image/bmp bmp 850 image/cgm cgm 851 image/fits 852 image/g3fax g3 853 image/gif gif 854 image/ief ief 855 image/jp2 856 image/jpeg jpeg jpg jpe 857 image/jpm 858 image/jpx 859 image/naplps 860 image/png png 861 image/prs.btif btif 862 image/prs.pti 863 image/svg+xml svg svgz 864 image/t38 865 image/tiff tiff tif 866 image/tiff-fx 867 image/vnd.adobe.photoshop psd 868 image/vnd.cns.inf2 869 image/vnd.djvu djvu djv 870 image/vnd.dwg dwg 871 image/vnd.dxf dxf 872 image/vnd.fastbidsheet fbs 873 image/vnd.fpx fpx 874 image/vnd.fst fst 875 image/vnd.fujixerox.edmics-mmr mmr 876 image/vnd.fujixerox.edmics-rlc rlc 877 image/vnd.globalgraphics.pgb 878 image/vnd.microsoft.icon 879 image/vnd.mix 880 image/vnd.ms-modi mdi 881 image/vnd.net-fpx npx 882 image/vnd.sealed.png 883 image/vnd.sealedmedia.softseal.gif 884 image/vnd.sealedmedia.softseal.jpg 885 image/vnd.svf 886 image/vnd.wap.wbmp wbmp 887 image/vnd.xiff xif 888 image/x-cmu-raster ras 889 image/x-cmx cmx 890 image/x-icon ico 891 image/x-pcx pcx 892 image/x-pict pic pct 893 image/x-portable-anymap pnm 894 image/x-portable-bitmap pbm 895 image/x-portable-graymap pgm 896 image/x-portable-pixmap ppm 897 image/x-rgb rgb 898 image/x-xbitmap xbm 899 image/x-xpixmap xpm 900 image/x-xwindowdump xwd 901 message/cpim 902 message/delivery-status 903 message/disposition-notification 904 message/external-body 905 message/global 906 message/global-delivery-status 907 message/global-disposition-notification 908 message/global-headers 909 message/http 910 message/news 911 message/partial 912 message/rfc822 eml mime 913 message/s-http 914 message/sip 915 message/sipfrag 916 message/tracking-status 917 message/vnd.si.simp 918 model/iges igs iges 919 model/mesh msh mesh silo 920 model/vnd.dwf dwf 921 model/vnd.flatland.3dml 922 model/vnd.gdl gdl 923 model/vnd.gs.gdl 924 model/vnd.gtw gtw 925 model/vnd.moml+xml 926 model/vnd.mts mts 927 model/vnd.parasolid.transmit.binary 928 model/vnd.parasolid.transmit.text 929 model/vnd.vtu vtu 930 model/vrml wrl vrml 931 multipart/alternative 932 multipart/appledouble 933 multipart/byteranges 934 multipart/digest 935 multipart/encrypted 936 multipart/form-data 937 multipart/header-set 938 multipart/mixed 939 multipart/parallel 940 multipart/related 941 multipart/report 942 multipart/signed 943 multipart/voice-message 944 text/calendar ics ifb 945 text/css css 946 text/csv csv 947 text/directory 948 text/dns 949 text/enriched 950 text/html html htm 951 text/parityfec 952 text/plain txt text conf def list log in 953 text/prs.fallenstein.rst 954 text/prs.lines.tag dsc 955 text/red 956 text/rfc822-headers 957 text/richtext rtx 958 text/rtf 959 text/rtp-enc-aescm128 960 text/rtx 961 text/sgml sgml sgm 962 text/t140 963 text/tab-separated-values tsv 964 text/troff t tr roff man me ms 965 text/ulpfec 966 text/uri-list uri uris urls 967 text/vnd.abc 968 text/vnd.curl 969 text/vnd.dmclientscript 970 text/vnd.esmertec.theme-descriptor 971 text/vnd.fly fly 972 text/vnd.fmi.flexstor flx 973 text/vnd.graphviz gv 974 text/vnd.in3d.3dml 3dml 975 text/vnd.in3d.spot spot 976 text/vnd.iptc.newsml 977 text/vnd.iptc.nitf 978 text/vnd.latex-z 979 text/vnd.motorola.reflex 980 text/vnd.ms-mediapackage 981 text/vnd.net2phone.commcenter.command 982 text/vnd.si.uricatalogue 983 text/vnd.sun.j2me.app-descriptor jad 984 text/vnd.trolltech.linguist 985 text/vnd.wap.si 986 text/vnd.wap.sl 987 text/vnd.wap.wml wml 988 text/vnd.wap.wmlscript wmls 989 text/x-asm s asm 990 text/x-c c cc cxx cpp h hh dic 991 text/x-fortran f for f77 f90 992 text/x-pascal p pas 993 text/x-java-source java 994 text/x-setext etx 995 text/x-uuencode uu 996 text/x-vcalendar vcs 997 text/x-vcard vcf 998 text/xml 999 text/xml-external-parsed-entity 1000 video/3gpp 3gp 1001 video/3gpp-tt 1002 video/3gpp2 3g2 1003 video/bmpeg 1004 video/bt656 1005 video/celb 1006 video/dv 1007 video/h261 h261 1008 video/h263 h263 1009 video/h263-1998 1010 video/h263-2000 1011 video/h264 h264 1012 video/jpeg jpgv 1013 video/jpeg2000 1014 video/jpm jpm jpgm 1015 video/mj2 mj2 mjp2 1016 video/mp1s 1017 video/mp2p 1018 video/mp2t 1019 video/mp4 mp4 mp4v mpg4 1020 video/mp4v-es 1021 video/mpeg mpeg mpg mpe m1v m2v 1022 video/mpeg4-generic 1023 video/mpv 1024 video/nv 1025 video/ogg ogv 1026 video/parityfec 1027 video/pointer 1028 video/quicktime qt mov 1029 video/raw 1030 video/rtp-enc-aescm128 1031 video/rtx 1032 video/smpte292m 1033 video/ulpfec 1034 video/vc1 1035 video/vnd.cctv 1036 video/vnd.dlna.mpeg-tts 1037 video/vnd.fvt fvt 1038 video/vnd.hns.video 1039 video/vnd.iptvforum.1dparityfec-1010 1040 video/vnd.iptvforum.1dparityfec-2005 1041 video/vnd.iptvforum.2dparityfec-1010 1042 video/vnd.iptvforum.2dparityfec-2005 1043 video/vnd.iptvforum.ttsavc 1044 video/vnd.iptvforum.ttsmpeg2 1045 video/vnd.motorola.video 1046 video/vnd.motorola.videop 1047 video/vnd.mpegurl mxu m4u 1048 video/vnd.ms-playready.media.pyv pyv 1049 video/vnd.nokia.interleaved-multimedia 1050 video/vnd.nokia.videovoip 1051 video/vnd.objectvideo 1052 video/vnd.sealed.mpeg1 1053 video/vnd.sealed.mpeg4 1054 video/vnd.sealed.swf 1055 video/vnd.sealedmedia.softseal.mov 1056 video/vnd.vivo viv 1057 video/x-fli fli 1058 video/x-ms-asf asf asx 1059 video/x-ms-wm wm 1060 video/x-ms-wmv wmv 1061 video/x-ms-wmx wmx 1062 video/x-ms-wvx wvx 1063 video/x-msvideo avi 1064 video/x-sgi-movie movie 1065 x-conference/x-cooltalk ice
1 # 這個配置文件是否無效,false表示有效 2 # is this config file disabled 3 # false for enabled 4 # true for disabled 5 disabled=false 6 7 # 指定 此 storage server 所在組(卷) 8 # the name of the group this storage server belongs to 9 group_name=group1 10 11 # 是否綁定IP 12 # bind_addr= 後面爲綁定的IP地址 (經常使用於服務器有多個IP但只但願一個IP提供服務)。若是不填則表示全部的(通常不填就OK) 13 # bind an address of this host 14 # empty for bind all addresses of this host 15 bind_addr= 16 17 # bind_addr一般是針對server的。當指定bind_addr時,本參數纔有效。 18 # 本storage server做爲client鏈接其餘服務器(如tracker server、其餘storage server),是否綁定bind_addr。 19 # if bind an address of this host when connect to other servers 20 # (this storage server as a client) 21 # true for binding the address configed by above parameter: "bind_addr" 22 # false for binding any address of this host 23 client_bind=true 24 25 # storage server服務端口 26 # the storage server port 27 port=23000 28 29 # 鏈接超時時間,針對socket套接字函數connect 30 # connect timeout in seconds 31 # default value is 30s 32 connect_timeout=30 33 34 # storage server 網絡超時時間,單位爲秒。發送或接收數據時,若是在超時時間後還不能發送或接收數據,則本次網絡通訊失敗。 35 # network timeout in seconds 36 # default value is 30s 37 network_timeout=60 38 39 # 心跳間隔時間,單位爲秒 (這裏是指主動向tracker server 發送心跳) 40 # heart beat interval in seconds 41 heart_beat_interval=30 42 43 # storage server向tracker server報告磁盤剩餘空間的時間間隔,單位爲秒 44 # disk usage report interval in seconds 45 stat_report_interval=60 46 47 # base_path 目錄地址,根目錄必須存在 子目錄會自動生成 (注 :這裏不是上傳的文件存放的地址,以前是的,在某個版本後更改了) 48 # the base path to store data and log files 49 base_path=/home/yuqing/fastdfs 50 51 # 系統提供服務時的最大鏈接數 52 # max concurrent connections the server supported 53 # default value is 256 54 # more max_connections means more memory will be used 55 max_connections=256 56 57 # V2.0引入本參數。設置隊列結點的buffer大小。工做隊列消耗的內存大小 = buff_size * max_connections 58 # 設置得大一些,系統總體性能會有所提高。 59 # 消耗的內存請不要超過系統物理內存大小。另外,對於32位系統,請注意使用到的內存不要超過3GB 60 # the buff size to recv / send data 61 # this parameter must more than 8KB 62 # default value is 64KB 63 # since V2.00 64 buff_size = 256KB 65 66 # 工做線程的數量,工做線程用於處理網絡IO,應當小於max_connections的值 67 # work thread count, should <= max_connections 68 # work thread deal network io 69 # default value is 4 70 # since V2.00 71 work_threads=4 72 73 # V2.0引入本參數。磁盤IO讀寫是否分離,缺省是分離的 74 # if disk read / write separated 75 ## false for mixed read and write 76 ## true for separated read and write 77 # default value is true 78 # since V2.00 79 disk_rw_separated = true 80 81 # V2.0引入本參數。針對單個存儲路徑的讀線程數,缺省值爲1。 82 # 讀寫分離時,系統中的讀線程數 = disk_reader_threads * store_path_count 83 # 讀寫混合時,系統中的讀寫線程數 = (disk_reader_threads + disk_writer_threads) * store_path_count 84 # disk reader thread count per store base path 85 # for mixed read / write, this parameter can be 0 86 # default value is 1 87 # since V2.00 88 disk_reader_threads = 1 89 90 # V2.0引入本參數。針對單個存儲路徑的寫線程數,缺省值爲1。 91 # 讀寫分離時,系統中的寫線程數 = disk_writer_threads * store_path_count 92 # 讀寫混合時,系統中的讀寫線程數 = (disk_reader_threads + disk_writer_threads) * store_path_count 93 # disk writer thread count per store base path 94 # for mixed read / write, this parameter can be 0 95 # default value is 1 96 # since V2.00 97 disk_writer_threads = 1 98 99 # 同步文件時,若是從binlog中沒有讀到要同步的文件,休眠N毫秒後從新讀取。0表示不休眠,當即再次嘗試讀取。 100 # 出於CPU消耗考慮,不建議設置爲0。如何但願同步儘量快一些,能夠將本參數設置得小一些,好比設置爲10ms 101 # when no entry to sync, try read binlog again after X milliseconds 102 # must > 0, default value is 200ms 103 sync_wait_msec=50 104 105 # 同步上一個文件後,再同步下一個文件的時間間隔,單位爲毫秒,0表示不休眠,直接同步下一個文件。 106 # after sync a file, usleep milliseconds 107 # 0 for sync successively (never call usleep) 108 sync_interval=0 109 110 # 下面二個一塊兒解釋。容許系統同步的時間段 (默認是全天) 。通常用於避免高峯同步產生一些問題而設定,相信sa都會明白 111 # storage sync start time of a day, time format: Hour:Minute 112 # Hour from 0 to 23, Minute from 0 to 59 113 sync_start_time=00:00 114 115 # storage sync end time of a day, time format: Hour:Minute 116 # Hour from 0 to 23, Minute from 0 to 59 117 sync_end_time=23:59 118 119 # 同步完N個文件後,把storage的mark文件同步到磁盤 120 # 注:若是mark文件內容沒有變化,則不會同步 121 # write to the mark file after sync N files 122 # default value is 500 123 write_mark_file_freq=500 124 125 # 存放文件時storage server支持多個路徑(例如磁盤)。這裏配置存放文件的基路徑數目,一般只配一個目錄。 126 # path(disk or mount point) count, default value is 1 127 store_path_count=1 128 129 # 逐一配置store_path個路徑,索引號基於0。注意配置方法後面有0,1,2 ......,須要配置0到store_path - 1。 130 # 若是不配置base_path0,那邊它就和base_path對應的路徑同樣。 131 # store_path#, based 0, if store_path0 not exists, it's value is base_path 132 # the paths must be exist 133 store_path0=/home/yuqing/fastdfs 134 #store_path1=/home/yuqing/fastdfs2 135 136 # FastDFS存儲文件時,採用了兩級目錄。這裏配置存放文件的目錄個數 (系統的存儲機制,你們看看文件存儲的目錄就知道了) 137 # 若是本參數只爲N(如:256),那麼storage server在初次運行時,會自動建立 N * N 個存放文件的子目錄。 138 # subdir_count * subdir_count directories will be auto created under each 139 # store_path (disk), value can be 1 to 256, default value is 256 140 subdir_count_per_path=256 141 142 # tracker_server 的列表 要寫端口的哦 (再次提醒是主動鏈接tracker_server ) 143 # 有多個tracker server時,每一個tracker server寫一行 144 # tracker_server can ocur more than once, and tracker_server format is 145 # "host:port", host can be hostname or ip address 146 tracker_server=192.168.209.121:22122 147 148 # 日誌級別 149 #standard log level as syslog, case insensitive, value list: 150 ### emerg for emergency 151 ### alert 152 ### crit for critical 153 ### error 154 ### warn for warning 155 ### notice 156 ### info 157 ### debug 158 log_level=info 159 160 # 操做系統運行FastDFS的用戶組 (不填 就是當前用戶組,哪一個啓動進程就是哪一個) 161 #unix group name to run this program, 162 #not set (empty) means run by the group of current user 163 run_by_group= 164 165 # 操做系統運行FastDFS的用戶 (不填 就是當前用戶,哪一個啓動進程就是哪一個) 166 #unix username to run this program, 167 #not set (empty) means run by current user 168 run_by_user= 169 170 # 容許鏈接本storage server的IP地址列表 (不包括自帶HTTP服務的全部鏈接) 171 # 能夠配置多行,每行都會起做用 172 # allow_hosts can ocur more than once, host can be hostname or ip address, 173 # "*" means match all ip addresses, can use range like this: 10.0.1.[1-15,20] or 174 # host[01-08,20-25].domain.com, for example: 175 # allow_hosts=10.0.1.[1-15,20] 176 # allow_hosts=host[01-08,20-25].domain.com 177 allow_hosts=* 178 179 # 文件在data目錄下分散存儲策略。 180 # 0: 輪流存放,在一個目錄下存儲設置的文件數後(參數file_distribute_rotate_count中設置文件數),使用下一個目錄進行存儲。 181 # 1: 隨機存儲,根據文件名對應的hash code來分散存儲。 182 # the mode of the files distributed to the data path 183 # 0: round robin(default) 184 # 1: random, distributted by hash code 185 file_distribute_path_mode=0 186 187 # 當上面的參數file_distribute_path_mode配置爲0(輪流存放方式)時,本參數有效。 188 # 當一個目錄下的文件存放的文件數達到本參數值時,後續上傳的文件存儲到下一個目錄中。 189 # valid when file_distribute_to_path is set to 0 (round robin), 190 # when the written file count reaches this number, then rotate to next path 191 # default value is 100 192 file_distribute_rotate_count=100 193 194 # 當寫入大文件時,每寫入N個字節,調用一次系統函數fsync將內容強行同步到硬盤。0表示從不調用fsync 195 # call fsync to disk when write big file 196 # 0: never call fsync 197 # other: call fsync when written bytes >= this bytes 198 # default value is 0 (never call fsync) 199 fsync_after_written_bytes=0 200 201 # 同步或刷新日誌信息到硬盤的時間間隔,單位爲秒 202 # 注意:storage server 的日誌信息不是時時寫硬盤的,而是先寫內存。 203 # sync log buff to disk every interval seconds 204 # must > 0, default value is 10 seconds 205 sync_log_buff_interval=10 206 207 # 同步binglog(更新操做日誌)到硬盤的時間間隔,單位爲秒 208 # 本參數會影響新上傳文件同步延遲時間 209 # sync binlog buff / cache to disk every interval seconds 210 # default value is 60 seconds 211 sync_binlog_buff_interval=10 212 213 # 把storage的stat文件同步到磁盤的時間間隔,單位爲秒。 214 # 注:若是stat文件內容沒有變化,不會進行同步 215 # sync storage stat info to disk every interval seconds 216 # default value is 300 seconds 217 sync_stat_file_interval=300 218 219 # 線程棧的大小。FastDFS server端採用了線程方式。 220 # 對於V1.x,storage server線程棧不該小於512KB;對於V2.0,線程棧大於等於128KB便可。 221 # 線程棧越大,一個線程佔用的系統資源就越多。 222 # 對於V1.x,若是要啓動更多的線程(max_connections),能夠適當下降本參數值。 223 # thread stack size, should >= 512KB 224 # default value is 512KB 225 thread_stack_size=512KB 226 227 # 本storage server做爲源服務器,上傳文件的優先級,能夠爲負數。值越小,優先級越高。這裏就和 tracker.conf 中store_server= 2時的配置相對應了 228 # the priority as a source server for uploading file. 229 # the lower this value, the higher its uploading priority. 230 # default value is 10 231 upload_priority=10 232 233 # 網卡別名前綴,就像Linux中的eth,可使用ifconfig -a命令來查看 234 # 多個別名之間使用逗號分隔,若是不設置這個值表示自動的被系統類型設置 235 # the NIC alias prefix, such as eth in Linux, you can see it by ifconfig -a 236 # multi aliases split by comma. empty value means auto set by OS type 237 # default values is empty 238 if_alias_prefix= 239 240 # 是否檢測上傳文件已經存在。若是已經存在,則不存在文件內容,創建一個符號連接以節省磁盤空間。 241 # 這個應用要配合FastDHT 使用,因此打開前要先安裝FastDHT 242 # 1或yes 是檢測,0或no 是不檢測 243 # if check file duplicate, when set to true, use FastDHT to store file indexes 244 # 1 or yes: need check 245 # 0 or no: do not check 246 # default value is 0 247 check_file_duplicate=0 248 249 # 文件去重時,文件內容的簽名方式: 250 # hash: 4個hash code 251 # md5:MD5 252 # file signature method for check file duplicate 253 ## hash: four 32 bits hash code 254 ## md5: MD5 signature 255 # default value is hash 256 # since V4.01 257 file_signature_method=hash 258 259 # 當上個參數設定爲1 或 yes時 (true/on也是能夠的) , 在FastDHT中的命名空間 260 # namespace for storing file indexes (key-value pairs) 261 # this item must be set when check_file_duplicate is true / on 262 key_namespace=FastDFS 263 264 # 與FastDHT servers 的鏈接方式 (是否爲持久鏈接) ,默認是0(短鏈接方式)。能夠考慮使用長鏈接,這要看FastDHT server的鏈接數是否夠用。 265 # set keep_alive to 1 to enable persistent connection with FastDHT servers 266 # default value is 0 (short connection) 267 keep_alive=0 268 269 # 下面是關於FastDHT servers 的設定 須要對FastDHT servers 有所瞭解,這裏只說字面意思了 270 # 能夠經過 #include filename 方式來加載 FastDHT servers 的配置,裝上FastDHT就知道該如何配置啦。 271 # 一樣要求 check_file_duplicate=1 時纔有用,否則系統會忽略 272 # fdht_servers.conf 記載的是 FastDHT servers 列表 273 # you can use "#include filename" (not include double quotes) directive to 274 # load FastDHT server list, when the filename is a relative path such as 275 # pure filename, the base path is the base path of current/this config file. 276 # must set FastDHT server list when check_file_duplicate is true / on 277 # please see INSTALL of FastDHT for detail 278 ##include /home/yuqing/fastdht/conf/fdht_servers.conf 279 280 # 是否將文件操做記錄到access log 281 # if log to access log 282 # default value is false 283 # since V4.00 284 use_access_log = false 285 286 # 是否認期輪轉access log,目前僅支持一天輪轉一次 287 # if rotate the access log every day 288 # default value is false 289 # since V4.00 290 rotate_access_log = false 291 292 # access log按期輪轉的時間點,只有當rotate_access_log設置爲true時有效 293 # rotate access log time base, time format: Hour:Minute 294 # Hour from 0 to 23, Minute from 0 to 59 295 # default value is 00:00 296 # since V4.00 297 access_log_rotate_time=00:00 298 299 # 是否認期輪轉error log,目前僅支持一天輪轉一次 300 # if rotate the error log every day 301 # default value is false 302 # since V4.02 303 rotate_error_log = false 304 305 # error log按期輪轉的時間點,只有當rotate_error_log設置爲true時有效 306 # rotate error log time base, time format: Hour:Minute 307 # Hour from 0 to 23, Minute from 0 to 59 308 # default value is 00:00 309 # since V4.02 310 error_log_rotate_time=00:00 311 312 # access log按文件大小輪轉 313 # 設置爲0表示不按文件大小輪轉,不然當access log達到該大小,就會輪轉到新文件中 314 # rotate access log when the log file exceeds this size 315 # 0 means never rotates log file by log file size 316 # default value is 0 317 # since V4.02 318 rotate_access_log_size = 0 319 320 # error log按文件大小輪轉 321 # 設置爲0表示不按文件大小輪轉,不然當error log達到該大小,就會輪轉到新文件中 322 # rotate error log when the log file exceeds this size 323 # 0 means never rotates log file by log file size 324 # default value is 0 325 # since V4.02 326 rotate_error_log_size = 0 327 328 # 文件同步的時候,是否忽略無效的binlog記錄 329 # if skip the invalid record when sync file 330 # default value is false 331 # since V4.02 332 file_sync_skip_invalid_record=false 333 334 # 是否使用鏈接池 335 # if use connection pool 336 # default value is false 337 # since V4.05 338 use_connection_pool = false 339 340 # 若是一個鏈接的空閒時間超過這個值將會被自動關閉 341 # connections whose the idle time exceeds this time will be closed 342 # unit: second 343 # default value is 3600 344 # since V4.05 345 connection_pool_max_idle_time = 3600 346 347 # storage server上web server域名,一般僅針對單獨部署的web server。這樣URL中就能夠經過域名方式來訪問storage server上的文件了, 348 # 這個參數爲空就是IP地址的方式。 349 # use the ip address of this storage server if domain_name is empty, 350 # else this domain name will ocur in the url redirected by the tracker server 351 http.domain_name= 352 353 # web server的端口 354 # the port of the web server on this storage server 355 http.server_port=8888
1 # <id> <group_name> <ip_or_hostname> 2 100001 group1 10.143.92.61 3 100002 group1 10.143.92.62 4 100003 group1 10.143.92.63
1 # 這個配置文件是否無效,false表示有效 2 # is this config file disabled 3 # false for enabled 4 # true for disabled 5 disabled=false 6 7 # 是否綁定IP 8 # bind_addr= 後面爲綁定的IP地址 (經常使用於服務器有多個IP但只但願一個IP提供服務)。若是不填則表示全部的(通常不填就OK) 9 # bind an address of this host 10 # empty for bind all addresses of this host 11 bind_addr= 12 13 # 提供服務的端口 14 # the tracker server port 15 port=22122 16 17 # 鏈接超時時間,針對socket套接字函數connect 18 # connect timeout in seconds 19 # default value is 30s 20 connect_timeout=30 21 22 # tracker server的網絡超時,單位爲秒。發送或接收數據時,若是在超時時間後還不能發送或接收數據,則本次網絡通訊失敗 23 # network timeout in seconds 24 # default value is 30s 25 network_timeout=60 26 27 # the base path to store data and log files 28 base_path=/home/yuqing/fastdfs 29 30 # base_path 目錄地址(根目錄必須存在,子目錄會自動建立) 31 # 附目錄說明: 32 # tracker server目錄及文件結構: 33 # ${base_path} 34 # |__data 35 # | |__storage_groups.dat:存儲分組信息 36 # | |__storage_servers.dat:存儲服務器列表 37 # |__logs 38 # |__trackerd.log:tracker server日誌文件 39 40 #數據文件storage_groups.dat和storage_servers.dat中的記錄之間以換行符(\n)分隔,字段之間以西文逗號(,)分隔。 41 #storage_groups.dat中的字段依次爲: 42 # 1. group_name:組名 43 # 2. storage_port:storage server端口號 44 45 #storage_servers.dat中記錄storage server相關信息,字段依次爲: 46 # 1. group_name:所屬組名 47 # 2. ip_addr:ip地址 48 # 3. status:狀態 49 # 4. sync_src_ip_addr:向該storage server同步已有數據文件的源服務器 50 # 5. sync_until_timestamp:同步已有數據文件的截至時間(UNIX時間戳) 51 # 6. stat.total_upload_count:上傳文件次數 52 # 7. stat.success_upload_count:成功上傳文件次數 53 # 8. stat.total_set_meta_count:更改meta data次數 54 # 9. stat.success_set_meta_count:成功更改meta data次數 55 # 10. stat.total_delete_count:刪除文件次數 56 # 11. stat.success_delete_count:成功刪除文件次數 57 # 12. stat.total_download_count:下載文件次數 58 # 13. stat.success_download_count:成功下載文件次數 59 # 14. stat.total_get_meta_count:獲取meta data次數 60 # 15. stat.success_get_meta_count:成功獲取meta data次數 61 # 16. stat.last_source_update:最近一次源頭更新時間(更新操做來自客戶端) 62 # 17. stat.last_sync_update:最近一次同步更新時間(更新操做來自其餘storage server的同步) 63 64 # 系統提供服務時的最大鏈接數。對於V1.x,因一個鏈接由一個線程服務,也就是工做線程數。 65 # 對於V2.x,最大鏈接數和工做線程數沒有任何關係 66 # max concurrent connections this server supported 67 max_connections=256 68 69 # work thread count, should <= max_connections 70 # default value is 4 71 # since V2.00 72 # V2.0引入的這個參數,工做線程數,一般設置爲CPU數 73 work_threads=4 74 75 # 上傳組(卷) 的方式 0:輪詢方式 1: 指定組 2: 平衡負載(選擇最大剩餘空間的組(卷)上傳) 76 # 這裏若是在應用層指定了上傳到一個固定組,那麼這個參數被繞過 77 # the method of selecting group to upload files 78 # 0: round robin 79 # 1: specify group 80 # 2: load balance, select the max free space group to upload file 81 store_lookup=2 82 83 # 當上一個參數設定爲1 時 (store_lookup=1,即指定組名時),必須設置本參數爲系統中存在的一個組名。若是選擇其餘的上傳方式,這個參數就沒有效了 84 # which group to upload file 85 # when store_lookup set to 1, must set store_group to the group name 86 store_group=group2 87 88 # 選擇哪一個storage server 進行上傳操做(一個文件被上傳後,這個storage server就至關於這個文件的storage server源,會對同組的storage server推送這個文件達到同步效果) 89 # 0: 輪詢方式 90 # 1: 根據ip 地址進行排序選擇第一個服務器(IP地址最小者) 91 # 2: 根據優先級進行排序(上傳優先級由storage server來設置,參數名爲upload_priority) 92 # which storage server to upload file 93 # 0: round robin (default) 94 # 1: the first server order by ip address 95 # 2: the first server order by priority (the minimal) 96 store_server=0 97 98 # 選擇storage server 中的哪一個目錄進行上傳。storage server能夠有多個存放文件的base path(能夠理解爲多個磁盤)。 99 # 0: 輪流方式,多個目錄依次存放文件 100 # 2: 選擇剩餘空間最大的目錄存放文件(注意:剩餘磁盤空間是動態的,所以存儲到的目錄或磁盤可能也是變化的) 101 # which path(means disk or mount point) of the storage server to upload file 102 # 0: round robin 103 # 2: load balance, select the max free space path to upload file 104 store_path=0 105 106 # 選擇哪一個 storage server 做爲下載服務器 107 # 0: 輪詢方式,能夠下載當前文件的任一storage server 108 # 1: 哪一個爲源storage server 就用哪個 (前面說過了這個storage server源 是怎樣產生的) 就是以前上傳到哪一個storage server服務器就是哪一個了 109 # which storage server to download file 110 # 0: round robin (default) 111 # 1: the source storage server which the current file uploaded to 112 download_server=0 113 114 # storage server 上保留的空間,保證系統或其餘應用需求空間。能夠用絕對值或者百分比(V4開始支持百分比方式)。 115 #(指出 若是同組的服務器的硬盤大小同樣,以最小的爲準,也就是隻要同組中有一臺服務器達到這個標準了,這個標準就生效,緣由就是由於他們進行備份) 116 # reserved storage space for system or other applications. 117 # if the free(available) space of any stoarge server in 118 # a group <= reserved_storage_space, 119 # no file can be uploaded to this group. 120 # bytes unit can be one of follows: 121 ### G or g for gigabyte(GB) 122 ### M or m for megabyte(MB) 123 ### K or k for kilobyte(KB) 124 ### no unit for byte(B) 125 ### XX.XX% as ratio such as reserved_storage_space = 10% 126 reserved_storage_space = 10% 127 128 # 選擇日誌級別 129 #standard log level as syslog, case insensitive, value list: 130 ### emerg for emergency 131 ### alert 132 ### crit for critical 133 ### error 134 ### warn for warning 135 ### notice 136 ### info 137 ### debug 138 log_level=info 139 140 # 操做系統運行FastDFS的用戶組 (不填 就是當前用戶組,哪一個啓動進程就是哪一個) 141 #unix group name to run this program, 142 #not set (empty) means run by the group of current user 143 run_by_group= 144 145 # 操做系統運行FastDFS的用戶 (不填 就是當前用戶,哪一個啓動進程就是哪一個) 146 #unix username to run this program, 147 #not set (empty) means run by current user 148 run_by_user= 149 150 # 能夠鏈接到此 tracker server 的ip範圍(對全部類型的鏈接都有影響,包括客戶端,storage server) 151 # allow_hosts can ocur more than once, host can be hostname or ip address, 152 # "*" means match all ip addresses, can use range like this: 10.0.1.[1-15,20] or 153 # host[01-08,20-25].domain.com, for example: 154 # allow_hosts=10.0.1.[1-15,20] 155 # allow_hosts=host[01-08,20-25].domain.com 156 allow_hosts=* 157 158 # 同步或刷新日誌信息到硬盤的時間間隔,單位爲秒 159 # 注意:tracker server 的日誌不是時時寫硬盤的,而是先寫內存 160 # sync log buff to disk every interval seconds 161 # default value is 10 seconds 162 sync_log_buff_interval = 10 163 164 # 檢測 storage server 存活的時間隔,單位爲秒。 165 # storage server按期向tracker server 發心跳,若是tracker server在一個check_active_interval內尚未收到storage server的一次心跳,那邊將認爲該storage server已經下線。因此本參數值必須大於storage server配置的心跳時間間隔。一般配置爲storage server心跳時間間隔的2倍或3倍 166 # check storage server alive interval seconds 167 check_active_interval = 120 168 169 # 線程棧的大小。FastDFS server端採用了線程方式。tracker server線程棧不該小於64KB 170 # 線程棧越大,一個線程佔用的系統資源就越多。若是要啓動更多的線程(V1.x對應的參數爲max_connections, 171 V2.0爲work_threads),能夠適當下降本參數值 172 # thread stack size, should >= 64KB 173 # default value is 64KB 174 thread_stack_size = 64KB 175 176 # 這個參數控制當storage server IP地址改變時,集羣是否自動調整。注:只有在storage server進程重啓時才完成自動調整 177 # auto adjust when the ip address of the storage server changed 178 # default value is true 179 storage_ip_changed_auto_adjust = true 180 181 # V2.0引入的參數。存儲服務器之間同步文件的最大延遲時間,缺省爲1天。根據實際狀況進行調整 182 # 注:本參數並不影響文件同步過程。本參數僅在下載文件時,判斷文件是否已經被同步完成的一個閥值(經驗值) 183 # storage sync file max delay seconds 184 # default value is 86400 seconds (one day) 185 # since V2.00 186 storage_sync_file_max_delay = 86400 187 188 # V2.0引入的參數。存儲服務器同步一個文件須要消耗的最大時間,缺省爲300s,即5分鐘。 189 # 注:本參數並不影響文件同步過程。本參數僅在下載文件時,做爲判斷當前文件是否被同步完成的一個閥值(經驗值) 190 # the max time of storage sync a file 191 # default value is 300 seconds 192 # since V2.00 193 storage_sync_file_max_time = 300 194 195 # V3.0引入的參數。是否使用小文件合併存儲特性,缺省是關閉的 196 # if use a trunk file to store several small files 197 # default value is false 198 # since V3.00 199 use_trunk_file = false 200 201 # V3.0引入的參數。 202 # trunk file分配的最小字節數。好比文件只有16個字節,系統也會分配slot_min_size個字節 203 # the min slot size, should <= 4KB 204 # default value is 256 bytes 205 # since V3.00 206 slot_min_size = 256 207 208 # V3.0引入的參數。 209 # 只有文件大小<=這個參數值的文件,纔會合併存儲。若是一個文件的大小大於這個參數值,將直接保存到一個文件中(即不採用合併存儲方式)。 210 # the max slot size, should > slot_min_size 211 # store the upload file to trunk file when it's size <= this value 212 # default value is 16MB 213 # since V3.00 214 slot_max_size = 16MB 215 216 # V3.0引入的參數。 217 # 合併存儲的trunk file大小,至少4MB,缺省值是64MB。不建議設置得過大 218 # the trunk file size, should >= 4MB 219 # default value is 64MB 220 # since V3.00 221 trunk_file_size = 64MB 222 223 # 是否提早建立trunk file。只有當這個參數爲true,下面3個以trunk_create_file_打頭的參數纔有效 224 # if create trunk file advancely 225 # default value is false 226 # since V3.06 227 trunk_create_file_advance = false 228 229 # 提早建立trunk file的起始時間點(基準時間),02:00表示第一次建立的時間點是凌晨2點 230 # the time base to create trunk file 231 # the time format: HH:MM 232 # default value is 02:00 233 # since V3.06 234 trunk_create_file_time_base = 02:00 235 236 # 建立trunk file的時間間隔,單位爲秒。若是天天只提早建立一次,則設置爲86400 237 # the interval of create trunk file, unit: second 238 # default value is 38400 (one day) 239 # since V3.06 240 trunk_create_file_interval = 86400 241 242 # 提早建立trunk file時,須要達到的空閒trunk大小 243 # 好比本參數爲20G,而當前空閒trunk爲4GB,那麼只須要建立16GB的trunk file便可 244 # the threshold to create trunk file 245 # when the free trunk file size less than the threshold, will create 246 # the trunk files 247 # default value is 0 248 # since V3.06 249 trunk_create_file_space_threshold = 20G 250 251 # trunk初始化時,是否檢查可用空間是否被佔用 252 # if check trunk space occupying when loading trunk free spaces 253 # the occupied spaces will be ignored 254 # default value is false 255 # since V3.09 256 # NOTICE: set this parameter to true will slow the loading of trunk spaces 257 # when startup. you should set this parameter to true when neccessary. 258 trunk_init_check_occupying = false 259 260 # 是否無條件從trunk binlog中加載trunk可用空間信息 261 # FastDFS缺省是從快照文件storage_trunk.dat中加載trunk可用空間, 262 # 該文件的第一行記錄的是trunk binlog的offset,而後從binlog的offset開始加載 263 # if ignore storage_trunk.dat, reload from trunk binlog 264 # default value is false 265 # since V3.10 266 # set to true once for version upgrade when your version less than V3.10 267 trunk_init_reload_from_binlog = false 268 269 # 是否使用server ID做爲storage server標識 270 # if use storage ID instead of IP address 271 # default value is false 272 # since V4.00 273 use_storage_id = false 274 275 # use_storage_id 設置爲true,才須要設置本參數 276 # 在文件中設置組名、server ID和對應的IP地址,參見源碼目錄下的配置示例:conf/storage_ids.conf 277 # specify storage ids filename, can use relative or absolute path 278 # since V4.00 279 storage_ids_filename = storage_ids.conf 280 281 #文件名中的id類型,有ip和id兩種,只有當use_storage_id設置爲true時該參數纔有效 282 # id type of the storage server in the filename, values are: 283 ## ip: the ip address of the storage server 284 ## id: the server id of the storage server 285 # this paramter is valid only when use_storage_id set to true 286 # default value is ip 287 # since V4.03 288 id_type_in_filename = ip 289 290 # 存儲從文件是否採用symbol link(符號連接)方式 291 # 若是設置爲true,一個從文件將佔用兩個文件:原始文件及指向它的符號連接 292 # if store slave file use symbol link 293 # default value is false 294 # since V4.01 295 store_slave_file_use_link = false 296 297 # 是否認期輪轉error log,目前僅支持一天輪轉一次 298 # if rotate the error log every day 299 # default value is false 300 # since V4.02 301 rotate_error_log = false 302 303 # error log按期輪轉的時間點,只有當rotate_error_log設置爲true時有效 304 # rotate error log time base, time format: Hour:Minute 305 # Hour from 0 to 23, Minute from 0 to 59 306 # default value is 00:00 307 # since V4.02 308 error_log_rotate_time=00:00 309 310 # error log按大小輪轉 311 # 設置爲0表示不按文件大小輪轉,不然當error log達到該大小,就會輪轉到新文件中 312 # rotate error log when the log file exceeds this size 313 # 0 means never rotates log file by log file size 314 # default value is 0 315 # since V4.02 316 rotate_error_log_size = 0 317 318 # 是否使用鏈接池 319 # if use connection pool 320 # default value is false 321 # since V4.05 322 use_connection_pool = false 323 324 # 若是一個鏈接的空閒時間超過這個值將會被自動關閉 325 # connections whose the idle time exceeds this time will be closed 326 # unit: second 327 # default value is 3600 328 # since V4.05 329 connection_pool_max_idle_time = 3600 330 331 # 用於提供http服務的端口 332 # HTTP port on this tracker server 333 http.server_port=8080 334 335 # 檢查http server是否還在工做的時間間隔,若是該值小於0則永遠不檢查 336 # check storage HTTP server alive interval seconds 337 # <= 0 for never check 338 # default value is 30 339 http.check_alive_interval=30 340 341 # 檢查http server是否存活的類型,有tcp和http兩種 342 # tcp方式只有http端口被鏈接 343 # http方式檢查必須返回狀態值200 344 # check storage HTTP server alive type, values are: 345 # tcp : connect to the storge server with HTTP port only, 346 # do not request and get response 347 # http: storage check alive url must return http status 200 348 # default value is tcp 349 http.check_alive_type=tcp 350 351 # check storage HTTP server alive uri/url 352 # NOTE: storage embed HTTP server support uri: /status.html 353 http.check_alive_uri=/status.html
1 # 鏈接超時時間,針對socket套接字函數connect 2 # connect timeout in seconds 3 # default value is 30s 4 connect_timeout=30 5 6 # client的網絡超時,單位爲秒。發送或接收數據時,若是在超時時間後還不能發送或接收數據,則本次網絡通訊失敗 7 # network timeout in seconds 8 # default value is 30s 9 network_timeout=60 10 11 # 存儲日誌的根目錄 12 # the base path to store log files 13 base_path=/home/yuqing/fastdfs 14 15 # tracker_server 的列表 要寫端口 16 # tracker_server can ocur more than once, and tracker_server format is 17 # "host:port", host can be hostname or ip address 18 tracker_server=192.168.0.197:22122 19 20 # 日誌的級別 21 #standard log level as syslog, case insensitive, value list: 22 ### emerg for emergency 23 ### alert 24 ### crit for critical 25 ### error 26 ### warn for warning 27 ### notice 28 ### info 29 ### debug 30 log_level=info 31 32 # 是否使用鏈接池 33 # if use connection pool 34 # default value is false 35 # since V4.05 36 use_connection_pool = false 37 38 # 若是一個鏈接的空閒時間超過這個值將會被自動關閉 39 # connections whose the idle time exceeds this time will be closed 40 # unit: second 41 # default value is 3600 42 # since V4.05 43 connection_pool_max_idle_time = 3600 44 45 # 是否從FastDFS的tracker server加載參數 46 # if load FastDFS parameters from tracker server 47 # since V4.05 48 # default value is false 49 load_fdfs_parameters_from_tracker=false 50 51 是否使用storage ID 代替IP,只有當load_fdfs_parameters_from_tracker爲false時纔有效 52 # if use storage ID instead of IP address 53 # same as tracker.conf 54 # valid only when load_fdfs_parameters_from_tracker is false 55 # default value is false 56 # since V4.05 57 use_storage_id = false 58 59 # 指定storage_ids的路徑,可使用絕對路徑和相對路徑,只有當load_fdfs_parameters_from_tracker爲false時纔有效 60 # specify storage ids filename, can use relative or absolute path 61 # same as tracker.conf 62 # valid only when load_fdfs_parameters_from_tracker is false 63 # since V4.05 64 storage_ids_filename = storage_ids.conf 65 66 67 #tracker server的http端口 68 #HTTP settings 69 http.tracker_server_port=8080 70 71 #use "#include" directive to include HTTP other settiongs 72 ##include http.conf
啓動tracker:fdfs_trackerd /etc/fdfs/tracker.conf
啓動storage:fdfs_storaged /etc/fdfs/storage.conf
cat /data/fastdfs/logs/trackerd.log
vim /etc/rc.local
運行fdfs_monitor查看storage服務器是否已經登記到tracker服務器
fdfs_monitor /etc/fdfs/storage.conf
自啓動
su - fastdfs -c 「/usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf start」
su - fastdfs -c 「/usr/bin/fdfs_storaged /etc/fdfs/storage.conf start」
/usr/bin/fdfs_upload_file /etc/fdfs/client.conf 12act.jpg
group1/M00/00/00/Co9cVVg9YpiAEPtzAAI_zj6nEUw318.jpg
[root@test-1 ~]# fdfs_test /etc/fdfs/client.conf upload test.html
This is FastDFS client test program v5.05
Copyright (C) 2008, Happy Fish / YuQing
FastDFS may be copied only under the terms of the GNU General
Public License V3, which may be found in the FastDFS source kit.
Please visit the FastDFS Home Page http://www.csource.org/
for more detail.
[2015-06-14 02:46:06] DEBUG - base_path=/tmp, connect_timeout=30, network_timeout=60, tracker_server_count=1, anti_steal_token=0, anti_steal_secret_key length=0, use_connection_pool=0, g_connection_pool_max_idle_time=3600s, use_storage_id=0, storage server id count: 0
tracker_query_storage_store_list_without_group:
server 1. group_name=, ip_addr=192.168.0.205, port=23000
server 2. group_name=, ip_addr=192.168.0.206, port=23000
group_name=group1, ip_addr=192.168.0.206, port=23000
storage_upload_by_filename
group_name=group1, remote_filename=M00/00/00/wKgAzlV8em6Af8qBAAAADxtaRO466.html
source ip address: 192.168.0.206
file timestamp=2015-06-14 02:46:06
file size=15
file crc32=458900718
example file url: http://192.168.0.206/group1/M00/00/00/wKgAzlV8em6Af8qBAAAADxtaRO466.html
storage_upload_slave_by_filename
group_name=group1, remote_filename=M00/00/00/wKgAzlV8em6Af8qBAAAADxtaRO466_big.html
source ip address: 192.168.0.206
file timestamp=2015-06-14 02:46:06
file size=15
file crc32=458900718
example file url: http://192.168.0.206/group1/M00/00/00/wKgAzlV8em6Af8qBAAAADxtaRO466_big.html
注意,上述安裝的路徑在/usr/lib64/,可是FastDFS主程序設置的lib目錄是/usr/local/lib,因此須要建立軟鏈接以下:
ln -s /usr/lib64/libfastcommon.so /usr/local/lib/libfastcommon.so
ln -s /usr/lib64/libfastcommon.so /usr/lib/libfastcommon.so
ln -s /usr/lib64/libfdfsclient.so /usr/local/lib/libfdfsclient.so
ln -s /usr/lib64/libfdfsclient.so /usr/lib/libfdfsclient.so
fastdfs常見問題:http://blog.csdn.net/zhushuai1221/article/details/52440970