FastDFS5.0.9基本安装配置

1、在线安装依赖

     rm -f master.zip

     wget https://github.com/happyfish100/libfastcommon/archive/master.zip

     unzip master.zip

     cd libfastcommon-master

  ./make.sh
  ./make.sh install
2、安装FastDFS
  rm -f master.zip
  wget https://github.com/happyfish100/fastdfs/archive/master.zip
  unzip master.zip
  cd fastdfs-master
  ./make.sh
  ./make.sh install
3、配置
cd /etc/fdfs
四个文件去掉后缀 .sample
client.conf  storage.conf  storage_ids.conf  tracker.conf
创建配置文件目录
mkdir -p /opt/fastdatas/base
  mkdir /opt/fastdatas/client
  mkdir /opt/fastdatas/storage
  mkdir /opt/fastdatas/tracker
修改/etc/fdfs/tracker.conf配置项
  base_path=/opt/fastdatas/tracker
修改/etc/fdfs/storage.conf
  base_path=/opt/fastdatas/storage
  tracker_server=本机局域网IP:2212
修改/etc/fdfs/client.conf
base_path=/opt/fastdatas/client
store_lookup=1
store_group=group1
store_path0=/opt/fastdatas/storage
tracker_server=本机局域网IP:22122
注:非负载均衡模式下暂时指定group1
4、启动FastDFS
服务启动方式
service fdfs_trackerd start
   service fdfs_storaged start
执行ps -ef|grep fdfs显示
  /usr/bin/fdfs_storaged /etc/fdfs/storage.conf
/usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf
或者手工启动
cd /opt/fastdfs-master
tracker: ./init.d/fdfs_trackerd start /etc/fdfs/tracker.conf
storage: ./init.d/fdfs_storage start /etc/fdfs/storage.conf
执行ps -ef|grep fdfs显示
/usr/bin/fdfs_storaged /etc/fdfs/storage.conf
/usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf
5、测试
  cd /opt/fastdfs-master/conf
  fdfs_test /etc/fdfs/client.conf upload ./anti-steal.jpg
显示:
This is FastDFS client test program v5.10

Copyright (C) 2008, Happy Fish / YuQing

FastDFS may be copied only under the terms of the GNU General
Public License V3, which may be found in the FastDFS source kit.
Please visit the FastDFS Home Page http://www.csource.org/ 
for more detail.

DEBUG - base_path=/appdata/fastdatas/client, connect_timeout=30, network_timeout=60, tracker_server_count=1, anti_steal_token=0, anti_steal_secret_key length=0, use_connection_pool=0, g_connection_pool_max_idle_time=3600s, use_storage_id=0, storage server id count: 0

tracker_query_storage_store_list_without_group: 
        server 1. group_name=, ip_addr=本机IP, port=23000

group_name=group1, ip_addr=本机IP, port=23000
storage_upload_by_filename
group_name=group1, remote_filename=M00/00/00/rB-EOFjzTAOANXR9AABdrZgsqUU431.jpg
source ip address: 本机IP
file timestamp=2017-04-16 18:48:35
file size=23981
file crc32=2553063749
example file url: http://本机IP/group1/M00/00/00/rB-EOFjzTAOANXR9AABdrZgsqUU431.jpg
storage_upload_slave_by_filename
group_name=group1, remote_filename=M00/00/00/rB-EOFjzTAOANXR9AABdrZgsqUU431_big.jpg
source ip address: 本机IP
file timestamp=2017-04-16 18:48:35
file size=23981
file crc32=2553063749
example file url: http://本机IP/group1/M00/00/00/rB-EOFjzTAOANXR9AABdrZgsqUU431_big.jpg

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值