系统:Gentoo-linux
Tracker Server:10.60.0.110 10.60.0.242
Storage Server:10.60.0.112 10.60.0.233 10.60.0.241
根据源代码中的INSTALL,FastDFS的安装非常简单。
1、安装
#wget http://fastdfs.googlecode.com/files/FastDFS_v1.11.tar.gz
#tar zxf FastDFS_v1.11.tar.gz
#cd FastDFS
#./make.sh
#mkdir /usr/local/include
#./make.sh install
2、配置文件
2.1 Tracker Server
#cat /etc/conf.d/FastDFS_tracker.conf
###start of tracker server config###
disabled=false
bind_addr=
port=22122
network_timeout=20
base_path=/ms/var/FastDFS
max_connections=256
#0: round robin
#1: specify group
#2: load balance
store_lookup=0
#when store_lookup set to 1(specify group), must set store_group to the group name
store_group=group1
#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)
reserved_storage_space = 4GB
#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,
# "*" means match all ip addresses, can use range like this: 10.0.1.[1-15,20] or
# 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=*
###end of tracker server config###
2.2 Storage Server
相同group的配置文件内容要一样
#cat /etc/conf.d/FastDFS_storage.conf
###start of storage server config###
disabled=false
group_name=group1
bind_addr=
port=23000
network_timeout=20
heart_beat_interval=30
stat_report_interval=600
base_path=/ms/var/FastDFS
sync_wait_msec=200
max_connections=256
tracker_server=10.60.0.110:22122
tracker_server=10.60.0.242: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,
# "*" means match all ip addresses, can use range like this: 10.0.1.[1-15,20] or
# 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=*
###end of storage server config###
3、启动
首先在Tracker Server和Storage Server上建立目录/ms/var/FastDFS
3.1 Tracker Server 启动
在10.60.0.110和10.60.0.242启动Tracker进程:
#/usr/local/bin/fdfs_trackerd /etc/conf.d/FastDFS_tracker.conf
3.2 Storage Server 启动
在10.60.0.112,10.60.0.233和10.60.0.241上启动storage进程:
#/usr/local/bin/fdfs_trackerd /etc/conf.d/FastDFS_storage.conf
4、测试
在一台Storage Server上运行
#/usr/local/bin/fdfs_test /etc/conf.d/FastDFS_storage.conf upload needed_upload_filename
本日志由 胡子 于 2007-11-03 11:30:34 发表,目前已经被浏览 1470 次,评论 1 次;
引用通告:http://21pt.com/Article/478/Trackback.ashx
受用, 感谢.
可是我已经有好几次直接关闭了,应该怎么办呢?之前登录的用户还在
小站http://kkk.sjhcx.com/的SEO布局不知如何,请博主有空指点
来访既是有缘。。留下足迹再走
不错,感人,给力
不错也~~~~
就是,就是,现在的电影就看票房,完全没社会责任心
其实对于这个问题,我们应该淡定,平常心,平常心。
写的不错, 兔年快乐喽!!
哇,春节快乐, 这几天玩过头了
Powered by Bitrac, Designed by Loveyuki, Icon by Led Icon Set. 京ICP备07032740号-2