fastdfs 集群配置
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.git
安装文件:
FastDFS 5.x 取消了对 libevent 的依赖,添加了对 libfastcommon 的依赖。
本部署说明用到的软件版本:
libfastcommon v1.13
FastDFS v5.08
fastdfs-nginx-module v1.17
fastdfs安装配置:
创建用户与组
# groupadd fdfs
# useradd fdfs -g fdfs
解压、安装
在每一台tracker和storage服务器上执行
# tar xzvf FastDFS_v5.08.tar.gz
#cd FastDFS/
#./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
FastDFS配置
配置Tracker跟踪器
开放tracker监听端口访问
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/fastdfs4 tracker_server=10.143.92.61:22122 5 tracker_server=10.143.92.62:22122 6 log_level=info7 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.conf12 http.tracker_server_port=8080
http.conf
1 # This isa 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 client5 # isimportant so they know how to handle the content of the file.6 # Extra types can either be added here or by usingan AddType directive7 # inyour config files. For more information about Internet media types,8 # please read RFC 2045, 2046, 2047, 2048, and 2077. The Internet media type9 # registry is at <http://www.iana.org/assignments/media-types/>. 10 11 # MIME type Extensions12 application/activemessage13 application/andrew-inset ez14 application/applefile15 application/atom+xml atom16 application/atomcat+xml atomcat17 application/atomicmail18 application/atomsvc+xml atomsvc19 application/auth-policy+xml20 application/batch-smtp21 application/beep+xml22 application/cals-1840 23 application/ccxml+xml ccxml24 application/cellml+xml25 application/cnrp+xml26 application/commonground27 application/conference-info+xml28 application/cpl+xml29 application/csta+xml30 application/cstadata+xml31 application/cybercash32 application/davmount+xml davmount33 application/dca-rft34 application/dec-dx35 application/dialog-info+xml36 application/dicom37 application/dns38 application/dvcs39 application/ecmascript ecma40 application/edi-consent41 application/edi-x1242 application/edifact43 application/epp+xml44 application/eshop45 application/fastinfoset46 application/fastsoap47 application/fits48 application/font-tdpfr pfr49 application/h22450 application/http51 application/hyperstudio stk52 application/iges53 application/im-iscomposing+xml54 application/index55 application/index.cmd56 application/index.obj57 application/index.response58 application/index.vnd59 application/iotp60 application/ipp61 application/isup62 application/javascript js63 application/json json64 application/kpml-request+xml65 application/kpml-response+xml66 application/lost+xml lostxml67 application/mac-binhex40 hqx68 application/mac-compactpro cpt69 application/macwriteii70 application/marc mrc71 application/mathematica ma nb mb72 application/mathml+xml mathml73 application/mbms-associated-procedure-description+xml74 application/mbms-deregister+xml75 application/mbms-envelope+xml76 application/mbms-msk+xml77 application/mbms-msk-response+xml78 application/mbms-protection-description+xml79 application/mbms-reception-report+xml80 application/mbms-register+xml81 application/mbms-register-response+xml82 application/mbms-user-service-description+xml83 application/mbox mbox84 application/media_control+xml85 application/mediaservercontrol+xml mscml86 application/mikey87 application/moss-keys88 application/moss-signature89 application/mosskey-data90 application/mosskey-request91 application/mp4 mp4s92 application/mpeg4-generic93 application/mpeg4-iod94 application/mpeg4-iod-xmt95 application/msword doc dot96 application/mxf mxf97 application/nasdata98 application/news-transmission99 application/nss100 application/ocsp-request101 application/ocsp-response102 application/octet-stream bin dms lha lzh classso iso dmg dist distz pkg bpk dump elc103 application/oda oda104 application/oebps-package+xml105 application/ogg ogx106 application/parityfec107 application/patch-ops-error+xml xer108 application/pdf pdf109 application/pgp-encrypted pgp110 application/pgp-keys111 application/pgp-signature asc sig112 application/pics-rules prf113 application/pidf+xml114 application/pidf-diff+xml115 application/pkcs10 p10116 application/pkcs7-mime p7m p7c117 application/pkcs7-signature p7s118 application/pkix-cert cer119 application/pkix-crl crl120 application/pkix-pkipath pkipath121 application/pkixcmp pki122 application/pls+xml pls123 application/poc-settings+xml124 application/postscript ai eps ps125 application/prs.alvestrand.titrax-sheet126 application/prs.cww cww127 application/prs.nprend128 application/prs.plucker129 application/qsig130 application/rdf+xml rdf131 application/reginfo+xml rif132 application/relax-ng-compact-syntax rnc133 application/remote-printing134 application/resource-lists+xml rl135 application/resource-lists-diff+xml rld136 application/riscos137 application/rlmi+xml138 application/rls-services+xml rs139 application/rsd+xml rsd140 application/rss+xml rss141 application/rtf rtf142 application/rtx143 application/samlassertion+xml144 application/samlmetadata+xml145 application/sbml+xml sbml146 application/scvp-cv-request scq147 application/scvp-cv-response scs148 application/scvp-vp-request spq149 application/scvp-vp-response spp150 application/sdp sdp151 application/set-payment152 application/set-payment-initiation setpay153 application/set-registration154 application/set-registration-initiation setreg155 application/sgml156 application/sgml-open-catalog157 application/shf+xml shf158 application/sieve159 application/simple-filter+xml160 application/simple-message-summary161 application/simplesymbolcontainer162 application/slate163 application/smil164 application/smil+xml smi smil165 application/soap+fastinfoset166 application/soap+xml167 application/sparql-query rq168 application/sparql-results+xml srx169 application/spirits-event+xml170 application/srgs gram171 application/srgs+xml grxml172 application/ssml+xml ssml173 application/timestamp-query174 application/timestamp-reply175 application/tve-trigger176 application/ulpfec177 application/vemmi178 application/vividence.scriptfile179 application/vnd.3gpp.bsf+xml180 application/vnd.3gpp.pic-bw-large plb181 application/vnd.3gpp.pic-bw-small psb182 application/vnd.3gpp.pic-bw-varpvb183 application/vnd.3gpp.sms184 application/vnd.3gpp2.bcmcsinfo+xml185 application/vnd.3gpp2.sms186 application/vnd.3gpp2.tcap tcap187 application/vnd.3m.post-it-notes pwn188 application/vnd.accpac.simply.aso aso189 application/vnd.accpac.simply.imp imp190 application/vnd.acucobol acu191 application/vnd.acucorp atc acutc192 application/vnd.adobe.xdp+xml xdp193 application/vnd.adobe.xfdf xfdf194 application/vnd.aether.imp195 application/vnd.americandynamics.acc acc196 application/vnd.amiga.ami ami197 application/vnd.anser-web-certificate-issue-initiation cii198 application/vnd.anser-web-funds-transfer-initiation fti199 application/vnd.antix.game-component atx200 application/vnd.apple.installer+xml mpkg201 application/vnd.arastra.swi swi202 application/vnd.audiograph aep203 application/vnd.autopackage204 application/vnd.avistar+xml205 application/vnd.blueice.multipass mpm206 application/vnd.bmi bmi207 application/vnd.businessobjects rep208 application/vnd.cab-jscript209 application/vnd.canon-cpdl210 application/vnd.canon-lips211 application/vnd.cendio.thinlinc.clientconf212 application/vnd.chemdraw+xml cdxml213 application/vnd.chipnuts.karaoke-mmd mmd214 application/vnd.cinderella cdy215 application/vnd.cirpack.isdn-ext216 application/vnd.claymore cla217 application/vnd.clonk.c4group c4g c4d c4f c4p c4u218 application/vnd.commerce-battelle219 application/vnd.commonspace csp cst220 application/vnd.contact.cmsg cdbcmsg221 application/vnd.cosmocaller cmc222 application/vnd.crick.clicker clkx223 application/vnd.crick.clicker.keyboard clkk224 application/vnd.crick.clicker.palette clkp225 application/vnd.crick.clicker.template clkt226 application/vnd.crick.clicker.wordbank clkw227 application/vnd.criticaltools.wbs+xml wbs228 application/vnd.ctc-posml pml229 application/vnd.ctct.ws+xml230 application/vnd.cups-pdf231 application/vnd.cups-postscript232 application/vnd.cups-ppd ppd233 application/vnd.cups-raster234 application/vnd.cups-raw235 application/vnd.curl curl236 application/vnd.cybank237 application/vnd.data-vision.rdz rdz238 application/vnd.denovo.fcselayout-link fe_launch239 application/vnd.dna dna240 application/vnd.dolby.mlp mlp241 application/vnd.dpgraph dpg242 application/vnd.dreamfactory dfac243 application/vnd.dvb.esgcontainer244 application/vnd.dvb.ipdcesgaccess245 application/vnd.dvb.iptv.alfec-base 246 application/vnd.dvb.iptv.alfec-enhancement247 application/vnd.dxr248 application/vnd.ecdis-update249 application/vnd.ecowin.chart mag250 application/vnd.ecowin.filerequest251 application/vnd.ecowin.fileupdate252 application/vnd.ecowin.series253 application/vnd.ecowin.seriesrequest254 application/vnd.ecowin.seriesupdate255 application/vnd.enliven nml256 application/vnd.epson.esf esf257 application/vnd.epson.msf msf258 application/vnd.epson.quickanime qam259 application/vnd.epson.salt slt260 application/vnd.epson.ssf ssf261 application/vnd.ericsson.quickcall262 application/vnd.eszigno3+xml es3 et3263 application/vnd.eudora.data264 application/vnd.ezpix-album ez2265 application/vnd.ezpix-package ez3266 application/vnd.fdf fdf267 application/vnd.ffsns268 application/vnd.fints269 application/vnd.flographit gph270 application/vnd.fluxtime.clip ftc271 application/vnd.font-fontforge-sfd272 application/vnd.framemaker fm frame maker273 application/vnd.frogans.fnc fnc274 application/vnd.frogans.ltf ltf275 application/vnd.fsc.weblaunch fsc276 application/vnd.fujitsu.oasys oas277 application/vnd.fujitsu.oasys2 oa2278 application/vnd.fujitsu.oasys3 oa3279 application/vnd.fujitsu.oasysgp fg5280 application/vnd.fujitsu.oasysprs bh2281 application/vnd.fujixerox.art-ex282 application/vnd.fujixerox.art4283 application/vnd.fujixerox.hbpl284 application/vnd.fujixerox.ddd ddd285 application/vnd.fujixerox.docuworks xdw286 application/vnd.fujixerox.docuworks.binder xbd287 application/vnd.fut-misnet288 application/vnd.fuzzysheet fzs289 application/vnd.genomatix.tuxedo txd290 application/vnd.gmx gmx291 application/vnd.google-earth.kml+xml kml292 application/vnd.google-earth.kmz kmz293 application/vnd.grafeq gqf gqs294 application/vnd.gridmp295 application/vnd.groove-account gac296 application/vnd.groove-help ghf297 application/vnd.groove-identity-message gim298 application/vnd.groove-injector grv299 application/vnd.groove-tool-message gtm300 application/vnd.groove-tool-template tpl301 application/vnd.groove-vcard vcg302 application/vnd.handheld-entertainment+xml zmm303 application/vnd.hbci hbci304 application/vnd.hcl-bireports305 application/vnd.hhe.lesson-player les306 application/vnd.hp-hpgl hpgl307 application/vnd.hp-hpid hpid308 application/vnd.hp-hps hps309 application/vnd.hp-jlyt jlt310 application/vnd.hp-pcl pcl311 application/vnd.hp-pclxl pclxl312 application/vnd.httphone313 application/vnd.hydrostatix.sof-data sfd-hdstx314 application/vnd.hzn-3d-crossword x3d315 application/vnd.ibm.afplinedata316 application/vnd.ibm.electronic-media317 application/vnd.ibm.minipay mpy318 application/vnd.ibm.modcap afp listafp list3820319 application/vnd.ibm.rights-management irm320 application/vnd.ibm.secure-container sc321 application/vnd.iccprofile icc icm322 application/vnd.igloader igl323 application/vnd.immervision-ivp ivp324 application/vnd.immervision-ivu ivu325 application/vnd.informedcontrol.rms+xml326 application/vnd.intercon.formnet xpw xpx327 application/vnd.intertrust.digibox328 application/vnd.intertrust.nncp329 application/vnd.intu.qbo qbo330 application/vnd.intu.qfx qfx331 application/vnd.iptc.g2.conceptitem+xml332 application/vnd.iptc.g2.knowledgeitem+xml333 application/vnd.iptc.g2.newsitem+xml334 application/vnd.iptc.g2.packageitem+xml335 application/vnd.ipunplugged.rcprofile rcprofile336 application/vnd.irepository.package+xml irp337 application/vnd.is-xpr xpr338 application/vnd.jam jam339 application/vnd.japannet-directory-service340 application/vnd.japannet-jpnstore-wakeup341 application/vnd.japannet-payment-wakeup342 application/vnd.japannet-registration343 application/vnd.japannet-registration-wakeup344 application/vnd.japannet-setstore-wakeup345 application/vnd.japannet-verification346 application/vnd.japannet-verification-wakeup347 application/vnd.jcp.javame.midlet-rms rms348 application/vnd.jisp jisp349 application/vnd.joost.joda-archive joda350 application/vnd.kahootz ktz ktr351 application/vnd.kde.karbon karbon352 application/vnd.kde.kchart chrt353 application/vnd.kde.kformula kfo354 application/vnd.kde.kivio flw355 application/vnd.kde.kontour kon356 application/vnd.kde.kpresenter kpr kpt357 application/vnd.kde.kspread ksp358 application/vnd.kde.kword kwd kwt359 application/vnd.kenameaapp htke360 application/vnd.kidspiration kia361 application/vnd.kinar kne knp362 application/vnd.koan skp skd skt skm363 application/vnd.kodak-descriptor sse364 application/vnd.liberty-request+xml365 application/vnd.llamagraphics.life-balance.desktop lbd366 application/vnd.llamagraphics.life-balance.exchange+xml lbe367 application/vnd.lotus-1-2-3 123 368 application/vnd.lotus-approach apr369 application/vnd.lotus-freelance pre370 application/vnd.lotus-notes nsf371 application/vnd.lotus-organizer org372 application/vnd.lotus-screencam scm373 application/vnd.lotus-wordpro lwp374 application/vnd.macports.portpkg portpkg375 application/vnd.marlin.drm.actiontoken+xml376 application/vnd.marlin.drm.conftoken+xml377 application/vnd.marlin.drm.license+xml378 application/vnd.marlin.drm.mdcf379 application/vnd.mcd mcd380 application/vnd.medcalcdata mc1381 application/vnd.mediastation.cdkey cdkey382 application/vnd.meridian-slingshot383 application/vnd.mfer mwf384 application/vnd.mfmp mfm385 application/vnd.micrografx.flo flo386 application/vnd.micrografx.igx igx387 application/vnd.mif mif388 application/vnd.minisoft-hp3000-save389 application/vnd.mitsubishi.misty-guard.trustweb390 application/vnd.mobius.daf daf391 application/vnd.mobius.dis dis392 application/vnd.mobius.mbk mbk393 application/vnd.mobius.mqy mqy394 application/vnd.mobius.msl msl395 application/vnd.mobius.plc plc396 application/vnd.mobius.txf txf397 application/vnd.mophun.application mpn398 application/vnd.mophun.certificate mpc399 application/vnd.motorola.flexsuite400 application/vnd.motorola.flexsuite.adsi401 application/vnd.motorola.flexsuite.fis402 application/vnd.motorola.flexsuite.gotap403 application/vnd.motorola.flexsuite.kmr404 application/vnd.motorola.flexsuite.ttc405 application/vnd.motorola.flexsuite.wem406 application/vnd.motorola.iprm407 application/vnd.mozilla.xul+xml xul408 application/vnd.ms-artgalry cil409 application/vnd.ms-asf asf410 application/vnd.ms-cab-compressed cab411 application/vnd.ms-excel xls xlm xla xlc xlt xlw412 application/vnd.ms-fontobject eot413 application/vnd.ms-htmlhelp chm414 application/vnd.ms-ims ims415 application/vnd.ms-lrm lrm416 application/vnd.ms-playready.initiator+xml417 application/vnd.ms-powerpoint ppt pps pot418 application/vnd.ms-project mpp mpt419 application/vnd.ms-tnef420 application/vnd.ms-wmdrm.lic-chlg-req421 application/vnd.ms-wmdrm.lic-resp422 application/vnd.ms-wmdrm.meter-chlg-req423 application/vnd.ms-wmdrm.meter-resp424 application/vnd.ms-works wps wks wcm wdb425 application/vnd.ms-wpl wpl426 application/vnd.ms-xpsdocument xps427 application/vnd.mseq mseq428 application/vnd.msign429 application/vnd.multiad.creator430 application/vnd.multiad.creator.cif431 application/vnd.music-niff432 application/vnd.musician mus433 application/vnd.muvee.style msty434 application/vnd.ncd.control435 application/vnd.ncd.reference436 application/vnd.nervana437 application/vnd.netfpx438 application/vnd.neurolanguage.nlu nlu439 application/vnd.noblenet-directory nnd440 application/vnd.noblenet-sealer nns441 application/vnd.noblenet-web nnw442 application/vnd.nokia.catalogs443 application/vnd.nokia.conml+wbxml444 application/vnd.nokia.conml+xml445 application/vnd.nokia.isds-radio-presets446 application/vnd.nokia.iptv.config+xml447 application/vnd.nokia.landmark+wbxml448 application/vnd.nokia.landmark+xml449 application/vnd.nokia.landmarkcollection+xml450 application/vnd.nokia.n-gage.ac+xml451 application/vnd.nokia.n-gage.data ngdat452 application/vnd.nokia.n-gage.symbian.install n-gage453 application/vnd.nokia.ncd454 application/vnd.nokia.pcd+wbxml455 application/vnd.nokia.pcd+xml456 application/vnd.nokia.radio-preset rpst457 application/vnd.nokia.radio-presets rpss458 application/vnd.novadigm.edm edm459 application/vnd.novadigm.edx edx460 application/vnd.novadigm.ext ext461 application/vnd.oasis.opendocument.chart odc462 application/vnd.oasis.opendocument.chart-template otc463 application/vnd.oasis.opendocument.formula odf464 application/vnd.oasis.opendocument.formula-template otf465 application/vnd.oasis.opendocument.graphics odg466 application/vnd.oasis.opendocument.graphics-template otg467 application/vnd.oasis.opendocument.image odi468 application/vnd.oasis.opendocument.image-template oti469 application/vnd.oasis.opendocument.presentation odp470 application/vnd.oasis.opendocument.presentation-template otp471 application/vnd.oasis.opendocument.spreadsheet ods472 application/vnd.oasis.opendocument.spreadsheet-template ots473 application/vnd.oasis.opendocument.text odt474 application/vnd.oasis.opendocument.text-master otm475 application/vnd.oasis.opendocument.text-template ott476 application/vnd.oasis.opendocument.text-web oth477 application/vnd.obn478 application/vnd.olpc-sugar xo479 application/vnd.oma-scws-config480 application/vnd.oma-scws-http-request481 application/vnd.oma-scws-http-response482 application/vnd.oma.bcast.associated-procedure-parameter+xml483 application/vnd.oma.bcast.drm-trigger+xml484 application/vnd.oma.bcast.imd+xml485 application/vnd.oma.bcast.ltkm486 application/vnd.oma.bcast.notification+xml487 application/vnd.oma.bcast.provisioningtrigger488 application/vnd.oma.bcast.sgboot489 application/vnd.oma.bcast.sgdd+xml490 application/vnd.oma.bcast.sgdu491 application/vnd.oma.bcast.simple-symbol-container492 application/vnd.oma.bcast.smartcard-trigger+xml493 application/vnd.oma.bcast.sprov+xml494 application/vnd.oma.bcast.stkm495 application/vnd.oma.dcd496 application/vnd.oma.dcdc497 application/vnd.oma.dd2+xml dd2498 application/vnd.oma.drm.risd+xml499 application/vnd.oma.group-usage-list+xml500 application/vnd.oma.poc.detailed-progress-report+xml501 application/vnd.oma.poc.final-report+xml502 application/vnd.oma.poc.groups+xml503 application/vnd.oma.poc.invocation-descriptor+xml504 application/vnd.oma.poc.optimized-progress-report+xml505 application/vnd.oma.xcap-directory+xml506 application/vnd.omads-email+xml507 application/vnd.omads-file+xml508 application/vnd.omads-folder+xml509 application/vnd.omaloc-supl-init510 application/vnd.openofficeorg.extension oxt511 application/vnd.osa.netdeploy512 application/vnd.osgi.dp dp513 application/vnd.otps.ct-kip+xml514 application/vnd.palm prc pdb pqa oprc515 application/vnd.paos.xml516 application/vnd.pg.format str517 application/vnd.pg.osasli ei6518 application/vnd.piaccess.application-licence519 application/vnd.picsel efif520 application/vnd.poc.group-advertisement+xml521 application/vnd.pocketlearn plf522 application/vnd.powerbuilder6 pbd523 application/vnd.powerbuilder6-s524 application/vnd.powerbuilder7525 application/vnd.powerbuilder7-s526 application/vnd.powerbuilder75527 application/vnd.powerbuilder75-s528 application/vnd.preminet529 application/vnd.previewsystems.box box530 application/vnd.proteus.magazine mgz531 application/vnd.publishare-delta-tree qps532 application/vnd.pvi.ptid1 ptid533 application/vnd.pwg-multiplexed534 application/vnd.pwg-xhtml-print+xml535 application/vnd.qualcomm.brew-app-res536 application/vnd.quark.quarkxpress qxd qxt qwd qwt qxl qxb537 application/vnd.rapid538 application/vnd.recordare.musicxml mxl539 application/vnd.recordare.musicxml+xml540 application/vnd.renlearn.rlprint541 application/vnd.rn-realmedia rm542 application/vnd.route66.link66+xml link66543 application/vnd.ruckus.download544 application/vnd.s3sms545 application/vnd.sbm.mid2546 application/vnd.scribus547 application/vnd.sealed.3df548 application/vnd.sealed.csf549 application/vnd.sealed.doc550 application/vnd.sealed.eml551 application/vnd.sealed.mht552 application/vnd.sealed.net553 application/vnd.sealed.ppt554 application/vnd.sealed.tiff555 application/vnd.sealed.xls556 application/vnd.sealedmedia.softseal.html557 application/vnd.sealedmedia.softseal.pdf558 application/vnd.seemail see559 application/vnd.sema sema560 application/vnd.semd semd561 application/vnd.semf semf562 application/vnd.shana.informed.formdata ifm563 application/vnd.shana.informed.formtemplate itp564 application/vnd.shana.informed.interchange iif565 application/vnd.shana.informed.package ipk566 application/vnd.simtech-mindmapper twd twds567 application/vnd.smaf mmf568 application/vnd.software602.filler.form+xml569 application/vnd.software602.filler.form-xml-zip570 application/vnd.solent.sdkm+xml sdkm sdkd571 application/vnd.spotfire.dxp dxp572 application/vnd.spotfire.sfs sfs573 application/vnd.sss-cod574 application/vnd.sss-dtf575 application/vnd.sss-ntf576 application/vnd.street-stream577 application/vnd.sun.wadl+xml578 application/vnd.sus-calendar sus susp579 application/vnd.svd svd580 application/vnd.swiftview-ics581 application/vnd.syncml+xml xsm582 application/vnd.syncml.dm+wbxml bdm583 application/vnd.syncml.dm+xml xdm584 application/vnd.syncml.ds.notification585 application/vnd.tao.intent-module-archive tao586 application/vnd.tmobile-livetv tmo587 application/vnd.trid.tpt tpt588 application/vnd.triscape.mxs mxs589 application/vnd.trueapp tra590 application/vnd.truedoc591 application/vnd.ufdl ufd ufdl592 application/vnd.uiq.theme utz593 application/vnd.umajin umj594 application/vnd.unity unityweb595 application/vnd.uoml+xml uoml596 application/vnd.uplanet.alert597 application/vnd.uplanet.alert-wbxml598 application/vnd.uplanet.bearer-choice599 application/vnd.uplanet.bearer-choice-wbxml600 application/vnd.uplanet.cacheop601 application/vnd.uplanet.cacheop-wbxml602 application/vnd.uplanet.channel603 application/vnd.uplanet.channel-wbxml604 application/vnd.uplanet.list605 application/vnd.uplanet.list-wbxml606 application/vnd.uplanet.listcmd607 application/vnd.uplanet.listcmd-wbxml608 application/vnd.uplanet.signal609 application/vnd.vcx vcx610 application/vnd.vd-study611 application/vnd.vectorworks612 application/vnd.vidsoft.vidconference613 application/vnd.visio vsd vst vss vsw614 application/vnd.visionary vis615 application/vnd.vividence.scriptfile616 application/vnd.vsf vsf617 application/vnd.wap.sic618 application/vnd.wap.slc619 application/vnd.wap.wbxml wbxml620 application/vnd.wap.wmlc wmlc621 application/vnd.wap.wmlscriptc wmlsc622 application/vnd.webturbo wtb623 application/vnd.wfa.wsc624 application/vnd.wmc625 application/vnd.wmf.bootstrap626 application/vnd.wordperfect wpd627 application/vnd.wqd wqd628 application/vnd.wrq-hp3000-labelled629 application/vnd.wt.stf stf630 application/vnd.wv.csp+wbxml631 application/vnd.wv.csp+xml632 application/vnd.wv.ssp+xml633 application/vnd.xara xar634 application/vnd.xfdl xfdl635 application/vnd.xmi+xml636 application/vnd.xmpie.cpkg637 application/vnd.xmpie.dpkg638 application/vnd.xmpie.plan639 application/vnd.xmpie.ppkg640 application/vnd.xmpie.xlim641 application/vnd.yamaha.hv-dic hvd642 application/vnd.yamaha.hv-script hvs643 application/vnd.yamaha.hv-voice hvp644 application/vnd.yamaha.smaf-audio saf645 application/vnd.yamaha.smaf-phrase spf646 application/vnd.yellowriver-custom-menu cmp647 application/vnd.zzazz.deck+xml zaz648 application/voicexml+xml vxml649 application/watcherinfo+xml650 application/whoispp-query651 application/whoispp-response652 application/winhlp hlp653 application/wita654 application/wordperfect5.1 655 application/wsdl+xml wsdl656 application/wspolicy+xml wspolicy657 application/x-ace-compressed ace658 application/x-bcpio bcpio659 application/x-bittorrent torrent660 application/x-bzip bz661 application/x-bzip2 bz2 boz662 application/x-cdlink vcd663 application/x-chat chat664 application/x-chess-pgn pgn665 application/x-compress666 application/x-cpio cpio667 application/x-csh csh668 application/x-director dcr dir dxr fgd669 application/x-dvi dvi670 application/x-futuresplash spl671 application/x-gtar gtar672 application/x-gzip673 application/x-hdf hdf674 application/x-latex latex675 application/x-ms-wmd wmd676 application/x-ms-wmz wmz677 application/x-msaccess mdb678 application/x-msbinder obd679 application/x-mscardfile crd680 application/x-msclip clp681 application/x-msdownload exe dll com bat msi682 application/x-msmediaview mvb m13 m14683 application/x-msmetafile wmf684 application/x-msmoney mny685 application/x-mspublisher pub686 application/x-msschedule scd687 application/x-msterminal trm688 application/x-mswrite wri689 application/x-netcdf nc cdf690 application/x-pkcs12 p12 pfx691 application/x-pkcs7-certificates p7b spc692 application/x-pkcs7-certreqresp p7r693 application/x-rar-compressed rar694 application/x-sh sh695 application/x-shar shar696 application/x-shockwave-flash swf697 application/x-stuffit sit698 application/x-stuffitx sitx699 application/x-sv4cpio sv4cpio700 application/x-sv4crc sv4crc701 application/x-tar tar702 application/x-tcl tcl703 application/x-tex tex704 application/x-texinfo texinfo texi705 application/x-ustar ustar706 application/x-wais-source src707 application/x-x509-ca-cert der crt708 application/x400-bp709 application/xcap-att+xml710 application/xcap-caps+xml711 application/xcap-el+xml712 application/xcap-error+xml713 application/xcap-ns+xml714 application/xenc+xml xenc715 application/xhtml+xml xhtml xht716 application/xml xml xsl717 application/xml-dtd dtd718 application/xml-external-parsed-entity719 application/xmpp+xml720 application/xop+xml xop721 application/xslt+xml xslt722 application/xspf+xml xspf723 application/xv+xml mxml xhvml xvml xvm724 application/zip zip725 audio/32kadpcm726 audio/3gpp727 audio/3gpp2728 audio/ac3729 audio/amr730 audio/amr-wb731 audio/amr-wb+ 732 audio/asc733 audio/basic au snd734 audio/bv16735 audio/bv32736 audio/clearmode737 audio/cn738 audio/dat12739 audio/dls740 audio/dsr-es201108741 audio/dsr-es202050742 audio/dsr-es202211743 audio/dsr-es202212744 audio/dvi4745 audio/eac3746 audio/evrc747 audio/evrc-qcp748 audio/evrc0749 audio/evrc1750 audio/evrcb751 audio/evrcb0752 audio/evrcb1753 audio/evrcwb754 audio/evrcwb0755 audio/evrcwb1756 audio/g722757 audio/g7221758 audio/g723759 audio/g726-16 760 audio/g726-24 761 audio/g726-32 762 audio/g726-40 763 audio/g728764 audio/g729765 audio/g7291766 audio/g729d767 audio/g729e768 audio/gsm769 audio/gsm-efr770 audio/ilbc771 audio/l16772 audio/l20773 audio/l24774 audio/l8775 audio/lpc776 audio/midi mid midi kar rmi777 audio/mobile-xmf778 audio/mp4 mp4a779 audio/mp4a-latm780 audio/mpa781 audio/mpa-robust782 audio/mpeg mpga mp2 mp2a mp3 m2a m3a783 audio/mpeg4-generic784 audio/ogg oga ogg spx785 audio/parityfec786 audio/pcma787 audio/pcmu788 audio/prs.sid789 audio/qcelp790 audio/red791 audio/rtp-enc-aescm128792 audio/rtp-midi793 audio/rtx794 audio/smv795 audio/smv0796 audio/smv-qcp797 audio/sp-midi798 audio/t140c799 audio/t38800 audio/telephone-event 801 audio/tone802 audio/ulpfec803 audio/vdvi804 audio/vmr-wb805 audio/vnd.3gpp.iufp806 audio/vnd.4sb807 audio/vnd.audiokoz808 audio/vnd.celp809 audio/vnd.cisco.nse810 audio/vnd.cmles.radio-events811 audio/vnd.cns.anp1812 audio/vnd.cns.inf1813 audio/vnd.digital-winds eol814 audio/vnd.dlna.adts815 audio/vnd.dolby.mlp816 audio/vnd.dts dts817 audio/vnd.dts.hd dtshd818 audio/vnd.everad.plj819 audio/vnd.hns.audio820 audio/vnd.lucent.voice lvp821 audio/vnd.ms-playready.media.pya pya822 audio/vnd.nokia.mobile-xmf823 audio/vnd.nortel.vbk824 audio/vnd.nuera.ecelp4800 ecelp4800825 audio/vnd.nuera.ecelp7470 ecelp7470826 audio/vnd.nuera.ecelp9600 ecelp9600827 audio/vnd.octel.sbc828 audio/vnd.qcelp829 audio/vnd.rhetorex.32kadpcm830 audio/vnd.sealedmedia.softseal.mpeg831 audio/vnd.vmx.cvsd832 audio/vorbis833 audio/vorbis-config834 audio/wav wav835 audio/x-aiff aif aiff aifc836 audio/x-mpegurl m3u837 audio/x-ms-wax wax838 audio/x-ms-wma wma839 audio/x-pn-realaudio ram ra840 audio/x-pn-realaudio-plugin rmp841 audio/x-wav wav842 chemical/x-cdx cdx843 chemical/x-cif cif844 chemical/x-cmdf cmdf845 chemical/x-cml cml846 chemical/x-csml csml847 chemical/x-pdb pdb848 chemical/x-xyz xyz849 image/bmp bmp850 image/cgm cgm851 image/fits852 image/g3fax g3853 image/gif gif854 image/ief ief855 image/jp2856 image/jpeg jpeg jpg jpe857 image/jpm858 image/jpx859 image/naplps860 image/png png861 image/prs.btif btif862 image/prs.pti863 image/svg+xml svg svgz864 image/t38865 image/tiff tiff tif866 image/tiff-fx867 image/vnd.adobe.photoshop psd868 image/vnd.cns.inf2869 image/vnd.djvu djvu djv870 image/vnd.dwg dwg871 image/vnd.dxf dxf872 image/vnd.fastbidsheet fbs873 image/vnd.fpx fpx874 image/vnd.fst fst875 image/vnd.fujixerox.edmics-mmr mmr876 image/vnd.fujixerox.edmics-rlc rlc877 image/vnd.globalgraphics.pgb878 image/vnd.microsoft.icon879 image/vnd.mix880 image/vnd.ms-modi mdi881 image/vnd.net-fpx npx882 image/vnd.sealed.png883 image/vnd.sealedmedia.softseal.gif884 image/vnd.sealedmedia.softseal.jpg885 image/vnd.svf886 image/vnd.wap.wbmp wbmp887 image/vnd.xiff xif888 image/x-cmu-raster ras889 image/x-cmx cmx890 image/x-icon ico891 image/x-pcx pcx892 image/x-pict pic pct893 image/x-portable-anymap pnm894 image/x-portable-bitmap pbm895 image/x-portable-graymap pgm896 image/x-portable-pixmap ppm897 image/x-rgb rgb898 image/x-xbitmap xbm899 image/x-xpixmap xpm900 image/x-xwindowdump xwd901 message/cpim902 message/delivery-status903 message/disposition-notification904 message/external-body905 message/global 906 message/global-delivery-status907 message/global-disposition-notification908 message/global-headers909 message/http910 message/news911 message/partial 912 message/rfc822 eml mime913 message/s-http914 message/sip915 message/sipfrag916 message/tracking-status917 message/vnd.si.simp918 model/iges igs iges919 model/mesh msh mesh silo920 model/vnd.dwf dwf921 model/vnd.flatland.3dml922 model/vnd.gdl gdl923 model/vnd.gs.gdl924 model/vnd.gtw gtw925 model/vnd.moml+xml926 model/vnd.mts mts927 model/vnd.parasolid.transmit.binary928 model/vnd.parasolid.transmit.text929 model/vnd.vtu vtu930 model/vrml wrl vrml931 multipart/alternative932 multipart/appledouble933 multipart/byteranges934 multipart/digest935 multipart/encrypted936 multipart/form-data937 multipart/header-set 938 multipart/mixed939 multipart/parallel940 multipart/related941 multipart/report942 multipart/signed943 multipart/voice-message944 text/calendar ics ifb945 text/css css946 text/csv csv947 text/directory948 text/dns949 text/enriched950 text/html html htm951 text/parityfec952 text/plain txt text conf def list log in 953 text/prs.fallenstein.rst954 text/prs.lines.tag dsc955 text/red956 text/rfc822-headers957 text/richtext rtx958 text/rtf959 text/rtp-enc-aescm128960 text/rtx961 text/sgml sgml sgm962 text/t140963 text/tab-separated-values tsv964 text/troff t tr roff man me ms965 text/ulpfec966 text/uri-list uri uris urls967 text/vnd.abc968 text/vnd.curl969 text/vnd.dmclientscript970 text/vnd.esmertec.theme-descriptor971 text/vnd.fly fly972 text/vnd.fmi.flexstor flx973 text/vnd.graphviz gv974 text/vnd.in3d.3dml 3dml975 text/vnd.in3d.spot spot976 text/vnd.iptc.newsml977 text/vnd.iptc.nitf978 text/vnd.latex-z979 text/vnd.motorola.reflex980 text/vnd.ms-mediapackage981 text/vnd.net2phone.commcenter.command982 text/vnd.si.uricatalogue983 text/vnd.sun.j2me.app-descriptor jad984 text/vnd.trolltech.linguist985 text/vnd.wap.si986 text/vnd.wap.sl987 text/vnd.wap.wml wml988 text/vnd.wap.wmlscript wmls989 text/x-asm s asm990 text/x-c c cc cxx cpp h hh dic991 text/x-fortran f forf77 f90992 text/x-pascal p pas993 text/x-java-source java994 text/x-setext etx995 text/x-uuencode uu996 text/x-vcalendar vcs997 text/x-vcard vcf998 text/xml999 text/xml-external-parsed-entity1000 video/3gpp 3gp1001 video/3gpp-tt1002 video/3gpp2 3g21003 video/bmpeg1004 video/bt6561005 video/celb1006 video/dv1007 video/h261 h2611008 video/h263 h2631009 video/h263-1998 1010 video/h263-2000 1011 video/h264 h2641012 video/jpeg jpgv1013 video/jpeg20001014 video/jpm jpm jpgm1015 video/mj2 mj2 mjp21016 video/mp1s1017 video/mp2p1018 video/mp2t1019 video/mp4 mp4 mp4v mpg41020 video/mp4v-es1021 video/mpeg mpeg mpg mpe m1v m2v1022 video/mpeg4-generic1023 video/mpv1024 video/nv1025 video/ogg ogv1026 video/parityfec1027 video/pointer1028 video/quicktime qt mov1029 video/raw1030 video/rtp-enc-aescm1281031 video/rtx1032 video/smpte292m1033 video/ulpfec1034 video/vc11035 video/vnd.cctv1036 video/vnd.dlna.mpeg-tts1037 video/vnd.fvt fvt1038 video/vnd.hns.video1039 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.ttsavc1044 video/vnd.iptvforum.ttsmpeg21045 video/vnd.motorola.video1046 video/vnd.motorola.videop1047 video/vnd.mpegurl mxu m4u1048 video/vnd.ms-playready.media.pyv pyv1049 video/vnd.nokia.interleaved-multimedia1050 video/vnd.nokia.videovoip1051 video/vnd.objectvideo1052 video/vnd.sealed.mpeg11053 video/vnd.sealed.mpeg41054 video/vnd.sealed.swf1055 video/vnd.sealedmedia.softseal.mov1056 video/vnd.vivo viv1057 video/x-fli fli1058 video/x-ms-asf asf asx1059 video/x-ms-wm wm1060 video/x-ms-wmv wmv1061 video/x-ms-wmx wmx1062 video/x-ms-wvx wvx1063 video/x-msvideo avi1064 video/x-sgi-movie movie1065 x-conference/x-cooltalk ice
mime.types
1 # 这个配置文件是否无效,false表示有效2 # is thisconfig file disabled3 # false forenabled4 # true fordisabled5 disabled=false 6 7 # 指定 此 storage server 所在组(卷)8 # the name of the group thisstorage server belongs to9 group_name=group110 11 # 是否绑定IP12 # bind_addr=后面为绑定的IP地址 (常用于服务器有多个IP但只希望一个IP提供服务)。如果不填则表示所有的(一般不填就OK)13 # bind an address of thishost14 # empty for bind all addresses of thishost15 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 thishost when connect to other servers20 # (this storage server asa client)21 # true for binding the address configed by above parameter: "bind_addr" 22 # false for binding any address of thishost23 client_bind=true 24 25 # storage server服务端口26 # the storage server port27 port=23000 28 29 # 连接超时时间,针对socket套接字函数connect30 # connect timeout inseconds31 # default value is30s32 connect_timeout=30 33 34 # storage server 网络超时时间,单位为秒。发送或接收数据时,如果在超时时间后还不能发送或接收数据,则本次网络通信失败。35 # network timeout inseconds36 # default value is30s37 network_timeout=60 38 39 # 心跳间隔时间,单位为秒 (这里是指主动向tracker server 发送心跳)40 # heart beat interval inseconds41 heart_beat_interval=30 42 43 # storage server向tracker server报告磁盘剩余空间的时间间隔,单位为秒44 # disk usage report interval inseconds45 stat_report_interval=60 46 47 # base_path 目录地址,根目录必须存在 子目录会自动生成 (注 :这里不是上传的文件存放的地址,之前是的,在某个版本后更改了)48 # the basepath to store data and log files49 base_path=/home/yuqing/fastdfs50 51 # 系统提供服务时的最大连接数52 # max concurrent connections the server supported53 # default value is 256 54 # more max_connections means more memory will be used55 max_connections=256 56 57 # V2.0引入本参数。设置队列结点的buffer大小。工作队列消耗的内存大小 = buff_size *max_connections58 # 设置得大一些,系统整体性能会有所提升。59 # 消耗的内存请不要超过系统物理内存大小。另外,对于32位系统,请注意使用到的内存不要超过3GB60 # the buff size to recv /send data61 # thisparameter must more than 8KB62 # default value is64KB63 # since V2.00 64 buff_size =256KB65 66 # 工作线程的数量,工作线程用于处理网络IO,应当小于max_connections的值67 # work thread count, should <=max_connections68 # work thread deal network io69 # default value is 4 70 # since V2.00 71 work_threads=4 72 73 # V2.0引入本参数。磁盘IO读写是否分离,缺省是分离的74 # if disk read /write separated75 ## false formixed read and write76 ## true forseparated read and write77 # default value is true 78 # since V2.00 79 disk_rw_separated = true 80 81 # V2.0引入本参数。针对单个存储路径的读线程数,缺省值为1。82 # 读写分离时,系统中的读线程数 = disk_reader_threads *store_path_count83 # 读写混合时,系统中的读写线程数 = (disk_reader_threads + disk_writer_threads) *store_path_count84 # disk reader thread count per store basepath85 # 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_count92 # 读写混合时,系统中的读写线程数 = (disk_reader_threads + disk_writer_threads) *store_path_count93 # disk writer thread count per store basepath94 # 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。如何希望同步尽可能快一些,可以将本参数设置得小一些,比如设置为10ms101 # when no entry to sync, tryread binlog again after X milliseconds102 # must > 0, default value is200ms103 sync_wait_msec=50 104 105 # 同步上一个文件后,再同步下一个文件的时间间隔,单位为毫秒,0表示不休眠,直接同步下一个文件。106 # after sync a file, usleep milliseconds107 # 0 forsync successively (never call usleep)108 sync_interval=0 109 110 # 下面二个一起解释。允许系统同步的时间段 (默认是全天) 。一般用于避免高峰同步产生一些问题而设定,相信sa都会明白111 # storage sync start time of a day, time format: Hour:Minute112 # 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:Minute116 # 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 files122 # 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 exist133 store_path0=/home/yuqing/fastdfs134 #store_path1=/home/yuqing/fastdfs2135 136 # FastDFS存储文件时,采用了两级目录。这里配置存放文件的目录个数 (系统的存储机制,大家看看文件存储的目录就知道了)137 # 如果本参数只为N(如:256),那么storage server在初次运行时,会自动创建 N *N 个存放文件的子目录。138 # subdir_count *subdir_count directories will be auto created under each139 # 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 address146 tracker_server=192.168.209.121:22122 147 148 # 日志级别149 #standard log level as syslog, caseinsensitive, value list:150 ### emerg foremergency151 ### alert152 ### crit forcritical153 ### error154 ### warn forwarning155 ### notice156 ### info157 ### debug158 log_level=info159 160 # 操作系统运行FastDFS的用户组 (不填 就是当前用户组,哪个启动进程就是哪个)161 #unix group name to run thisprogram,162 #not set(empty) means run by the group of current user163 run_by_group= 164 165 # 操作系统运行FastDFS的用户 (不填 就是当前用户,哪个启动进程就是哪个)166 #unix username to run thisprogram,167 #not set(empty) means run by current user168 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] or174 # host[01-08,20-25].domain.com, forexample:175 # allow_hosts=10.0.1.[1-15,20]176 # allow_hosts=host[01-08,20-25].domain.com177 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 path183 # 0: round robin(default)184 # 1: random, distributted by hash code185 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 thisnumber, then rotate to next path191 # default value is 100 192 file_distribute_rotate_count=100 193 194 # 当写入大文件时,每写入N个字节,调用一次系统函数fsync将内容强行同步到硬盘。0表示从不调用fsync195 # call fsync to disk when write big file196 # 0: never call fsync197 # other: call fsync when written bytes >= thisbytes198 # 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 seconds204 # must > 0, default value is 10seconds205 sync_log_buff_interval=10 206 207 # 同步binglog(更新操作日志)到硬盘的时间间隔,单位为秒208 # 本参数会影响新上传文件同步延迟时间209 # sync binlog buff /cache to disk every interval seconds210 # default value is 60seconds211 sync_binlog_buff_interval=10 212 213 # 把storage的stat文件同步到磁盘的时间间隔,单位为秒。214 # 注:如果stat文件内容没有变化,不会进行同步215 # sync storage stat info to disk every interval seconds216 # default value is 300seconds217 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 >=512KB224 # default value is512KB225 thread_stack_size=512KB226 227 # 本storage server作为源服务器,上传文件的优先级,可以为负数。值越小,优先级越高。这里就和 tracker.conf 中store_server=2时的配置相对应了228 # the priority as a source server foruploading file.229 # the lower thisvalue, 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 -a236 # multi aliases split by comma. empty value means auto setby OS type237 # default values isempty238 if_alias_prefix= 239 240 # 是否检测上传文件已经存在。如果已经存在,则不存在文件内容,建立一个符号链接以节省磁盘空间。241 # 这个应用要配合FastDHT 使用,所以打开前要先安装FastDHT242 # 1或yes 是检测,0或no 是不检测243 # if check file duplicate, when set to true, use FastDHT to store file indexes244 # 1or yes: need check245 # 0 or no: donot check246 # default value is 0 247 check_file_duplicate=0 248 249 # 文件去重时,文件内容的签名方式:250 # hash: 4个hash code251 # md5:MD5252 # file signature method forcheck file duplicate253 ## hash: four 32bits hash code254 ## md5: MD5 signature255 # default value ishash256 # since V4.01 257 file_signature_method=hash258 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 /on262 key_namespace=FastDFS263 264 # 与FastDHT servers 的连接方式 (是否为持久连接) ,默认是0(短连接方式)。可以考虑使用长连接,这要看FastDHT server的连接数是否够用。265 # set keep_alive to 1to enable persistent connection with FastDHT servers266 # default value is 0 (shortconnection)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 doublequotes) directive to274 # 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/thisconfig file.276 # must set FastDHT server list when check_file_duplicate is true /on277 # please see INSTALL of FastDHT fordetail278 ##include /home/yuqing/fastdht/conf/fdht_servers.conf279 280 # 是否将文件操作记录到access log281 # iflog to access log282 # default value is false 283 # since V4.00 284 use_access_log = false 285 286 # 是否定期轮转access log,目前仅支持一天轮转一次287 # ifrotate the access log every day288 # 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:Minute294 # 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 # ifrotate the error log every day301 # 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:Minute307 # 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 thissize315 # 0means never rotates log file by log file size316 # 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 thissize323 # 0means never rotates log file by log file size324 # default value is 0 325 # since V4.02 326 rotate_error_log_size = 0 327 328 # 文件同步的时候,是否忽略无效的binlog记录329 # ifskip the invalid record when sync file330 # default value is false 331 # since V4.02 332 file_sync_skip_invalid_record=false 333 334 # 是否使用连接池335 # ifuse connection pool336 # default value is false 337 # since V4.05 338 use_connection_pool = false 339 340 # 如果一个连接的空闲时间超过这个值将会被自动关闭341 # connections whose the idle time exceeds thistime will be closed342 # unit: second343 # 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 isempty,350 # else this domain name will ocur inthe url redirected by the tracker server351 http.domain_name= 352 353 # web server的端口354 # the port of the web server on thisstorage server355 http.server_port=8888
storage.conf配置文件详解
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
storage_ids.conf
1 # 这个配置文件是否无效,false表示有效2 # is thisconfig file disabled3 # false forenabled4 # true fordisabled5 disabled=false 6 7 # 是否绑定IP8 # bind_addr=后面为绑定的IP地址 (常用于服务器有多个IP但只希望一个IP提供服务)。如果不填则表示所有的(一般不填就OK)9 # bind an address of thishost10 # empty for bind all addresses of thishost11 bind_addr= 12 13 # 提供服务的端口14 # the tracker server port15 port=22122 16 17 # 连接超时时间,针对socket套接字函数connect18 # connect timeout inseconds19 # default value is30s20 connect_timeout=30 21 22 # tracker server的网络超时,单位为秒。发送或接收数据时,如果在超时时间后还不能发送或接收数据,则本次网络通信失败23 # network timeout inseconds24 # default value is30s25 network_timeout=60 26 27 # the basepath to store data and log files28 base_path=/home/yuqing/fastdfs29 30 # base_path 目录地址(根目录必须存在,子目录会自动创建)31 # 附目录说明:32 # tracker server目录及文件结构:33 # ${base_path}34 # |__data35 # | |__storage_groups.dat:存储分组信息36 # | |__storage_servers.dat:存储服务器列表37 # |__logs38 # |__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 thisserver supported67 max_connections=256 68 69 # work thread count, should <=max_connections70 # 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 files78 # 0: round robin79 # 1: specify group80 # 2: load balance, selectthe max free space group to upload file81 store_lookup=2 82 83 # 当上一个参数设定为1 时 (store_lookup=1,即指定组名时),必须设置本参数为系统中存在的一个组名。如果选择其他的上传方式,这个参数就没有效了84 # which group to upload file85 # when store_lookup set to 1, must setstore_group to the group name86 store_group=group287 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 file93 # 0: round robin (default)94 # 1: the first server order by ip address95 # 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 file102 # 0: round robin103 # 2: load balance, selectthe max free space path to upload file104 store_path=0 105 106 # 选择哪个 storage server 作为下载服务器107 # 0: 轮询方式,可以下载当前文件的任一storage server108 # 1: 哪个为源storage server 就用哪一个 (前面说过了这个storage server源 是怎样产生的) 就是之前上传到哪个storage server服务器就是哪个了109 # which storage server to download file110 # 0: round robin (default)111 # 1: the source storage server which the current file uploaded to112 download_server=0 113 114 # storage server 上保留的空间,保证系统或其他应用需求空间。可以用绝对值或者百分比(V4开始支持百分比方式)。115 #(指出 如果同组的服务器的硬盘大小一样,以最小的为准,也就是只要同组中有一台服务器达到这个标准了,这个标准就生效,原因就是因为他们进行备份)116 # reserved storage space forsystem 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 thisgroup.120 # bytes unit can be one of follows:121 ### G or g forgigabyte(GB)122 ### M or m formegabyte(MB)123 ### K or k forkilobyte(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, caseinsensitive, value list:130 ### emerg foremergency131 ### alert132 ### crit forcritical133 ### error134 ### warn forwarning135 ### notice136 ### info137 ### debug138 log_level=info139 140 # 操作系统运行FastDFS的用户组 (不填 就是当前用户组,哪个启动进程就是哪个)141 #unix group name to run thisprogram,142 #not set(empty) means run by the group of current user143 run_by_group= 144 145 # 操作系统运行FastDFS的用户 (不填 就是当前用户,哪个启动进程就是哪个)146 #unix username to run thisprogram,147 #not set(empty) means run by current user148 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] or153 # host[01-08,20-25].domain.com, forexample:154 # allow_hosts=10.0.1.[1-15,20]155 # allow_hosts=host[01-08,20-25].domain.com156 allow_hosts=* 157 158 # 同步或刷新日志信息到硬盘的时间间隔,单位为秒159 # 注意:tracker server 的日志不是时时写硬盘的,而是先写内存160 # sync log buff to disk every interval seconds161 # default value is 10seconds162 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 seconds167 check_active_interval = 120 168 169 # 线程栈的大小。FastDFS server端采用了线程方式。tracker server线程栈不应小于64KB170 # 线程栈越大,一个线程占用的系统资源就越多。如果要启动更多的线程(V1.x对应的参数为max_connections,171 V2.0为work_threads),可以适当降低本参数值172 # thread stack size, should >=64KB173 # default value is64KB174 thread_stack_size =64KB175 176 # 这个参数控制当storage server IP地址改变时,集群是否自动调整。注:只有在storage server进程重启时才完成自动调整177 # auto adjust when the ip address of the storage server changed178 # default value is true 179 storage_ip_changed_auto_adjust = true 180 181 # V2.0引入的参数。存储服务器之间同步文件的最大延迟时间,缺省为1天。根据实际情况进行调整182 # 注:本参数并不影响文件同步过程。本参数仅在下载文件时,判断文件是否已经被同步完成的一个阀值(经验值)183 # storage sync file max delay seconds184 # default value is 86400seconds (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 file191 # default value is 300seconds192 # since V2.00 193 storage_sync_file_max_time = 300 194 195 # V3.0引入的参数。是否使用小文件合并存储特性,缺省是关闭的196 # ifuse a trunk file to store several small files197 # 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 <=4KB204 # default value is 256bytes205 # since V3.00 206 slot_min_size = 256 207 208 # V3.0引入的参数。209 # 只有文件大小<=这个参数值的文件,才会合并存储。如果一个文件的大小大于这个参数值,将直接保存到一个文件中(即不采用合并存储方式)。210 # the max slot size, should >slot_min_size211 # store the upload file to trunk file when it's size <= this value 212 # default value is16MB213 # since V3.00 214 slot_max_size =16MB215 216 # V3.0引入的参数。217 # 合并存储的trunk file大小,至少4MB,缺省值是64MB。不建议设置得过大218 # the trunk file size, should >=4MB219 # default value is64MB220 # since V3.00 221 trunk_file_size =64MB222 223 # 是否提前创建trunk file。只有当这个参数为true,下面3个以trunk_create_file_打头的参数才有效224 # ifcreate trunk file advancely225 # default value is false 226 # since V3.06 227 trunk_create_file_advance = false 228 229 # 提前创建trunk file的起始时间点(基准时间),02:00表示第一次创建的时间点是凌晨2点230 # the time baseto create trunk file231 # the time format: HH:MM232 # default value is 02:00 233 # since V3.06 234 trunk_create_file_time_base = 02:00 235 236 # 创建trunk file的时间间隔,单位为秒。如果每天只提前创建一次,则设置为86400237 # the interval of create trunk file, unit: second238 # 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 file245 # when the free trunk file size less than the threshold, will create246 # the trunk files247 # default value is 0 248 # since V3.06 249 trunk_create_file_space_threshold =20G250 251 # trunk初始化时,是否检查可用空间是否被占用252 # ifcheck trunk space occupying when loading trunk free spaces253 # the occupied spaces will be ignored254 # default value is false 255 # since V3.09 256 # NOTICE: set this parameter to truewill slow the loading of trunk spaces257 # when startup. you should set this parameter to truewhen 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 fromtrunk binlog264 # 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 # ifuse storage ID instead of IP address271 # 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.conf277 # specify storage ids filename, can use relative or absolute path278 # since V4.00 279 storage_ids_filename =storage_ids.conf280 281 #文件名中的id类型,有ip和id两种,只有当use_storage_id设置为true时该参数才有效282 # id type of the storage server inthe filename, values are:283 ## ip: the ip address of the storage server284 ## id: the server id of the storage server285 # this paramter is valid only when use_storage_id set to true 286 # default value isip287 # since V4.03 288 id_type_in_filename =ip289 290 # 存储从文件是否采用symbol link(符号链接)方式291 # 如果设置为true,一个从文件将占用两个文件:原始文件及指向它的符号链接292 # ifstore slave file use symbol link293 # default value is false 294 # since V4.01 295 store_slave_file_use_link = false 296 297 # 是否定期轮转error log,目前仅支持一天轮转一次298 # ifrotate the error log every day299 # 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:Minute305 # 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 thissize313 # 0means never rotates log file by log file size314 # default value is 0 315 # since V4.02 316 rotate_error_log_size = 0 317 318 # 是否使用连接池319 # ifuse connection pool320 # default value is false 321 # since V4.05 322 use_connection_pool = false 323 324 # 如果一个连接的空闲时间超过这个值将会被自动关闭325 # connections whose the idle time exceeds thistime will be closed326 # unit: second327 # default value is 3600 328 # since V4.05 329 connection_pool_max_idle_time = 3600 330 331 # 用于提供http服务的端口332 # HTTP port on thistracker server333 http.server_port=8080 334 335 # 检查http server是否还在工作的时间间隔,如果该值小于0则永远不检查336 # check storage HTTP server alive interval seconds337 # <= 0 fornever check338 # default value is 30 339 http.check_alive_interval=30 340 341 # 检查http server是否存活的类型,有tcp和http两种342 # tcp方式只有http端口被连接343 # http方式检查必须返回状态值200344 # check storage HTTP server alive type, values are:345 # tcp : connect to the storge server with HTTP port only,346 # do not request and getresponse347 # http: storage check alive url must return http status 200 348 # default value istcp349 http.check_alive_type=tcp350 351 # check storage HTTP server alive uri/url352 # NOTE: storage embed HTTP server support uri: /status.html353 http.check_alive_uri=/status.html
tracker.conf配完文件详解
1 # 连接超时时间,针对socket套接字函数connect2 # connect timeout inseconds3 # default value is30s4 connect_timeout=30 5 6 # client的网络超时,单位为秒。发送或接收数据时,如果在超时时间后还不能发送或接收数据,则本次网络通信失败7 # network timeout inseconds8 # default value is30s9 network_timeout=60 10 11 # 存储日志的根目录12 # the basepath to store log files13 base_path=/home/yuqing/fastdfs14 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 address18 tracker_server=192.168.0.197:22122 19 20 # 日志的级别21 #standard log level as syslog, caseinsensitive, value list:22 ### emerg foremergency23 ### alert24 ### crit forcritical25 ### error26 ### warn forwarning27 ### notice28 ### info29 ### debug30 log_level=info31 32 # 是否使用连接池33 # ifuse connection pool34 # default value is false 35 # since V4.05 36 use_connection_pool = false 37 38 # 如果一个连接的空闲时间超过这个值将会被自动关闭39 # connections whose the idle time exceeds thistime will be closed40 # unit: second41 # 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 fromtracker server47 # 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 # ifuse storage ID instead of IP address53 # same astracker.conf54 # 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 path61 # same astracker.conf62 # valid only when load_fdfs_parameters_from_tracker is false 63 # since V4.05 64 storage_ids_filename =storage_ids.conf65 66 67 #tracker server的http端口68 #HTTP settings69 http.tracker_server_port=8080 70 71 #use "#include"directive to include HTTP other settiongs72 ##include http.conf
client.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
转载于:https://www.cnblogs.com/liyongsan/p/7071023.html
fastdfs 集群配置相关推荐
- FastDFS 集群配置(转载)
本文转载自::https://blog.csdn.net/xiaoweiqb/article/details/68065618 配置最终目标 以4台服务做集群,其中2台作为tracker服务器又作为s ...
- FastDFS 集群 安装 配置
原文:http://www.cnblogs.com/ityouknow/p/7769142.html 这篇文章介绍如何搭建FastDFS 集群 FastDFS是一个开源的轻量级分布式文件系统,它对文件 ...
- FastDFS集群部署
FastDFS之--集群的安装. 配置. 使用 FastDFS 集群规划: 跟踪服务器 1:192.168.1.121 tracker-1 跟踪服务器 2:192.168.1.122 tracker- ...
- fastdfs 集群 java_FastDFS集群部署(转载 写的比较好)
之前介绍过关于FastDFS单机部署,详见博文:FastDFS+Nginx(单点部署)事例 下面来玩下FastDFS集群部署,实现高可用(HA) 服务器规划: 跟踪服务器1[主机](Tracker S ...
- fastdfs集群搭建2
五.在各个存储节点安装nginx 1.上传 fastdfs-nginx-module_v1.16.tar.gz 到/usr/local/src,解压 2.修改 fastdfs-nginx-module ...
- 搭建fastdfs集群
1,安装libfastcommon github选择需要安装的release版本 https://github.com/happyfish100/libfastcommon/releases 下载安装 ...
- fastdfs原理_搭建分布式文件系统FastDFS集群
本文摘选abcdocker运维博客 abcdocker运维博客 – 专注DevOps自动化运维,传播优秀it运维技术文章i4t.com 在生产环境中往往数据存储量比较大,因此会大部分会选择分布式存储 ...
- FastDFS集群环境搭建
注:生产环境亲身实践,可复用 参考资料:https://blog.csdn.net/weixin_45422648/article/details/120308274 https://blog.csd ...
- Docker集群环境下安装Fastdfs集群+Nginx负载均衡
一.环境配置 现有两台服务器10.168.103.110(旧服务器)和10.168.103.111(新服务器),其中110服务器上有swarm集群,一个tracker和一个storage,现在要做Fa ...
- FastDFS 集群搭建
FastDFS 集群搭建 前言 于前几天搭建了 FastDFS 单机版来使用,而实际应用中,一般使用的都是集群版本的 FastDFS,相比于单机版,大体的搭建差不多,只不过配置文件的内容有所不同. 前 ...
最新文章
- 超全大厂Java面试彩蛋
- OpenGL编程低级错误范例手册
- Python基础小结
- PC软件开发技术之三:C#操作SQLite数据库
- 用canvas实现手写签名功能
- 双路服务器单路运行,架构设计-具体案例求解惑:两个单路服务器比一个双路服务器性能高100%?...
- python学习1(下载、安装)
- 最简单的爬虫代码 python_最精简的爬虫 --仅需4行代码(python)
- GridView上同时定义了 DataSource 和 DataSourceId
- django安装配置及测试
- 2022蓝桥杯冲刺(历年真题剖析,含省赛、国赛)
- H5app 调用手机摄像头拍照、录制视频并上传demo
- 千帆竞发 —— 分布式锁
- 申请苹果开发者帐号傻瓜式教程
- 只有360浏览器能打开别的都打不开
- Ubuntu 开机自动运行命令
- java最早的游戏_回忆S60(塞班)年代的JAVA游戏
- 好看的头像太多了,全部拿住!
- mysql date 24小时制_SpringBoor连接mysql数据库取数据库中时间格式是12小时制的时间,如何显示成24小时制...
- My findings:CoordConv坐标嵌入技术及其泛化性能