diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..cb6b2f32e352d162c6673414c49c6398e4b8e540 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,50 @@ +# centos 7 +FROM centos:centos7.5.1804 + +# 添加配置文件 +# add profiles +# 复制和FastDFS相关的配置文件 +ADD conf/client.conf /etc/fdfs/ +ADD conf/http.conf /etc/fdfs/ +ADD conf/mime.types /etc/fdfs/ +ADD conf/storage.conf /etc/fdfs/ +ADD conf/tracker.conf /etc/fdfs/ +ADD conf/nginx.conf /etc/fdfs/ +# 复制和nginx相关的配置文件 +ADD fastdfs.sh /home +# 这个配置是FastDFS协同nginx所需要的配置文件 +ADD conf/mod_fastdfs.conf /etc/fdfs + +# 添加源文件 +# add source code +ADD source/libfastcommon.zip /usr/local/src/ +ADD source/fastdfs.zip /usr/local/src/ +ADD source/fastdfs-nginx-module.zip /usr/local/src/ +ADD source/nginx-1.15.4.zip /usr/local/src/ + +# Run +RUN yum install git gcc gcc-c++ make automake autoconf libtool pcre pcre-devel zlib zlib-devel openssl-devel wget vim -y \ + && yum install unzip -y \ + && mkdir /home/dfs \ + && cd /usr/local/src/ \ + && unzip libfastcommon.zip \ + && unzip fastdfs.zip \ + && unzip fastdfs-nginx-module.zip \ + && unzip nginx-1.15.4.zip \ + && cd libfastcommon/ \ + && ./make.sh && ./make.sh install \ + && cd ../ \ + && cd fastdfs/ \ + && ./make.sh && ./make.sh install \ + && cd ../ \ + && cd nginx-1.15.4/ \ + && ./configure --add-module=/usr/local/src/fastdfs-nginx-module/src/ \ + && make && make install \ + && chmod +x /home/fastdfs.sh + + +# export config +VOLUME /etc/fdfs + +EXPOSE 22122 23000 8888 80 +ENTRYPOINT ["/home/fastdfs.sh"] diff --git a/README.en.md b/README.en.md index e0ffa5d44817944f382408ac0547a9f5ef97ed97..68cadb0bd9eaf4c8e8f01f2ee423dd48cbfce921 100644 --- a/README.en.md +++ b/README.en.md @@ -1,37 +1,51 @@ -# FastDFS-Docker +# FastDFS Docker 镜像 -#### Description -FastDFS是一个分布式文件存储系统,它有Tracker和Storage节点构成。其中Tracker和Storage都可以有多个节点。此项目旨在将FastDFS集群打包到docker容器中,以容器的方式快速配置和部署。 +[fast-dfs-docker](https://gitee.com/zgxtech_admin/fast-dfs-docker)项目旨在打包fastdfs,构建通过简单的参数配置即可开箱即用docker容器。 +支持集群化部署。 +## FastDFS介绍 -#### Software Architecture -Software architecture description +FastDFS是一个分布式文件存储系统,它有Tracker和Storage节点构成。其中Tracker和Storage都可以有多个节点。 -#### Installation +- Tracker负责服务集群协调工作 -1. xxxx -2. xxxx -3. xxxx +- Storage负责文件的冗余存储。 -#### Instructions +## Docker 镜像介绍 -1. xxxx -2. xxxx -3. xxxx +FastDFS Docker 镜像基于centos:centos7.5.1804 (其来源于hub.docker.com), 通过调整调整不同的docker run的 -e参数可以启动和构建 Tracker和Storage. -#### Contribution +### 快速开始 +- 作为单体服务运行Tracker和Storage + +``` +$ > docker run -d -e FASTDFS_IPADDR=[Tracker IP Address] -e SERVICE_ROLE=all -p 8888:8888 -p 22122:22122 -p 23000:23000 -p 8011:80 --name --name [服务名称 my-storage-0] [docker镜像名称]:[版本] + +``` + +- 容器作为Tracker Service运行 + +``` + +docker run -d -e FASTDFS_IPADDR=[Tracker IP Address] -e SERVICE_ROLE=tracker -p 8888:8888 -p 22122:22122 -p 8011:80 --name [服务名称 my tracker] [docker镜像名称]:[版本] +``` + +- 容器作为Storage Service运行 + +``` + +docker run -d -e FASTDFS_IPADDR=[Tracker IP Address] -e SERVICE_ROLE=storage -p 8888:8888 -p 23000:23000 -p 8011:80 --name [服务名称 my-storage-0] [docker镜像名称]:[版本] + +``` + +> FASTDFS_IPADDR : Tracker服务的IP +> SERVICE_ROLE : 可选值有 all、tracker、storage。all表示一个docker中承载所有的服务扮演的角色 Tracker 或 Storage + + +#### 贡献 1. Fork the repository 2. Create Feat_xxx branch 3. Commit your code 4. Create Pull Request - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md index e7e1e56b02fc02ee9e5fde636409ffb5ebdc9750..1d76b7f891dd6c647c506be7884bbfaab1387b81 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,112 @@ -# FastDFS-Docker +# FastDFS Docker 镜像 -#### 介绍 -FastDFS是一个分布式文件存储系统,它有Tracker和Storage节点构成。其中Tracker和Storage都可以有多个节点。此项目旨在将FastDFS集群打包到docker容器中,以容器的方式快速配置和部署。 +[fast-dfs-docker](https://gitee.com/zgxtech_admin/fast-dfs-docker)项目旨在打包fastdfs,构建通过简单的参数配置即可开箱即用docker容器。 +支持集群化部署。 +## FastDFS介绍 -#### 软件架构 -软件架构说明 +FastDFS是一个分布式文件存储系统,它有Tracker和Storage节点构成。其中Tracker和Storage都可以有多个节点。 +- Tracker负责服务集群协调工作 -#### 安装教程 +- Storage负责文件的冗余存储。 -1. xxxx -2. xxxx -3. xxxx +## 项目结构 -#### 使用说明 +|-- Fast-dfs-docker -1. xxxx -2. xxxx -3. xxxx +|---- conf -#### 参与贡献 +|------ client.conf -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request +|------ http.conf +|------ mime.types -#### 码云特技 +|------ mod_fastdfs.conf -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 -5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) +|------ nginx.conf + +|------ storage.conf + +|------ tracker.conf + +|---- k8s + +|------ linn-fds-storage-0-svc.yml storage单节点service部署文件 + +|------ linn-fds-storage-0.yml storage单节点Pod部署文件 + +|------ linn-fds-tracker-svc.yml tracker单节点service部署文件 + +|------ linn-fds-tracker.yml tracker单节点Pod部署文件 + +|---- source + +|------ fastdfs-nginx-module.zip fastdfs的nginx扩展包 + +|------ fastdfs.zip fastdfs包 + +|------ libfastcommon.zip FastDFS的C公共函数库 + +|------ nginx-1.15.4.zip nginx包 + +|---- Dockerfile docker打包文件 + +|---- fastdfs.sh fastdfs安装、配置和启动脚本(运行在docker构建镜像中) + +## Docker 构建说明 + +1. [下载代码](hhttps://gitee.com/zgxtech_admin/fast-dfs-docker) +2. 在Dockerfile所在目录运行一下命令 + +``` + +$ docker build -t [image group]/[image name]:[version] . + +``` +> 命令最后有一个' . '是不可缺少。 + +## Docker 镜像介绍 + +FastDFS Docker 镜像基于centos:centos7.5.1804 (其来源于hub.docker.com), 通过调整调整不同的docker run的 -e参数可以启动和构建 Tracker和Storage. + + +### 快速开始 + +- 作为单体服务运行Tracker和Storage + +``` +$ > docker run -d -e FASTDFS_IPADDR=[Tracker IP Address] -e SERVICE_ROLE=all -p 8888:8888 -p 22122:22122 -p 23000:23000 -p 8011:80 --name --name [服务名称 my-storage-0] [docker镜像名称]:[版本] + +``` +> 注意:本地测试不可以使用 `127.0.0.1` or `localhost` + +- 容器作为Tracker Service运行 + +``` + +docker run -d -e FASTDFS_IPADDR=[Tracker IP Address] -e SERVICE_ROLE=tracker -p 8888:8888 -p 22122:22122 -p 8011:80 --name [服务名称 my tracker] [docker镜像名称]:[版本] +``` + +- 容器作为Storage Service运行 + +``` + +docker run -d -e FASTDFS_IPADDR=[Tracker IP Address] -e SERVICE_ROLE=storage -p 8888:8888 -p 23000:23000 -p 8011:80 --name [服务名称 my-storage-0] [docker镜像名称]:[版本] + +``` +### 参数说明 + +> - FASTDFS_IPADDR : Tracker服务的IP +> - SERVICE_ROLE : 可选值有 all、tracker、storage。 +> - all : `一个容器`中承载所有的服务角色 Tracker和Storage 服务同时在一个容器中启动,一个tracker服务,一个storage. +> - tracker : 作为Tracker服务启动容器。 +> - storage : 作为storage服务启动容器。 + +#### 贡献 + +1. Fork the repository +2. Create Feat_xxx branch +3. Commit your code +4. Create Pull Request diff --git a/conf/client.conf b/conf/client.conf new file mode 100644 index 0000000000000000000000000000000000000000..de9295d588c0604226d611c96e5337c5ecb11c3b --- /dev/null +++ b/conf/client.conf @@ -0,0 +1,62 @@ +# connect timeout in seconds +# default value is 30s +connect_timeout=30 + +# network timeout in seconds +# default value is 30s +network_timeout=60 + +# the base path to store log files +base_path=/home/dfs + +# tracker_server can ocur more than once, and tracker_server format is +# "host:port", host can be hostname or ip address +tracker_server=com.ikingtech.ch116221:22122 + +#standard log level as syslog, case insensitive, value list: +### emerg for emergency +### alert +### crit for critical +### error +### warn for warning +### notice +### info +### debug +log_level=info + +# if use connection pool +# default value is false +# since V4.05 +use_connection_pool = false + +# connections whose the idle time exceeds this time will be closed +# unit: second +# default value is 3600 +# since V4.05 +connection_pool_max_idle_time = 3600 + +# if load FastDFS parameters from tracker server +# since V4.05 +# default value is false +load_fdfs_parameters_from_tracker=false + +# if use storage ID instead of IP address +# same as tracker.conf +# valid only when load_fdfs_parameters_from_tracker is false +# default value is false +# since V4.05 +use_storage_id = false + +# specify storage ids filename, can use relative or absolute path +# same as tracker.conf +# valid only when load_fdfs_parameters_from_tracker is false +# since V4.05 +storage_ids_filename = storage_ids.conf + + +#HTTP settings +http.tracker_server_port=80 + +#use "#include" directive to include HTTP other settiongs +##include http.conf + diff --git a/conf/http.conf b/conf/http.conf new file mode 100644 index 0000000000000000000000000000000000000000..4d055f983f8d414bdc04fbf68e63db0556281672 --- /dev/null +++ b/conf/http.conf @@ -0,0 +1,29 @@ +# HTTP default content type +http.default_content_type = application/octet-stream + +# MIME types mapping filename +# MIME types file format: MIME_type extensions +# such as: image/jpeg jpeg jpg jpe +# you can use apache's MIME file: mime.types +http.mime_types_filename=mime.types + +# if use token to anti-steal +# default value is false (0) +http.anti_steal.check_token=false + +# token TTL (time to live), seconds +# default value is 600 +http.anti_steal.token_ttl=900 + +# secret key to generate anti-steal token +# this parameter must be set when http.anti_steal.check_token set to true +# the length of the secret key should not exceed 128 bytes +http.anti_steal.secret_key=FastDFS1234567890 + +# return the content of the file when check token fail +# default value is empty (no file sepecified) +http.anti_steal.token_check_fail=/home/yuqing/fastdfs/conf/anti-steal.jpg + +# if support multi regions for HTTP Range +# default value is true +http.multi_range.enabed = true diff --git a/conf/mime.types b/conf/mime.types new file mode 100644 index 0000000000000000000000000000000000000000..07b4465eff61b268f1d88cfd665f6124a1d1557a --- /dev/null +++ b/conf/mime.types @@ -0,0 +1,1065 @@ +# This is a comment. I love comments. + +# This file controls what Internet media types are sent to the client for +# given file extension(s). Sending the correct media type to the client +# is important so they know how to handle the content of the file. +# Extra types can either be added here or by using an AddType directive +# in your config files. For more information about Internet media types, +# please read RFC 2045, 2046, 2047, 2048, and 2077. The Internet media type +# registry is at . + +# MIME type Extensions +application/activemessage +application/andrew-inset ez +application/applefile +application/atom+xml atom +application/atomcat+xml atomcat +application/atomicmail +application/atomsvc+xml atomsvc +application/auth-policy+xml +application/batch-smtp +application/beep+xml +application/cals-1840 +application/ccxml+xml ccxml +application/cellml+xml +application/cnrp+xml +application/commonground +application/conference-info+xml +application/cpl+xml +application/csta+xml +application/cstadata+xml +application/cybercash +application/davmount+xml davmount +application/dca-rft +application/dec-dx +application/dialog-info+xml +application/dicom +application/dns +application/dvcs +application/ecmascript ecma +application/edi-consent +application/edi-x12 +application/edifact +application/epp+xml +application/eshop +application/fastinfoset +application/fastsoap +application/fits +application/font-tdpfr pfr +application/h224 +application/http +application/hyperstudio stk +application/iges +application/im-iscomposing+xml +application/index +application/index.cmd +application/index.obj +application/index.response +application/index.vnd +application/iotp +application/ipp +application/isup +application/javascript js +application/json json +application/kpml-request+xml +application/kpml-response+xml +application/lost+xml lostxml +application/mac-binhex40 hqx +application/mac-compactpro cpt +application/macwriteii +application/marc mrc +application/mathematica ma nb mb +application/mathml+xml mathml +application/mbms-associated-procedure-description+xml +application/mbms-deregister+xml +application/mbms-envelope+xml +application/mbms-msk+xml +application/mbms-msk-response+xml +application/mbms-protection-description+xml +application/mbms-reception-report+xml +application/mbms-register+xml +application/mbms-register-response+xml +application/mbms-user-service-description+xml +application/mbox mbox +application/media_control+xml +application/mediaservercontrol+xml mscml +application/mikey +application/moss-keys +application/moss-signature +application/mosskey-data +application/mosskey-request +application/mp4 mp4s +application/mpeg4-generic +application/mpeg4-iod +application/mpeg4-iod-xmt +application/msword doc dot +application/mxf mxf +application/nasdata +application/news-transmission +application/nss +application/ocsp-request +application/ocsp-response +application/octet-stream bin dms lha lzh class so iso dmg dist distz pkg bpk dump elc +application/oda oda +application/oebps-package+xml +application/ogg ogx +application/parityfec +application/patch-ops-error+xml xer +application/pdf pdf +application/pgp-encrypted pgp +application/pgp-keys +application/pgp-signature asc sig +application/pics-rules prf +application/pidf+xml +application/pidf-diff+xml +application/pkcs10 p10 +application/pkcs7-mime p7m p7c +application/pkcs7-signature p7s +application/pkix-cert cer +application/pkix-crl crl +application/pkix-pkipath pkipath +application/pkixcmp pki +application/pls+xml pls +application/poc-settings+xml +application/postscript ai eps ps +application/prs.alvestrand.titrax-sheet +application/prs.cww cww +application/prs.nprend +application/prs.plucker +application/qsig +application/rdf+xml rdf +application/reginfo+xml rif +application/relax-ng-compact-syntax rnc +application/remote-printing +application/resource-lists+xml rl +application/resource-lists-diff+xml rld +application/riscos +application/rlmi+xml +application/rls-services+xml rs +application/rsd+xml rsd +application/rss+xml rss +application/rtf rtf +application/rtx +application/samlassertion+xml +application/samlmetadata+xml +application/sbml+xml sbml +application/scvp-cv-request scq +application/scvp-cv-response scs +application/scvp-vp-request spq +application/scvp-vp-response spp +application/sdp sdp +application/set-payment +application/set-payment-initiation setpay +application/set-registration +application/set-registration-initiation setreg +application/sgml +application/sgml-open-catalog +application/shf+xml shf +application/sieve +application/simple-filter+xml +application/simple-message-summary +application/simplesymbolcontainer +application/slate +application/smil +application/smil+xml smi smil +application/soap+fastinfoset +application/soap+xml +application/sparql-query rq +application/sparql-results+xml srx +application/spirits-event+xml +application/srgs gram +application/srgs+xml grxml +application/ssml+xml ssml +application/timestamp-query +application/timestamp-reply +application/tve-trigger +application/ulpfec +application/vemmi +application/vividence.scriptfile +application/vnd.3gpp.bsf+xml +application/vnd.3gpp.pic-bw-large plb +application/vnd.3gpp.pic-bw-small psb +application/vnd.3gpp.pic-bw-var pvb +application/vnd.3gpp.sms +application/vnd.3gpp2.bcmcsinfo+xml +application/vnd.3gpp2.sms +application/vnd.3gpp2.tcap tcap +application/vnd.3m.post-it-notes pwn +application/vnd.accpac.simply.aso aso +application/vnd.accpac.simply.imp imp +application/vnd.acucobol acu +application/vnd.acucorp atc acutc +application/vnd.adobe.xdp+xml xdp +application/vnd.adobe.xfdf xfdf +application/vnd.aether.imp +application/vnd.americandynamics.acc acc +application/vnd.amiga.ami ami +application/vnd.anser-web-certificate-issue-initiation cii +application/vnd.anser-web-funds-transfer-initiation fti +application/vnd.antix.game-component atx +application/vnd.apple.installer+xml mpkg +application/vnd.arastra.swi swi +application/vnd.audiograph aep +application/vnd.autopackage +application/vnd.avistar+xml +application/vnd.blueice.multipass mpm +application/vnd.bmi bmi +application/vnd.businessobjects rep +application/vnd.cab-jscript +application/vnd.canon-cpdl +application/vnd.canon-lips +application/vnd.cendio.thinlinc.clientconf +application/vnd.chemdraw+xml cdxml +application/vnd.chipnuts.karaoke-mmd mmd +application/vnd.cinderella cdy +application/vnd.cirpack.isdn-ext +application/vnd.claymore cla +application/vnd.clonk.c4group c4g c4d c4f c4p c4u +application/vnd.commerce-battelle +application/vnd.commonspace csp cst +application/vnd.contact.cmsg cdbcmsg +application/vnd.cosmocaller cmc +application/vnd.crick.clicker clkx +application/vnd.crick.clicker.keyboard clkk +application/vnd.crick.clicker.palette clkp +application/vnd.crick.clicker.template clkt +application/vnd.crick.clicker.wordbank clkw +application/vnd.criticaltools.wbs+xml wbs +application/vnd.ctc-posml pml +application/vnd.ctct.ws+xml +application/vnd.cups-pdf +application/vnd.cups-postscript +application/vnd.cups-ppd ppd +application/vnd.cups-raster +application/vnd.cups-raw +application/vnd.curl curl +application/vnd.cybank +application/vnd.data-vision.rdz rdz +application/vnd.denovo.fcselayout-link fe_launch +application/vnd.dna dna +application/vnd.dolby.mlp mlp +application/vnd.dpgraph dpg +application/vnd.dreamfactory dfac +application/vnd.dvb.esgcontainer +application/vnd.dvb.ipdcesgaccess +application/vnd.dvb.iptv.alfec-base +application/vnd.dvb.iptv.alfec-enhancement +application/vnd.dxr +application/vnd.ecdis-update +application/vnd.ecowin.chart mag +application/vnd.ecowin.filerequest +application/vnd.ecowin.fileupdate +application/vnd.ecowin.series +application/vnd.ecowin.seriesrequest +application/vnd.ecowin.seriesupdate +application/vnd.enliven nml +application/vnd.epson.esf esf +application/vnd.epson.msf msf +application/vnd.epson.quickanime qam +application/vnd.epson.salt slt +application/vnd.epson.ssf ssf +application/vnd.ericsson.quickcall +application/vnd.eszigno3+xml es3 et3 +application/vnd.eudora.data +application/vnd.ezpix-album ez2 +application/vnd.ezpix-package ez3 +application/vnd.fdf fdf +application/vnd.ffsns +application/vnd.fints +application/vnd.flographit gph +application/vnd.fluxtime.clip ftc +application/vnd.font-fontforge-sfd +application/vnd.framemaker fm frame maker +application/vnd.frogans.fnc fnc +application/vnd.frogans.ltf ltf +application/vnd.fsc.weblaunch fsc +application/vnd.fujitsu.oasys oas +application/vnd.fujitsu.oasys2 oa2 +application/vnd.fujitsu.oasys3 oa3 +application/vnd.fujitsu.oasysgp fg5 +application/vnd.fujitsu.oasysprs bh2 +application/vnd.fujixerox.art-ex +application/vnd.fujixerox.art4 +application/vnd.fujixerox.hbpl +application/vnd.fujixerox.ddd ddd +application/vnd.fujixerox.docuworks xdw +application/vnd.fujixerox.docuworks.binder xbd +application/vnd.fut-misnet +application/vnd.fuzzysheet fzs +application/vnd.genomatix.tuxedo txd +application/vnd.gmx gmx +application/vnd.google-earth.kml+xml kml +application/vnd.google-earth.kmz kmz +application/vnd.grafeq gqf gqs +application/vnd.gridmp +application/vnd.groove-account gac +application/vnd.groove-help ghf +application/vnd.groove-identity-message gim +application/vnd.groove-injector grv +application/vnd.groove-tool-message gtm +application/vnd.groove-tool-template tpl +application/vnd.groove-vcard vcg +application/vnd.handheld-entertainment+xml zmm +application/vnd.hbci hbci +application/vnd.hcl-bireports +application/vnd.hhe.lesson-player les +application/vnd.hp-hpgl hpgl +application/vnd.hp-hpid hpid +application/vnd.hp-hps hps +application/vnd.hp-jlyt jlt +application/vnd.hp-pcl pcl +application/vnd.hp-pclxl pclxl +application/vnd.httphone +application/vnd.hydrostatix.sof-data sfd-hdstx +application/vnd.hzn-3d-crossword x3d +application/vnd.ibm.afplinedata +application/vnd.ibm.electronic-media +application/vnd.ibm.minipay mpy +application/vnd.ibm.modcap afp listafp list3820 +application/vnd.ibm.rights-management irm +application/vnd.ibm.secure-container sc +application/vnd.iccprofile icc icm +application/vnd.igloader igl +application/vnd.immervision-ivp ivp +application/vnd.immervision-ivu ivu +application/vnd.informedcontrol.rms+xml +application/vnd.intercon.formnet xpw xpx +application/vnd.intertrust.digibox +application/vnd.intertrust.nncp +application/vnd.intu.qbo qbo +application/vnd.intu.qfx qfx +application/vnd.iptc.g2.conceptitem+xml +application/vnd.iptc.g2.knowledgeitem+xml +application/vnd.iptc.g2.newsitem+xml +application/vnd.iptc.g2.packageitem+xml +application/vnd.ipunplugged.rcprofile rcprofile +application/vnd.irepository.package+xml irp +application/vnd.is-xpr xpr +application/vnd.jam jam +application/vnd.japannet-directory-service +application/vnd.japannet-jpnstore-wakeup +application/vnd.japannet-payment-wakeup +application/vnd.japannet-registration +application/vnd.japannet-registration-wakeup +application/vnd.japannet-setstore-wakeup +application/vnd.japannet-verification +application/vnd.japannet-verification-wakeup +application/vnd.jcp.javame.midlet-rms rms +application/vnd.jisp jisp +application/vnd.joost.joda-archive joda +application/vnd.kahootz ktz ktr +application/vnd.kde.karbon karbon +application/vnd.kde.kchart chrt +application/vnd.kde.kformula kfo +application/vnd.kde.kivio flw +application/vnd.kde.kontour kon +application/vnd.kde.kpresenter kpr kpt +application/vnd.kde.kspread ksp +application/vnd.kde.kword kwd kwt +application/vnd.kenameaapp htke +application/vnd.kidspiration kia +application/vnd.kinar kne knp +application/vnd.koan skp skd skt skm +application/vnd.kodak-descriptor sse +application/vnd.liberty-request+xml +application/vnd.llamagraphics.life-balance.desktop lbd +application/vnd.llamagraphics.life-balance.exchange+xml lbe +application/vnd.lotus-1-2-3 123 +application/vnd.lotus-approach apr +application/vnd.lotus-freelance pre +application/vnd.lotus-notes nsf +application/vnd.lotus-organizer org +application/vnd.lotus-screencam scm +application/vnd.lotus-wordpro lwp +application/vnd.macports.portpkg portpkg +application/vnd.marlin.drm.actiontoken+xml +application/vnd.marlin.drm.conftoken+xml +application/vnd.marlin.drm.license+xml +application/vnd.marlin.drm.mdcf +application/vnd.mcd mcd +application/vnd.medcalcdata mc1 +application/vnd.mediastation.cdkey cdkey +application/vnd.meridian-slingshot +application/vnd.mfer mwf +application/vnd.mfmp mfm +application/vnd.micrografx.flo flo +application/vnd.micrografx.igx igx +application/vnd.mif mif +application/vnd.minisoft-hp3000-save +application/vnd.mitsubishi.misty-guard.trustweb +application/vnd.mobius.daf daf +application/vnd.mobius.dis dis +application/vnd.mobius.mbk mbk +application/vnd.mobius.mqy mqy +application/vnd.mobius.msl msl +application/vnd.mobius.plc plc +application/vnd.mobius.txf txf +application/vnd.mophun.application mpn +application/vnd.mophun.certificate mpc +application/vnd.motorola.flexsuite +application/vnd.motorola.flexsuite.adsi +application/vnd.motorola.flexsuite.fis +application/vnd.motorola.flexsuite.gotap +application/vnd.motorola.flexsuite.kmr +application/vnd.motorola.flexsuite.ttc +application/vnd.motorola.flexsuite.wem +application/vnd.motorola.iprm +application/vnd.mozilla.xul+xml xul +application/vnd.ms-artgalry cil +application/vnd.ms-asf asf +application/vnd.ms-cab-compressed cab +application/vnd.ms-excel xls xlm xla xlc xlt xlw +application/vnd.ms-fontobject eot +application/vnd.ms-htmlhelp chm +application/vnd.ms-ims ims +application/vnd.ms-lrm lrm +application/vnd.ms-playready.initiator+xml +application/vnd.ms-powerpoint ppt pps pot +application/vnd.ms-project mpp mpt +application/vnd.ms-tnef +application/vnd.ms-wmdrm.lic-chlg-req +application/vnd.ms-wmdrm.lic-resp +application/vnd.ms-wmdrm.meter-chlg-req +application/vnd.ms-wmdrm.meter-resp +application/vnd.ms-works wps wks wcm wdb +application/vnd.ms-wpl wpl +application/vnd.ms-xpsdocument xps +application/vnd.mseq mseq +application/vnd.msign +application/vnd.multiad.creator +application/vnd.multiad.creator.cif +application/vnd.music-niff +application/vnd.musician mus +application/vnd.muvee.style msty +application/vnd.ncd.control +application/vnd.ncd.reference +application/vnd.nervana +application/vnd.netfpx +application/vnd.neurolanguage.nlu nlu +application/vnd.noblenet-directory nnd +application/vnd.noblenet-sealer nns +application/vnd.noblenet-web nnw +application/vnd.nokia.catalogs +application/vnd.nokia.conml+wbxml +application/vnd.nokia.conml+xml +application/vnd.nokia.isds-radio-presets +application/vnd.nokia.iptv.config+xml +application/vnd.nokia.landmark+wbxml +application/vnd.nokia.landmark+xml +application/vnd.nokia.landmarkcollection+xml +application/vnd.nokia.n-gage.ac+xml +application/vnd.nokia.n-gage.data ngdat +application/vnd.nokia.n-gage.symbian.install n-gage +application/vnd.nokia.ncd +application/vnd.nokia.pcd+wbxml +application/vnd.nokia.pcd+xml +application/vnd.nokia.radio-preset rpst +application/vnd.nokia.radio-presets rpss +application/vnd.novadigm.edm edm +application/vnd.novadigm.edx edx +application/vnd.novadigm.ext ext +application/vnd.oasis.opendocument.chart odc +application/vnd.oasis.opendocument.chart-template otc +application/vnd.oasis.opendocument.formula odf +application/vnd.oasis.opendocument.formula-template otf +application/vnd.oasis.opendocument.graphics odg +application/vnd.oasis.opendocument.graphics-template otg +application/vnd.oasis.opendocument.image odi +application/vnd.oasis.opendocument.image-template oti +application/vnd.oasis.opendocument.presentation odp +application/vnd.oasis.opendocument.presentation-template otp +application/vnd.oasis.opendocument.spreadsheet ods +application/vnd.oasis.opendocument.spreadsheet-template ots +application/vnd.oasis.opendocument.text odt +application/vnd.oasis.opendocument.text-master otm +application/vnd.oasis.opendocument.text-template ott +application/vnd.oasis.opendocument.text-web oth +application/vnd.obn +application/vnd.olpc-sugar xo +application/vnd.oma-scws-config +application/vnd.oma-scws-http-request +application/vnd.oma-scws-http-response +application/vnd.oma.bcast.associated-procedure-parameter+xml +application/vnd.oma.bcast.drm-trigger+xml +application/vnd.oma.bcast.imd+xml +application/vnd.oma.bcast.ltkm +application/vnd.oma.bcast.notification+xml +application/vnd.oma.bcast.provisioningtrigger +application/vnd.oma.bcast.sgboot +application/vnd.oma.bcast.sgdd+xml +application/vnd.oma.bcast.sgdu +application/vnd.oma.bcast.simple-symbol-container +application/vnd.oma.bcast.smartcard-trigger+xml +application/vnd.oma.bcast.sprov+xml +application/vnd.oma.bcast.stkm +application/vnd.oma.dcd +application/vnd.oma.dcdc +application/vnd.oma.dd2+xml dd2 +application/vnd.oma.drm.risd+xml +application/vnd.oma.group-usage-list+xml +application/vnd.oma.poc.detailed-progress-report+xml +application/vnd.oma.poc.final-report+xml +application/vnd.oma.poc.groups+xml +application/vnd.oma.poc.invocation-descriptor+xml +application/vnd.oma.poc.optimized-progress-report+xml +application/vnd.oma.xcap-directory+xml +application/vnd.omads-email+xml +application/vnd.omads-file+xml +application/vnd.omads-folder+xml +application/vnd.omaloc-supl-init +application/vnd.openofficeorg.extension oxt +application/vnd.osa.netdeploy +application/vnd.osgi.dp dp +application/vnd.otps.ct-kip+xml +application/vnd.palm prc pdb pqa oprc +application/vnd.paos.xml +application/vnd.pg.format str +application/vnd.pg.osasli ei6 +application/vnd.piaccess.application-licence +application/vnd.picsel efif +application/vnd.poc.group-advertisement+xml +application/vnd.pocketlearn plf +application/vnd.powerbuilder6 pbd +application/vnd.powerbuilder6-s +application/vnd.powerbuilder7 +application/vnd.powerbuilder7-s +application/vnd.powerbuilder75 +application/vnd.powerbuilder75-s +application/vnd.preminet +application/vnd.previewsystems.box box +application/vnd.proteus.magazine mgz +application/vnd.publishare-delta-tree qps +application/vnd.pvi.ptid1 ptid +application/vnd.pwg-multiplexed +application/vnd.pwg-xhtml-print+xml +application/vnd.qualcomm.brew-app-res +application/vnd.quark.quarkxpress qxd qxt qwd qwt qxl qxb +application/vnd.rapid +application/vnd.recordare.musicxml mxl +application/vnd.recordare.musicxml+xml +application/vnd.renlearn.rlprint +application/vnd.rn-realmedia rm +application/vnd.route66.link66+xml link66 +application/vnd.ruckus.download +application/vnd.s3sms +application/vnd.sbm.mid2 +application/vnd.scribus +application/vnd.sealed.3df +application/vnd.sealed.csf +application/vnd.sealed.doc +application/vnd.sealed.eml +application/vnd.sealed.mht +application/vnd.sealed.net +application/vnd.sealed.ppt +application/vnd.sealed.tiff +application/vnd.sealed.xls +application/vnd.sealedmedia.softseal.html +application/vnd.sealedmedia.softseal.pdf +application/vnd.seemail see +application/vnd.sema sema +application/vnd.semd semd +application/vnd.semf semf +application/vnd.shana.informed.formdata ifm +application/vnd.shana.informed.formtemplate itp +application/vnd.shana.informed.interchange iif +application/vnd.shana.informed.package ipk +application/vnd.simtech-mindmapper twd twds +application/vnd.smaf mmf +application/vnd.software602.filler.form+xml +application/vnd.software602.filler.form-xml-zip +application/vnd.solent.sdkm+xml sdkm sdkd +application/vnd.spotfire.dxp dxp +application/vnd.spotfire.sfs sfs +application/vnd.sss-cod +application/vnd.sss-dtf +application/vnd.sss-ntf +application/vnd.street-stream +application/vnd.sun.wadl+xml +application/vnd.sus-calendar sus susp +application/vnd.svd svd +application/vnd.swiftview-ics +application/vnd.syncml+xml xsm +application/vnd.syncml.dm+wbxml bdm +application/vnd.syncml.dm+xml xdm +application/vnd.syncml.ds.notification +application/vnd.tao.intent-module-archive tao +application/vnd.tmobile-livetv tmo +application/vnd.trid.tpt tpt +application/vnd.triscape.mxs mxs +application/vnd.trueapp tra +application/vnd.truedoc +application/vnd.ufdl ufd ufdl +application/vnd.uiq.theme utz +application/vnd.umajin umj +application/vnd.unity unityweb +application/vnd.uoml+xml uoml +application/vnd.uplanet.alert +application/vnd.uplanet.alert-wbxml +application/vnd.uplanet.bearer-choice +application/vnd.uplanet.bearer-choice-wbxml +application/vnd.uplanet.cacheop +application/vnd.uplanet.cacheop-wbxml +application/vnd.uplanet.channel +application/vnd.uplanet.channel-wbxml +application/vnd.uplanet.list +application/vnd.uplanet.list-wbxml +application/vnd.uplanet.listcmd +application/vnd.uplanet.listcmd-wbxml +application/vnd.uplanet.signal +application/vnd.vcx vcx +application/vnd.vd-study +application/vnd.vectorworks +application/vnd.vidsoft.vidconference +application/vnd.visio vsd vst vss vsw +application/vnd.visionary vis +application/vnd.vividence.scriptfile +application/vnd.vsf vsf +application/vnd.wap.sic +application/vnd.wap.slc +application/vnd.wap.wbxml wbxml +application/vnd.wap.wmlc wmlc +application/vnd.wap.wmlscriptc wmlsc +application/vnd.webturbo wtb +application/vnd.wfa.wsc +application/vnd.wmc +application/vnd.wmf.bootstrap +application/vnd.wordperfect wpd +application/vnd.wqd wqd +application/vnd.wrq-hp3000-labelled +application/vnd.wt.stf stf +application/vnd.wv.csp+wbxml +application/vnd.wv.csp+xml +application/vnd.wv.ssp+xml +application/vnd.xara xar +application/vnd.xfdl xfdl +application/vnd.xmi+xml +application/vnd.xmpie.cpkg +application/vnd.xmpie.dpkg +application/vnd.xmpie.plan +application/vnd.xmpie.ppkg +application/vnd.xmpie.xlim +application/vnd.yamaha.hv-dic hvd +application/vnd.yamaha.hv-script hvs +application/vnd.yamaha.hv-voice hvp +application/vnd.yamaha.smaf-audio saf +application/vnd.yamaha.smaf-phrase spf +application/vnd.yellowriver-custom-menu cmp +application/vnd.zzazz.deck+xml zaz +application/voicexml+xml vxml +application/watcherinfo+xml +application/whoispp-query +application/whoispp-response +application/winhlp hlp +application/wita +application/wordperfect5.1 +application/wsdl+xml wsdl +application/wspolicy+xml wspolicy +application/x-ace-compressed ace +application/x-bcpio bcpio +application/x-bittorrent torrent +application/x-bzip bz +application/x-bzip2 bz2 boz +application/x-cdlink vcd +application/x-chat chat +application/x-chess-pgn pgn +application/x-compress +application/x-cpio cpio +application/x-csh csh +application/x-director dcr dir dxr fgd +application/x-dvi dvi +application/x-futuresplash spl +application/x-gtar gtar +application/x-gzip +application/x-hdf hdf +application/x-latex latex +application/x-ms-wmd wmd +application/x-ms-wmz wmz +application/x-msaccess mdb +application/x-msbinder obd +application/x-mscardfile crd +application/x-msclip clp +application/x-msdownload exe dll com bat msi +application/x-msmediaview mvb m13 m14 +application/x-msmetafile wmf +application/x-msmoney mny +application/x-mspublisher pub +application/x-msschedule scd +application/x-msterminal trm +application/x-mswrite wri +application/x-netcdf nc cdf +application/x-pkcs12 p12 pfx +application/x-pkcs7-certificates p7b spc +application/x-pkcs7-certreqresp p7r +application/x-rar-compressed rar +application/x-sh sh +application/x-shar shar +application/x-shockwave-flash swf +application/x-stuffit sit +application/x-stuffitx sitx +application/x-sv4cpio sv4cpio +application/x-sv4crc sv4crc +application/x-tar tar +application/x-tcl tcl +application/x-tex tex +application/x-texinfo texinfo texi +application/x-ustar ustar +application/x-wais-source src +application/x-x509-ca-cert der crt +application/x400-bp +application/xcap-att+xml +application/xcap-caps+xml +application/xcap-el+xml +application/xcap-error+xml +application/xcap-ns+xml +application/xenc+xml xenc +application/xhtml+xml xhtml xht +application/xml xml xsl +application/xml-dtd dtd +application/xml-external-parsed-entity +application/xmpp+xml +application/xop+xml xop +application/xslt+xml xslt +application/xspf+xml xspf +application/xv+xml mxml xhvml xvml xvm +application/zip zip +audio/32kadpcm +audio/3gpp +audio/3gpp2 +audio/ac3 +audio/amr +audio/amr-wb +audio/amr-wb+ +audio/asc +audio/basic au snd +audio/bv16 +audio/bv32 +audio/clearmode +audio/cn +audio/dat12 +audio/dls +audio/dsr-es201108 +audio/dsr-es202050 +audio/dsr-es202211 +audio/dsr-es202212 +audio/dvi4 +audio/eac3 +audio/evrc +audio/evrc-qcp +audio/evrc0 +audio/evrc1 +audio/evrcb +audio/evrcb0 +audio/evrcb1 +audio/evrcwb +audio/evrcwb0 +audio/evrcwb1 +audio/g722 +audio/g7221 +audio/g723 +audio/g726-16 +audio/g726-24 +audio/g726-32 +audio/g726-40 +audio/g728 +audio/g729 +audio/g7291 +audio/g729d +audio/g729e +audio/gsm +audio/gsm-efr +audio/ilbc +audio/l16 +audio/l20 +audio/l24 +audio/l8 +audio/lpc +audio/midi mid midi kar rmi +audio/mobile-xmf +audio/mp4 mp4a +audio/mp4a-latm +audio/mpa +audio/mpa-robust +audio/mpeg mpga mp2 mp2a mp3 m2a m3a +audio/mpeg4-generic +audio/ogg oga ogg spx +audio/parityfec +audio/pcma +audio/pcmu +audio/prs.sid +audio/qcelp +audio/red +audio/rtp-enc-aescm128 +audio/rtp-midi +audio/rtx +audio/smv +audio/smv0 +audio/smv-qcp +audio/sp-midi +audio/t140c +audio/t38 +audio/telephone-event +audio/tone +audio/ulpfec +audio/vdvi +audio/vmr-wb +audio/vnd.3gpp.iufp +audio/vnd.4sb +audio/vnd.audiokoz +audio/vnd.celp +audio/vnd.cisco.nse +audio/vnd.cmles.radio-events +audio/vnd.cns.anp1 +audio/vnd.cns.inf1 +audio/vnd.digital-winds eol +audio/vnd.dlna.adts +audio/vnd.dolby.mlp +audio/vnd.dts dts +audio/vnd.dts.hd dtshd +audio/vnd.everad.plj +audio/vnd.hns.audio +audio/vnd.lucent.voice lvp +audio/vnd.ms-playready.media.pya pya +audio/vnd.nokia.mobile-xmf +audio/vnd.nortel.vbk +audio/vnd.nuera.ecelp4800 ecelp4800 +audio/vnd.nuera.ecelp7470 ecelp7470 +audio/vnd.nuera.ecelp9600 ecelp9600 +audio/vnd.octel.sbc +audio/vnd.qcelp +audio/vnd.rhetorex.32kadpcm +audio/vnd.sealedmedia.softseal.mpeg +audio/vnd.vmx.cvsd +audio/vorbis +audio/vorbis-config +audio/wav wav +audio/x-aiff aif aiff aifc +audio/x-mpegurl m3u +audio/x-ms-wax wax +audio/x-ms-wma wma +audio/x-pn-realaudio ram ra +audio/x-pn-realaudio-plugin rmp +audio/x-wav wav +chemical/x-cdx cdx +chemical/x-cif cif +chemical/x-cmdf cmdf +chemical/x-cml cml +chemical/x-csml csml +chemical/x-pdb pdb +chemical/x-xyz xyz +image/bmp bmp +image/cgm cgm +image/fits +image/g3fax g3 +image/gif gif +image/ief ief +image/jp2 +image/jpeg jpeg jpg jpe +image/jpm +image/jpx +image/naplps +image/png png +image/prs.btif btif +image/prs.pti +image/svg+xml svg svgz +image/t38 +image/tiff tiff tif +image/tiff-fx +image/vnd.adobe.photoshop psd +image/vnd.cns.inf2 +image/vnd.djvu djvu djv +image/vnd.dwg dwg +image/vnd.dxf dxf +image/vnd.fastbidsheet fbs +image/vnd.fpx fpx +image/vnd.fst fst +image/vnd.fujixerox.edmics-mmr mmr +image/vnd.fujixerox.edmics-rlc rlc +image/vnd.globalgraphics.pgb +image/vnd.microsoft.icon +image/vnd.mix +image/vnd.ms-modi mdi +image/vnd.net-fpx npx +image/vnd.sealed.png +image/vnd.sealedmedia.softseal.gif +image/vnd.sealedmedia.softseal.jpg +image/vnd.svf +image/vnd.wap.wbmp wbmp +image/vnd.xiff xif +image/x-cmu-raster ras +image/x-cmx cmx +image/x-icon ico +image/x-pcx pcx +image/x-pict pic pct +image/x-portable-anymap pnm +image/x-portable-bitmap pbm +image/x-portable-graymap pgm +image/x-portable-pixmap ppm +image/x-rgb rgb +image/x-xbitmap xbm +image/x-xpixmap xpm +image/x-xwindowdump xwd +message/cpim +message/delivery-status +message/disposition-notification +message/external-body +message/global +message/global-delivery-status +message/global-disposition-notification +message/global-headers +message/http +message/news +message/partial +message/rfc822 eml mime +message/s-http +message/sip +message/sipfrag +message/tracking-status +message/vnd.si.simp +model/iges igs iges +model/mesh msh mesh silo +model/vnd.dwf dwf +model/vnd.flatland.3dml +model/vnd.gdl gdl +model/vnd.gs.gdl +model/vnd.gtw gtw +model/vnd.moml+xml +model/vnd.mts mts +model/vnd.parasolid.transmit.binary +model/vnd.parasolid.transmit.text +model/vnd.vtu vtu +model/vrml wrl vrml +multipart/alternative +multipart/appledouble +multipart/byteranges +multipart/digest +multipart/encrypted +multipart/form-data +multipart/header-set +multipart/mixed +multipart/parallel +multipart/related +multipart/report +multipart/signed +multipart/voice-message +text/calendar ics ifb +text/css css +text/csv csv +text/directory +text/dns +text/enriched +text/html html htm +text/parityfec +text/plain txt text conf def list log in +text/prs.fallenstein.rst +text/prs.lines.tag dsc +text/red +text/rfc822-headers +text/richtext rtx +text/rtf +text/rtp-enc-aescm128 +text/rtx +text/sgml sgml sgm +text/t140 +text/tab-separated-values tsv +text/troff t tr roff man me ms +text/ulpfec +text/uri-list uri uris urls +text/vnd.abc +text/vnd.curl +text/vnd.dmclientscript +text/vnd.esmertec.theme-descriptor +text/vnd.fly fly +text/vnd.fmi.flexstor flx +text/vnd.graphviz gv +text/vnd.in3d.3dml 3dml +text/vnd.in3d.spot spot +text/vnd.iptc.newsml +text/vnd.iptc.nitf +text/vnd.latex-z +text/vnd.motorola.reflex +text/vnd.ms-mediapackage +text/vnd.net2phone.commcenter.command +text/vnd.si.uricatalogue +text/vnd.sun.j2me.app-descriptor jad +text/vnd.trolltech.linguist +text/vnd.wap.si +text/vnd.wap.sl +text/vnd.wap.wml wml +text/vnd.wap.wmlscript wmls +text/x-asm s asm +text/x-c c cc cxx cpp h hh dic +text/x-fortran f for f77 f90 +text/x-pascal p pas +text/x-java-source java +text/x-setext etx +text/x-uuencode uu +text/x-vcalendar vcs +text/x-vcard vcf +text/xml +text/xml-external-parsed-entity +video/3gpp 3gp +video/3gpp-tt +video/3gpp2 3g2 +video/bmpeg +video/bt656 +video/celb +video/dv +video/h261 h261 +video/h263 h263 +video/h263-1998 +video/h263-2000 +video/h264 h264 +video/jpeg jpgv +video/jpeg2000 +video/jpm jpm jpgm +video/mj2 mj2 mjp2 +video/mp1s +video/mp2p +video/mp2t +video/mp4 mp4 mp4v mpg4 +video/mp4v-es +video/mpeg mpeg mpg mpe m1v m2v +video/mpeg4-generic +video/mpv +video/nv +video/ogg ogv +video/parityfec +video/pointer +video/quicktime qt mov +video/raw +video/rtp-enc-aescm128 +video/rtx +video/smpte292m +video/ulpfec +video/vc1 +video/vnd.cctv +video/vnd.dlna.mpeg-tts +video/vnd.fvt fvt +video/vnd.hns.video +video/vnd.iptvforum.1dparityfec-1010 +video/vnd.iptvforum.1dparityfec-2005 +video/vnd.iptvforum.2dparityfec-1010 +video/vnd.iptvforum.2dparityfec-2005 +video/vnd.iptvforum.ttsavc +video/vnd.iptvforum.ttsmpeg2 +video/vnd.motorola.video +video/vnd.motorola.videop +video/vnd.mpegurl mxu m4u +video/vnd.ms-playready.media.pyv pyv +video/vnd.nokia.interleaved-multimedia +video/vnd.nokia.videovoip +video/vnd.objectvideo +video/vnd.sealed.mpeg1 +video/vnd.sealed.mpeg4 +video/vnd.sealed.swf +video/vnd.sealedmedia.softseal.mov +video/vnd.vivo viv +video/x-fli fli +video/x-ms-asf asf asx +video/x-ms-wm wm +video/x-ms-wmv wmv +video/x-ms-wmx wmx +video/x-ms-wvx wvx +video/x-msvideo avi +video/x-sgi-movie movie +x-conference/x-cooltalk ice diff --git a/conf/mod_fastdfs.conf b/conf/mod_fastdfs.conf new file mode 100644 index 0000000000000000000000000000000000000000..f9692274e63c395d220be3d7433806548d6358c6 --- /dev/null +++ b/conf/mod_fastdfs.conf @@ -0,0 +1,133 @@ +# connect timeout in seconds +# default value is 30s +connect_timeout=2 + +# network recv and send timeout in seconds +# default value is 30s +network_timeout=30 + +# the base path to store log files +base_path=/tmp + +# if load FastDFS parameters from tracker server +# since V1.12 +# default value is false +load_fdfs_parameters_from_tracker=true + +# storage sync file max delay seconds +# same as tracker.conf +# valid only when load_fdfs_parameters_from_tracker is false +# since V1.12 +# default value is 86400 seconds (one day) +storage_sync_file_max_delay = 86400 + +# if use storage ID instead of IP address +# same as tracker.conf +# valid only when load_fdfs_parameters_from_tracker is false +# default value is false +# since V1.13 +use_storage_id = false + +# specify storage ids filename, can use relative or absolute path +# same as tracker.conf +# valid only when load_fdfs_parameters_from_tracker is false +# since V1.13 +storage_ids_filename = storage_ids.conf + +# FastDFS tracker_server can ocur more than once, and tracker_server format is +# "host:port", host can be hostname or ip address +# valid only when load_fdfs_parameters_from_tracker is true +tracker_server=com.ikingtech.ch116221:22122 + +# the port of the local storage server +# the default value is 23000 +storage_server_port=23000 + +# the group name of the local storage server +group_name=group1 + +# if the url / uri including the group name +# set to false when uri like /M00/00/00/xxx +# set to true when uri like ${group_name}/M00/00/00/xxx, such as group1/M00/xxx +# default value is false +url_have_group_name = true + +# path(disk or mount point) count, default value is 1 +# must same as storage.conf +store_path_count=1 + +# store_path#, based 0, if store_path0 not exists, it's value is base_path +# the paths must be exist +# must same as storage.conf +store_path0=/home/dfs +#store_path1=/home/yuqing/fastdfs1 + +# standard log level as syslog, case insensitive, value list: +### emerg for emergency +### alert +### crit for critical +### error +### warn for warning +### notice +### info +### debug +log_level=info + +# set the log filename, such as /usr/local/apache2/logs/mod_fastdfs.log +# empty for output to stderr (apache and nginx error_log file) +log_filename= + +# response mode when the file not exist in the local file system +## proxy: get the content from other storage server, then send to client +## redirect: redirect to the original storage server (HTTP Header is Location) +response_mode=proxy + +# the NIC alias prefix, such as eth in Linux, you can see it by ifconfig -a +# multi aliases split by comma. empty value means auto set by OS type +# this paramter used to get all ip address of the local host +# default values is empty +if_alias_prefix= + +# use "#include" directive to include HTTP config file +# NOTE: #include is an include directive, do NOT remove the # before include +#include http.conf + + +# if support flv +# default value is false +# since v1.15 +flv_support = true + +# flv file extension name +# default value is flv +# since v1.15 +flv_extension = flv + + +# set the group count +# set to none zero to support multi-group on this storage server +# set to 0 for single group only +# groups settings section as [group1], [group2], ..., [groupN] +# default value is 0 +# since v1.14 +group_count = 0 + +# group settings for group #1 +# since v1.14 +# when support multi-group on this storage server, uncomment following section +#[group1] +#group_name=group1 +#storage_server_port=23000 +#store_path_count=2 +#store_path0=/home/yuqing/fastdfs +#store_path1=/home/yuqing/fastdfs1 + +# group settings for group #2 +# since v1.14 +# when support multi-group, uncomment following section as neccessary +#[group2] +#group_name=group2 +#storage_server_port=23000 +#store_path_count=1 +#store_path0=/home/yuqing/fastdfs + diff --git a/conf/nginx.conf b/conf/nginx.conf new file mode 100644 index 0000000000000000000000000000000000000000..62b5d0bf213b7f42cd00d0e7840bf8cc684c397f --- /dev/null +++ b/conf/nginx.conf @@ -0,0 +1,127 @@ + +#user nobody; +worker_processes 1; + +#error_log logs/error.log; +#error_log logs/error.log notice; +#error_log logs/error.log info; + +#pid logs/nginx.pid; + + +events { + worker_connections 1024; +} + + +http { + include mime.types; + default_type application/octet-stream; + + #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + # '$status $body_bytes_sent "$http_referer" ' + # '"$http_user_agent" "$http_x_forwarded_for"'; + + #access_log logs/access.log main; + + sendfile on; + #tcp_nopush on; + + #keepalive_timeout 0; + keepalive_timeout 65; + + #gzip on; + + server { + listen 80; + server_name localhost; + + #charset koi8-r; + + #access_log logs/host.access.log main; + + location / { + root html; + index index.html index.htm; + } + + #error_page 404 /404.html; + + # redirect server error pages to the static page /50x.html + # + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root html; + } + + # proxy the PHP scripts to Apache listening on 127.0.0.1:80 + # + #location ~ \.php$ { + # proxy_pass http://127.0.0.1; + #} + + # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 + # + #location ~ \.php$ { + # root html; + # fastcgi_pass 127.0.0.1:9000; + # fastcgi_index index.php; + # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; + # include fastcgi_params; + #} + + # deny access to .htaccess files, if Apache's document root + # concurs with nginx's one + # + #location ~ /\.ht { + # deny all; + #} + } + server { + listen 8888; + server_name localhost; + location ~/group[0-9]/ { + ngx_fastdfs_module; + } + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root html; + } + } + + # another virtual host using mix of IP-, name-, and port-based configuration + # + #server { + # listen 8000; + # listen somename:8080; + # server_name somename alias another.alias; + + # location / { + # root html; + # index index.html index.htm; + # } + #} + + + # HTTPS server + # + #server { + # listen 443 ssl; + # server_name localhost; + + # ssl_certificate cert.pem; + # ssl_certificate_key cert.key; + + # ssl_session_cache shared:SSL:1m; + # ssl_session_timeout 5m; + + # ssl_ciphers HIGH:!aNULL:!MD5; + # ssl_prefer_server_ciphers on; + + # location / { + # root html; + # index index.html index.htm; + # } + #} + +} diff --git a/conf/storage.conf b/conf/storage.conf new file mode 100644 index 0000000000000000000000000000000000000000..35f3154e5d49a6d7d1aa92c10c088a957641a766 --- /dev/null +++ b/conf/storage.conf @@ -0,0 +1,287 @@ +# is this config file disabled +# false for enabled +# true for disabled +disabled=false + +# the name of the group this storage server belongs to +# +# comment or remove this item for fetching from tracker server, +# in this case, use_storage_id must set to true in tracker.conf, +# and storage_ids.conf must be configed correctly. +group_name=group1 + +# bind an address of this host +# empty for bind all addresses of this host +bind_addr= + +# if bind an address of this host when connect to other servers +# (this storage server as a client) +# true for binding the address configed by above parameter: "bind_addr" +# false for binding any address of this host +client_bind=true + +# the storage server port +port=23000 + +# connect timeout in seconds +# default value is 30s +connect_timeout=10 + +# network timeout in seconds +# default value is 30s +network_timeout=60 + +# heart beat interval in seconds +heart_beat_interval=30 + +# disk usage report interval in seconds +stat_report_interval=60 + +# the base path to store data and log files +base_path=/home/dfs + +# max concurrent connections the server supported +# default value is 256 +# more max_connections means more memory will be used +# you should set this parameter larger, eg. 10240 +max_connections=1024 + +# the buff size to recv / send data +# this parameter must more than 8KB +# default value is 64KB +# since V2.00 +buff_size = 256KB + +# accept thread count +# default value is 1 +# since V4.07 +accept_threads=1 + +# work thread count, should <= max_connections +# work thread deal network io +# default value is 4 +# since V2.00 +work_threads=4 + +# if disk read / write separated +## false for mixed read and write +## true for separated read and write +# default value is true +# since V2.00 +disk_rw_separated = true + +# disk reader thread count per store base path +# for mixed read / write, this parameter can be 0 +# default value is 1 +# since V2.00 +disk_reader_threads = 1 + +# disk writer thread count per store base path +# for mixed read / write, this parameter can be 0 +# default value is 1 +# since V2.00 +disk_writer_threads = 1 + +# when no entry to sync, try read binlog again after X milliseconds +# must > 0, default value is 200ms +sync_wait_msec=50 + +# after sync a file, usleep milliseconds +# 0 for sync successively (never call usleep) +sync_interval=0 + +# storage sync start time of a day, time format: Hour:Minute +# Hour from 0 to 23, Minute from 0 to 59 +sync_start_time=00:00 + +# storage sync end time of a day, time format: Hour:Minute +# Hour from 0 to 23, Minute from 0 to 59 +sync_end_time=23:59 + +# write to the mark file after sync N files +# default value is 500 +write_mark_file_freq=500 + +# path(disk or mount point) count, default value is 1 +store_path_count=1 + +# store_path#, based 0, if store_path0 not exists, it's value is base_path +# the paths must be exist +store_path0=/home/dfs +#store_path1=/home/dfs2 + +# subdir_count * subdir_count directories will be auto created under each +# store_path (disk), value can be 1 to 256, default value is 256 +subdir_count_per_path=256 + +# tracker_server can ocur more than once, and tracker_server format is +# "host:port", host can be hostname or ip address +tracker_server=com.ikingtech.ch116221:22122 + + +#standard log level as syslog, case insensitive, value list: +### emerg for emergency +### alert +### crit for critical +### error +### warn for warning +### notice +### info +### debug +log_level=info + +#unix group name to run this program, +#not set (empty) means run by the group of current user +run_by_group= + +#unix username to run this program, +#not set (empty) means run by current user +run_by_user= + +# allow_hosts can ocur more than once, host can be hostname or ip address, +# "*" (only one asterisk) means match all ip addresses +# we can use CIDR ips like 192.168.5.64/26 +# and also use range like these: 10.0.1.[0-254] and host[01-08,20-25].domain.com +# for example: +# allow_hosts=10.0.1.[1-15,20] +# allow_hosts=host[01-08,20-25].domain.com +# allow_hosts=192.168.5.64/26 +allow_hosts=* + +# the mode of the files distributed to the data path +# 0: round robin(default) +# 1: random, distributted by hash code +file_distribute_path_mode=0 + +# valid when file_distribute_to_path is set to 0 (round robin), +# when the written file count reaches this number, then rotate to next path +# default value is 100 +file_distribute_rotate_count=100 + +# call fsync to disk when write big file +# 0: never call fsync +# other: call fsync when written bytes >= this bytes +# default value is 0 (never call fsync) +fsync_after_written_bytes=0 + +# sync log buff to disk every interval seconds +# must > 0, default value is 10 seconds +sync_log_buff_interval=10 + +# sync binlog buff / cache to disk every interval seconds +# default value is 60 seconds +sync_binlog_buff_interval=10 + +# sync storage stat info to disk every interval seconds +# default value is 300 seconds +sync_stat_file_interval=300 + +# thread stack size, should >= 512KB +# default value is 512KB +thread_stack_size=512KB + +# the priority as a source server for uploading file. +# the lower this value, the higher its uploading priority. +# default value is 10 +upload_priority=10 + +# the NIC alias prefix, such as eth in Linux, you can see it by ifconfig -a +# multi aliases split by comma. empty value means auto set by OS type +# default values is empty +if_alias_prefix= + +# if check file duplicate, when set to true, use FastDHT to store file indexes +# 1 or yes: need check +# 0 or no: do not check +# default value is 0 +check_file_duplicate=0 + +# file signature method for check file duplicate +## hash: four 32 bits hash code +## md5: MD5 signature +# default value is hash +# since V4.01 +file_signature_method=hash + +# namespace for storing file indexes (key-value pairs) +# this item must be set when check_file_duplicate is true / on +key_namespace=FastDFS + +# set keep_alive to 1 to enable persistent connection with FastDHT servers +# default value is 0 (short connection) +keep_alive=0 + +# you can use "#include filename" (not include double quotes) directive to +# load FastDHT server list, when the filename is a relative path such as +# pure filename, the base path is the base path of current/this config file. +# must set FastDHT server list when check_file_duplicate is true / on +# please see INSTALL of FastDHT for detail +##include /home/yuqing/fastdht/conf/fdht_servers.conf + +# if log to access log +# default value is false +# since V4.00 +use_access_log = false + +# if rotate the access log every day +# default value is false +# since V4.00 +rotate_access_log = false + +# rotate access log time base, time format: Hour:Minute +# Hour from 0 to 23, Minute from 0 to 59 +# default value is 00:00 +# since V4.00 +access_log_rotate_time=00:00 + +# if rotate the error log every day +# default value is false +# since V4.02 +rotate_error_log = false + +# rotate error log time base, time format: Hour:Minute +# Hour from 0 to 23, Minute from 0 to 59 +# default value is 00:00 +# since V4.02 +error_log_rotate_time=00:00 + +# rotate access log when the log file exceeds this size +# 0 means never rotates log file by log file size +# default value is 0 +# since V4.02 +rotate_access_log_size = 0 + +# rotate error log when the log file exceeds this size +# 0 means never rotates log file by log file size +# default value is 0 +# since V4.02 +rotate_error_log_size = 0 + +# keep days of the log files +# 0 means do not delete old log files +# default value is 0 +log_file_keep_days = 0 + +# if skip the invalid record when sync file +# default value is false +# since V4.02 +file_sync_skip_invalid_record=false + +# if use connection pool +# default value is false +# since V4.05 +use_connection_pool = false + +# connections whose the idle time exceeds this time will be closed +# unit: second +# default value is 3600 +# since V4.05 +connection_pool_max_idle_time = 3600 + +# use the ip address of this storage server if domain_name is empty, +# else this domain name will ocur in the url redirected by the tracker server +http.domain_name= + +# the port of the web server on this storage server +http.server_port=8888 + diff --git a/conf/tracker.conf b/conf/tracker.conf new file mode 100644 index 0000000000000000000000000000000000000000..22e19156079e730a40e0555ab687d964efceb312 --- /dev/null +++ b/conf/tracker.conf @@ -0,0 +1,278 @@ +# is this config file disabled +# false for enabled +# true for disabled +disabled=false + +# bind an address of this host +# empty for bind all addresses of this host +bind_addr= + +# the tracker server port +port=22122 + +# connect timeout in seconds +# default value is 30s +connect_timeout=10 + +# network timeout in seconds +# default value is 30s +network_timeout=60 + +# the base path to store data and log files +base_path=/home/dfs + +# max concurrent connections this server supported +# you should set this parameter larger, eg. 102400 +max_connections=1024 + +# accept thread count +# default value is 1 +# since V4.07 +accept_threads=1 + +# work thread count, should <= max_connections +# default value is 4 +# since V2.00 +work_threads=4 + +# min buff size +# default value 8KB +min_buff_size = 8KB + +# max buff size +# default value 128KB +max_buff_size = 128KB + +# the method of selecting group to upload files +# 0: round robin +# 1: specify group +# 2: load balance, select the max free space group to upload file +store_lookup=2 + +# which group to upload file +# when store_lookup set to 1, must set store_group to the group name +store_group=group2 + +# which storage server to upload file +# 0: round robin (default) +# 1: the first server order by ip address +# 2: the first server order by priority (the minimal) +# Note: if use_trunk_file set to true, must set store_server to 1 or 2 +store_server=0 + +# which path(means disk or mount point) of the storage server to upload file +# 0: round robin +# 2: load balance, select the max free space path to upload file +store_path=0 + +# which storage server to download file +# 0: round robin (default) +# 1: the source storage server which the current file uploaded to +download_server=0 + +# reserved storage space for system or other applications. +# if the free(available) space of any stoarge server in +# a group <= reserved_storage_space, +# no file can be uploaded to this group. +# bytes unit can be one of follows: +### G or g for gigabyte(GB) +### M or m for megabyte(MB) +### K or k for kilobyte(KB) +### no unit for byte(B) +### XX.XX% as ratio such as reserved_storage_space = 10% +reserved_storage_space = 1% + +#standard log level as syslog, case insensitive, value list: +### emerg for emergency +### alert +### crit for critical +### error +### warn for warning +### notice +### info +### debug +log_level=info + +#unix group name to run this program, +#not set (empty) means run by the group of current user +run_by_group= + +#unix username to run this program, +#not set (empty) means run by current user +run_by_user= + +# allow_hosts can ocur more than once, host can be hostname or ip address, +# "*" (only one asterisk) means match all ip addresses +# we can use CIDR ips like 192.168.5.64/26 +# and also use range like these: 10.0.1.[0-254] and host[01-08,20-25].domain.com +# for example: +# allow_hosts=10.0.1.[1-15,20] +# allow_hosts=host[01-08,20-25].domain.com +# allow_hosts=192.168.5.64/26 +allow_hosts=* + +# sync log buff to disk every interval seconds +# default value is 10 seconds +sync_log_buff_interval = 10 + +# check storage server alive interval seconds +check_active_interval = 120 + +# thread stack size, should >= 64KB +# default value is 64KB +thread_stack_size = 64KB + +# auto adjust when the ip address of the storage server changed +# default value is true +storage_ip_changed_auto_adjust = true + +# storage sync file max delay seconds +# default value is 86400 seconds (one day) +# since V2.00 +storage_sync_file_max_delay = 86400 + +# the max time of storage sync a file +# default value is 300 seconds +# since V2.00 +storage_sync_file_max_time = 300 + +# if use a trunk file to store several small files +# default value is false +# since V3.00 +use_trunk_file = false + +# the min slot size, should <= 4KB +# default value is 256 bytes +# since V3.00 +slot_min_size = 256 + +# the max slot size, should > slot_min_size +# store the upload file to trunk file when it's size <= this value +# default value is 16MB +# since V3.00 +slot_max_size = 16MB + +# the trunk file size, should >= 4MB +# default value is 64MB +# since V3.00 +trunk_file_size = 64MB + +# if create trunk file advancely +# default value is false +# since V3.06 +trunk_create_file_advance = false + +# the time base to create trunk file +# the time format: HH:MM +# default value is 02:00 +# since V3.06 +trunk_create_file_time_base = 02:00 + +# the interval of create trunk file, unit: second +# default value is 38400 (one day) +# since V3.06 +trunk_create_file_interval = 86400 + +# the threshold to create trunk file +# when the free trunk file size less than the threshold, will create +# the trunk files +# default value is 0 +# since V3.06 +trunk_create_file_space_threshold = 20G + +# if check trunk space occupying when loading trunk free spaces +# the occupied spaces will be ignored +# default value is false +# since V3.09 +# NOTICE: set this parameter to true will slow the loading of trunk spaces +# when startup. you should set this parameter to true when neccessary. +trunk_init_check_occupying = false + +# if ignore storage_trunk.dat, reload from trunk binlog +# default value is false +# since V3.10 +# set to true once for version upgrade when your version less than V3.10 +trunk_init_reload_from_binlog = false + +# the min interval for compressing the trunk binlog file +# unit: second +# default value is 0, 0 means never compress +# FastDFS compress the trunk binlog when trunk init and trunk destroy +# recommand to set this parameter to 86400 (one day) +# since V5.01 +trunk_compress_binlog_min_interval = 0 + +# if use storage ID instead of IP address +# default value is false +# since V4.00 +use_storage_id = false + +# specify storage ids filename, can use relative or absolute path +# since V4.00 +storage_ids_filename = storage_ids.conf + +# id type of the storage server in the filename, values are: +## ip: the ip address of the storage server +## id: the server id of the storage server +# this paramter is valid only when use_storage_id set to true +# default value is ip +# since V4.03 +id_type_in_filename = ip + +# if store slave file use symbol link +# default value is false +# since V4.01 +store_slave_file_use_link = false + +# if rotate the error log every day +# default value is false +# since V4.02 +rotate_error_log = false + +# rotate error log time base, time format: Hour:Minute +# Hour from 0 to 23, Minute from 0 to 59 +# default value is 00:00 +# since V4.02 +error_log_rotate_time=00:00 + +# rotate error log when the log file exceeds this size +# 0 means never rotates log file by log file size +# default value is 0 +# since V4.02 +rotate_error_log_size = 0 + +# keep days of the log files +# 0 means do not delete old log files +# default value is 0 +log_file_keep_days = 0 + +# if use connection pool +# default value is false +# since V4.05 +use_connection_pool = false + +# connections whose the idle time exceeds this time will be closed +# unit: second +# default value is 3600 +# since V4.05 +connection_pool_max_idle_time = 3600 + +# HTTP port on this tracker server +http.server_port=8080 + +# check storage HTTP server alive interval seconds +# <= 0 for never check +# default value is 30 +http.check_alive_interval=30 + +# check storage HTTP server alive type, values are: +# tcp : connect to the storge server with HTTP port only, +# do not request and get response +# http: storage check alive url must return http status 200 +# default value is tcp +http.check_alive_type=tcp + +# check storage HTTP server alive uri/url +# NOTE: storage embed HTTP server support uri: /status.html +http.check_alive_uri=/status.html + diff --git a/fastdfs.sh b/fastdfs.sh new file mode 100644 index 0000000000000000000000000000000000000000..4dc989f97dc1a8d48e1eb30c7002a39b0a41ad52 --- /dev/null +++ b/fastdfs.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +new_val=$FASTDFS_IPADDR +old="com.ikingtech.ch116221" +service_role=$SERVICE_ROLE + +sed -i "s/$old/$new_val/g" /etc/fdfs/client.conf +sed -i "s/$old/$new_val/g" /etc/fdfs/storage.conf +sed -i "s/$old/$new_val/g" /etc/fdfs/mod_fastdfs.conf + +cat /etc/fdfs/client.conf > /etc/fdfs/client.txt +cat /etc/fdfs/storage.conf > /etc/fdfs/storage.txt +cat /etc/fdfs/mod_fastdfs.conf > /etc/fdfs/mod_fastdfs.txt + +mv /usr/local/nginx/conf/nginx.conf /usr/local/nginx/conf/nginx.conf.t +cp /etc/fdfs/nginx.conf /usr/local/nginx/conf + +if [[ $service_role = 'tracker' ]]; +then + echo "start trackerd" + /etc/init.d/fdfs_trackerd start +fi + +if [[ $service_role = 'storage' ]]; +then + echo "start storage" + /etc/init.d/fdfs_storaged start +fi + +if [[ $service_role = 'all' ]]; +then + echo "start trackerd" + /etc/init.d/fdfs_trackerd start + echo "start storage" + /etc/init.d/fdfs_storaged start +fi + +echo "start nginx" +/usr/local/nginx/sbin/nginx + +tail -f /dev/null \ No newline at end of file diff --git a/k8s/linn-fds-storage-0-svc.yml b/k8s/linn-fds-storage-0-svc.yml new file mode 100644 index 0000000000000000000000000000000000000000..8812b3e25a94c4674010a12a1bb470e608298f5a --- /dev/null +++ b/k8s/linn-fds-storage-0-svc.yml @@ -0,0 +1,22 @@ +apiVersion: v1 +kind: Service +metadata: + name: linn-fds-storage-0-svc + namespace: production +spec: + clusterIP: 127.0.0.1 + ports: + - name: linn-fds-storage-0-svc-23000-23000 + port: 23000 + protocol: TCP + targetPort: 23000 + - name: linn-fds-storage-0-svc-8888-8888 + port: 8888 + protocol: TCP + targetPort: 8888 + selector: + app: linn-fds-storage-0 + sessionAffinity: None + type: ClusterIP +status: + loadBalancer: {} diff --git a/k8s/linn-fds-storage-0.yml b/k8s/linn-fds-storage-0.yml new file mode 100644 index 0000000000000000000000000000000000000000..35b347d532055f65f9286b4e6804414733ee4685 --- /dev/null +++ b/k8s/linn-fds-storage-0.yml @@ -0,0 +1,68 @@ +# +# Storage需要声明为有状态的pod. +# author: collin + +apiVersion: apps/v1 +kind: StatefulSet +metadata: + generation: 4 + labels: + app: linn-fds-storage-0 + name: linn-fds-storage-0 + namespace: production +spec: + podManagementPolicy: OrderedReady + replicas: 1 + revisionHistoryLimit: 10 + selector: + matchLabels: + app: linn-fds-storage-0 + # 指定service声明名称 + serviceName: linn-fds-storage-0-svc + template: + metadata: + labels: + app: linn-fds-storage-0 + spec: + containers: + # 指定的容器启动时候需要用到的参数 "docker run ... -e FASTDFS_IPADDR=linn-fds-tracker-svc.production -e SERVICE_ROLE=storage" + - env: + # 指向Tracker pod的 Service 地址。即在linn-fds-trakcer-svc.yml文件中声明的地址。 + - name: FASTDFS_IPADDR + value: linn-fds-tracker-svc.production + # 指定的容器启动时候需要用到的参数 "-e SERVICE_ROLE=storage" + - name: SERVICE_ROLE + value: storage + image: >- + [your image]:[version] + imagePullPolicy: IfNotPresent + name: linn-fds-storage-0 + ports: + - containerPort: 8888 + protocol: TCP + - containerPort: 23000 + protocol: TCP + - containerPort: 22122 + protocol: TCP + resources: + requests: + cpu: 250m + memory: 512Mi + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + # 需要实现声明名为volumeMounts.name的存储声明和存储类, storage claim and storage class + volumeMounts: + - mountPath: /home/dfs + name: volume-linn-fds-storage-data + dnsPolicy: ClusterFirst + restartPolicy: Always + schedulerName: default-scheduler + securityContext: {} + terminationGracePeriodSeconds: 30 + # 需要实现声明名为volumeMounts.name的存储声明和存储类, storage claim and storage class + volumes: + - name: volume-linn-fds-storage-data + persistentVolumeClaim: + claimName: linn-fds-storage-data + updateStrategy: + type: RollingUpdate diff --git a/k8s/linn-fds-tracker-svc.yml b/k8s/linn-fds-tracker-svc.yml new file mode 100644 index 0000000000000000000000000000000000000000..c88f2a8564416e741cc8a7c14e72c6f8a5c043fb --- /dev/null +++ b/k8s/linn-fds-tracker-svc.yml @@ -0,0 +1,30 @@ +apiVersion: v1 +kind: Service +metadata: + name: linn-fds-tracker-svc + namespace: production +spec: + clusterIP: 127.0.0.1 + externalTrafficPolicy: Cluster + ports: + - name: linn-fds-tracker-svc-22122-22122 + nodePort: 32022 + port: 22122 + protocol: TCP + targetPort: 22122 + - name: linn-fds-tracker-svc-8011-80 + nodePort: 32021 + port: 8011 + protocol: TCP + targetPort: 80 + - name: linn-fds-tracker-svc-8888-8888 + nodePort: 32020 + port: 8888 + protocol: TCP + targetPort: 8888 + selector: + app: linn-fds-tracker + sessionAffinity: None + type: NodePort +status: + loadBalancer: {} diff --git a/k8s/linn-fds-tracker.yml b/k8s/linn-fds-tracker.yml new file mode 100644 index 0000000000000000000000000000000000000000..89b74575cbc8f5d39d8db8ea81e52a12edfae1f7 --- /dev/null +++ b/k8s/linn-fds-tracker.yml @@ -0,0 +1,67 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + deployment.kubernetes.io/revision: '3' + generation: 5 + labels: + app: linn-fds-tracker + name: linn-fds-tracker + namespace: production +spec: + progressDeadlineSeconds: 600 + replicas: 1 + revisionHistoryLimit: 10 + selector: + matchLabels: + app: linn-fds-tracker + strategy: + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + type: RollingUpdate + template: + metadata: + labels: + app: linn-fds-tracker + spec: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + # k8s node 机器ip, 可以指定一个或多个节点。 + - 127.0.0.1 + - 127.0.0.1 + containers: + # 指定的容器启动时候需要用到的参数 "docker run ... -e FASTDFS_IPADDR=linn-fds-tracker-svc.production -e SERVICE_ROLE=storage" + - env: + - name: FASTDFS_IPADDR + value: linn-fds-tracker-svc + - name: SERVICE_ROLE + value: tracker + image: >- + [your image]:[version] + imagePullPolicy: IfNotPresent + name: linn-fds-tracker + ports: + - containerPort: 8888 + protocol: TCP + - containerPort: 22122 + protocol: TCP + - containerPort: 80 + protocol: TCP + resources: + requests: + cpu: 250m + memory: 512Mi + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + dnsPolicy: ClusterFirst + restartPolicy: Always + schedulerName: default-scheduler + securityContext: {} + terminationGracePeriodSeconds: 30 diff --git a/source/fastdfs-nginx-module.zip b/source/fastdfs-nginx-module.zip new file mode 100644 index 0000000000000000000000000000000000000000..32a5af6090afc1d3e2178692725570a61c9d85a3 Binary files /dev/null and b/source/fastdfs-nginx-module.zip differ diff --git a/source/fastdfs.zip b/source/fastdfs.zip new file mode 100644 index 0000000000000000000000000000000000000000..bae7aaad52adbdd0d901db2b573b8ee527bc49e2 Binary files /dev/null and b/source/fastdfs.zip differ diff --git a/source/libfastcommon.zip b/source/libfastcommon.zip new file mode 100644 index 0000000000000000000000000000000000000000..f80fa9019c194a4aae5104cc710b12e0958f8612 Binary files /dev/null and b/source/libfastcommon.zip differ diff --git a/source/nginx-1.15.4.zip b/source/nginx-1.15.4.zip new file mode 100644 index 0000000000000000000000000000000000000000..e06daef1d6dc68ce4ec59854d3c1c538fc0438d7 Binary files /dev/null and b/source/nginx-1.15.4.zip differ diff --git "a/\346\236\204\345\273\272\345\222\214\344\275\277\347\224\250\350\257\264\346\230\216.md" "b/\346\236\204\345\273\272\345\222\214\344\275\277\347\224\250\350\257\264\346\230\216.md" new file mode 100644 index 0000000000000000000000000000000000000000..eea6e1427414442f4ee1487eed0895c11e2061e2 --- /dev/null +++ "b/\346\236\204\345\273\272\345\222\214\344\275\277\347\224\250\350\257\264\346\230\216.md" @@ -0,0 +1,30 @@ +# FastDFS Docker构建 + + + +## 前文 + +> 利用容器让一切基础服务简单化。效率就是一切。 + +本文介绍如何在centos中使用离线安装方式构建 fastDFS docker 镜像。 + +## 准备 + +1. 需要首先下载一些安装包 + - fastdfs.zip + - fastdfs-nginx-module.zip + - libfastcommon.zip + - nginx.zip + > [下载地址](127.0.0.1) + +2. 准备FastDFS相关配置文件和nginx配置文件。 + - client.conf + - http.conf + - mine.type + - mod_fastdfs.conf + - nginx.conf + - storage.conf + - tracker.conf + + +