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 集群配置_第1张图片

安装文件:

FastDFS 5.x 取消了对 libevent 的依赖,添加了对 libfastcommon 的依赖。
本部署说明用到的软件版本:

libfastcommon v1.13

FastDFS v5.08

fastdfs-nginx-module v1.17

fastdfs安装配置:

创建用户与组

# groupadd fdfs

# useradd fdfs -g fdfs

解压、安装

在每一台trackerstorage服务器上执行

# 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/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
http.conf
   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 //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
mime.types
  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 - 1130 # 如果不配置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
storage.conf配置文件详解
1 #     
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 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
tracker.conf配完文件详解
 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
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 集群配置)