背景描述
OS
CentOS-6.3_x86-64
tracker
192.168.0.10
storage
192.168.0.11
1,安装libevent
wget https://github.com/downloads/libevent/libevent/libevent-2.0.20-stable.tar.gz
tar xvzf libevent-2.0.20-stable.tar.gz
./configure
make
make install
将库文件链接到/lib64
ln -s /usr/local/lib/libevent-2.0.so.5 /lib64/libevent-2.0.so.5
[iyunv@davidserver ~]# vim /etc/fdfs/client.conf
vi /etc/fdfs/client.conf
base_path=/home/yuqing/fastdfs-> base_path=/opt/fastdfs
tracker_server=192.168.209.121:22122 -> tracker_server=192.168.0.10:22122
##include http.conf ->#include http.conf
上传
[iyunv@davidserver ~]# /usr/local/bin/fdfs_test /etc/fdfs/client.conf upload FastDFS_v3.03.tar.gz
This is FastDFS client test program v3.11
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.
[2012-09-12 15:43:03] DEBUG - base_path=/opt/fastdfs, 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=192.168.0.11, port=23000
group_name=group1, ip_addr=192.168.0.11, port=23000
storage_upload_by_filename
group_name=group1, remote_filename=M00/00/00/CAAAC1BQPQqy0zXVAAWp7X_1XGc.tar.gz
source ip address: 192.168.0.11
file timestamp=2012-09-12 15:43:06
file size=371181
file crc32=2146786407
file url: http://192.168.0.10:8080/group1/M00/00/00/CAAAC1BQPQqy0zXVAAWp7X_1XGc.tar.gz
storage_upload_slave_by_filename
group_name=group1, remote_filename=M00/00/00/CAAAC1BQPQqy0zXVAAWp7X_1XGc_big.tar.gz
source ip address: 8.0.0.11
file timestamp=2012-09-12 15:43:06
file size=371181
file crc32=2146786407
file url: http://192.168.0.10:8080/group1/M00/00/00/CAAAC1BQPQqy0zXVAAWp7X_1XGc_big.tar.gz