免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1974 | 回复: 2
打印 上一主题 下一主题

[FastDFS] 请教非tracker跳转方式配置问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-07-29 20:27 |只看该作者 |倒序浏览
本帖最后由 liuwanbing1985 于 2012-07-29 22:56 编辑

非tracker跳转方式中tracker server上不启用内置的webserver,
# HTTP settings
http.disabled=true

# HTTP port on this tracker server
http.server_port=8080

##include http.conf


Storage  采用nginx+ fastdfs-nginx-module

配置大体如下
vi /etc/fdfs/storage.conf
# the name of the group this storage server belongs to
group_name=group1
base_path=/home/storage
# store_path#, based 0, if store_path0 not exists, it's value is base_path
# the paths must be exist
store_path0=/home/storage
# tracker_server can ocur more than once, and tracker_server format is
# "host:port", host can be hostname or ip address
tracker_server=172.16.23.177:22122
#HTTP settings
http.disabled=true
# the port of the web server on this storage server
http.server_port=80


扩展模块配置
cp /root/fastdfs-nginx-module/src/mod_fastdfs.conf /etc/fdfs/
vi /etc/fdfs/mod_fastdfs.conf
# the base path to store log files
base_path=/home/storage
# FastDFS tracker_server can ocur more than once, and tracker_server format is
# "host:port", host can be hostname or ip address
tracker_server=172.16.23.177:22122
# the group name of storage server
group_name=group1
# if uri including group name
# default value is false
url_have_group_name =true
# store_path#, based 0, if store_path0 not exists, it's value is base_path
# the paths must be exist
store_path0=/home/storage
# if need find content type from file extension name
# should set to false because it done by apache
http. need_find_content_type=true


测试客户端配置:
vi /etc/fdfs/client.conf

# the base path to store log files
base_path=/tmp

# tracker_server can ocur more than once, and tracker_server format is
#  "host:port", host can be hostname or ip address
tracker_server=172.16.23.177:22122

测试文件上传
/usr/local/bin/fdfs_test /etc/fdfs/client.conf upload google.txt

结果如下:
[2012-07-29 20:16:20] INFO - base_path=/tmp, connect_timeout=30, network_timeout=60, tracker_server_count=1, anti_steal_token=0, anti_steal_secret_key length=0

tracker_query_storage_store_list_without_group:
        server 1. group_name=group1, ip_addr=172.16.23.171, port=23000

group_name=group1, ip_addr=172.16.23.171, port=23000
storage_upload_by_filename
group_name=group1, remote_filename=M00/00/00/rBAXq1AVKXbcZivBAAAABp4gtvE206.txt
source ip address: 172.16.23.171
file timestamp=2012-07-29 20:15:50
file size=6
file crc32=2652944113
file url: http://172.16.23.177:8080/group1 ... BAAAABp4gtvE206.txt
storage_upload_slave_by_filename
group_name=group1, remote_filename=M00/00/00/rBAXq1AVKXbcZivBAAAABp4gtvE206_big.txt
source ip address: 172.16.23.171
file timestamp=2012-07-29 20:15:50
file size=6
file crc32=2652944113
file url: http://172.16.23.177:8080/group1 ... ABp4gtvE206_big.txt

返回地址如下为何还是出现了trackerserver的地址172.16.23.177:8080,如果是非tracker跳转方式是否应该是storageserver地址172.16.23.171吧,请各位给指点下哪里配置错了。谢谢!


论坛徽章:
4
2015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:56:11IT运维版块每日发帖之星
日期:2016-08-11 06:20:00IT运维版块每日发帖之星
日期:2016-08-15 06:20:00
2 [报告]
发表于 2012-07-30 17:24 |只看该作者
回复 1# liuwanbing1985

test返回的URL只是一个示例,不要较真儿!
后续版本将这个示例URL删除掉好了!

论坛徽章:
0
3 [报告]
发表于 2012-07-31 08:16 |只看该作者
回复 2# happy_fish100


    谢谢余老师,明白了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP