FastDFS安装使用(二) 配置

FastDFS的配置文件在%FastDFS%/conf目录下,其中包括
Client.conf 客户端上传配置文件
Storage.conf 文件存储服务器配置文件
Tracker.conf 负责均衡调度服务器配置文件
http.conf http服务器配置文件
[size=large][color=blue]1、配置及启动Tracker Server[/color][/size]
1.1 修改%FastDFS%/conf/tracker.conf文件,修改如下
1)
base_path=/home/yuqing/fastdfs -> base_path=/fastdfs_tracker

#[color=red]可以自己指定目录位置,但目录必须存在,用于存储日志及storage server等信息,否则tracker server无法启动[/color]
1.2 将http.conf文件拷贝到/etc/fdfs目录下,执行
cp %FastDFS%/conf/http.conf /etc/fdfs/

注:[color=red]为了支持http,必须将这个文件拷贝到此目录,否则无法启动,报param http.XXX not exist or is empty类似的错误[/color]
1.3 进入%FastDFS%目录,启动tracker服务器,执行

fdfs_trackerd %FastDFS%/conf/tracker.conf

1.4 /fastdfs_tracker/logs/trackerd.log 查看tracker的启动日志,如果看到类似
2013-12-29 04:26:56] INFO - FastDFS v4.06, base_path=/fastdfs_tracker, run_by_group=, run_by_user=, connect_timeout=30s, network_timeout=60s, port=22122, bind_addr=, max_connections=256, work_threads=4, store_lookup=2, store_group=, store_server=0, store_path=0, reserved_storage_space=10.00%, download_server=0, allow_ip_count=-1, sync_log_buff_interval=10s, check_active_interval=120s, thread_stack_size=64 KB, storage_ip_changed_auto_adjust=1, storage_sync_file_max_delay=86400s, storage_sync_file_max_time=300s, use_trunk_file=0, slot_min_size=256, slot_max_size=16 MB, trunk_file_size=64 MB, trunk_create_file_advance=0, trunk_create_file_time_base=02:00, trunk_create_file_interval=86400, trunk_create_file_space_threshold=20 GB, trunk_init_check_occupying=0, trunk_init_reload_from_binlog=0, use_storage_id=0, id_type_in_filename=ip, storage_id_count=0, rotate_error_log=0, error_log_rotate_time=00:00, rotate_error_log_size=0, store_slave_file_use_link=0, use_connection_pool=0, g_connection_pool_max_idle_time=3600s
恭喜你,tracker server已经启动成功!
[size=large][color=blue]2、配置及启动Storage Server[/color][/size]
2.1 修改%FastDFS%/conf/storage.conf文件,修改如下:
base_path=/home/yuqing/fastdfs -> /fastdfs_storage
store_path0=/home/yuqing/fastdfs -> store_path0=/fastdfs_storage
tracker_server=192.168.209.121:22122 -> tracker_server=192.168.56.101:22122

进入%FastDFS%目录,启动storage服务器,执行

fdfs_storaged %FastDFS%/conf/storage.conf

2.2 进入/fastdfs_tracker/logs/storage.log查看storage服务器启动日志,如果看到类似
[2013-12-29 04:27:06] INFO - FastDFS v4.06, base_path=/fastdfs_storage, store_path_count=1, subdir_count_per_path=256, group_name=group1, run_by_group=, run_by_user=, connect_timeout=30s, network_timeout=60s, port=23000, bind_addr=, client_bind=1, max_connections=256, work_threads=4, disk_rw_separated=1, disk_reader_threads=1, disk_writer_threads=1, buff_size=256KB, heart_beat_interval=30s, stat_report_interval=60s, tracker_server_count=1, sync_wait_msec=50ms, sync_interval=0ms, sync_start_time=00:00, sync_end_time=23:59, write_mark_file_freq=500, allow_ip_count=-1, file_distribute_path_mode=0, file_distribute_rotate_count=100, fsync_after_written_bytes=0, sync_log_buff_interval=10s, sync_binlog_buff_interval=10s, sync_stat_file_interval=300s, thread_stack_size=512 KB, upload_priority=10, if_alias_prefix=, check_file_duplicate=0, file_signature_method=hash, FDHT group count=0, FDHT server count=0, FDHT key_namespace=, FDHT keep_alive=0, HTTP server port=8888, domain name=, use_access_log=0, rotate_access_log=0, access_log_rotate_time=00:00, rotate_error_log=0, error_log_rotate_time=00:00, rotate_access_log_size=0, rotate_error_log_size=0, file_sync_skip_invalid_record=0, use_connection_pool=0, g_connection_pool_max_idle_time=3600s
[2013-12-29 04:27:06] INFO - file: storage_param_getter.c, line: 187, use_storage_id=0, id_type_in_filename=ip, storage_ip_changed_auto_adjust=1, store_path=0, reserved_storage_space=10.00%, use_trunk_file=0, slot_min_size=256, slot_max_size=16 MB, trunk_file_size=64 MB, trunk_create_file_advance=0, trunk_create_file_time_base=02:00, trunk_create_file_interval=86400, trunk_create_file_space_threshold=20 GB, trunk_init_check_occupying=0, trunk_init_reload_from_binlog=0, store_slave_file_use_link=0
恭喜你,storage server已经启动成功!
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值