- 论坛徽章:
- 0
|
本帖最后由 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吧,请各位给指点下哪里配置错了。谢谢!
|
|