FastDFS 安装配置

FastDFS 安装配置

测试服务器:

Tracker Server:192.168.1.100

Storage Server:192.168.1.101 192.168.1.102

 

在所有测试安装libevent, FastDFS

1.  安装libevent

wget http://monkey.org/~provos/libevent-1.4.14b-stable.tar.gz
tar zxvf libevent-1.4.14b-stable.tar.gz
cd libevent-1.4.14b-stable
./configure
make
make install
2.  安装
wget http://code.google.com/p/fastdfs/downloads/detail?name=FastDFS_v2.04.tar.gz&can=2&q=
tar zxvf FastDFS_v2.04.tar.gz
cd FastDFS
./make.sh  将#WITH_HTTPD=1 修改成WITH_HTTPD=1 以支持 http
./make.sh install
可能出现的问题:
./fdfs_trackerd: error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory
 原因: 找不到libevent-1.4.so.2
解决办法:
1.vim /etc/ld.so.conf.d/libevent-i386.conf
2.加入 /usr/local/lib/
3.重新加载命令:ldconfig
3.  在192.168.1.100上
mkdir /home/fastdfs
vi /etc/fdfs/tracker.conf
base_path=/home/yuqing/fastdfs  修改为:base_path=/home/fastdfs
##include http.conf  修改为:#include http.conf
4.  启动Tracker  
 /usr/local/bin/fdfs_trackerd /etc/fdfs/tracker.conf
检查tracker是否启动成功,可以查看如下文件/home/fastdfs/logs/trackerd.log
5.  在192.168.1.101 192.168.1.102
mkdir /home/fastdfs/fdfs_storage

cd /etc/fdfs

vi storage.conf

或者 vim /etc/fdfs/storage.conf

base_path=/home/yuqing/fastdfs 修改为: /home/fastdfs/fdfs_storage

store_path0=/home/yuqing/fastdfs 修改为: store_path0=/home/fastdfs/fdfs_storage

tracker_server=192.168.209.121:22122 修改为 tracker_server=192.168.1.100:22122

##include http.conf  修改为:#include http.conf

 

6.      启动Storage命令:

 /usr/local/bin/fdfs_storaged /etc/fdfs/storage.conf

接下来会出现很多mkdir data path,这是系统在创建数据目录.

7.  测试以及使用FastDFS

FastDFS之配置client

vi /etc/fdfs/client.conf

base_path=/home/yuqing/fastdfs 修改为: base_path=/home/fastdfs

tracker_server=192.168.209.121:22122 修改为: tracker_server=192.168.1.100:22122

##include http.conf  修改为: #include http.conf

 

上传命令:

fdfs_test /etc/fdfs/client.conf  upload memcached-1.2.6-win32-bin.zip

 

返回结果:

http://192.168.64.221:8080/group2/M00/00/00/wKg_dlA7I6eD6UlnAACQG__7Gs8199_big.zip


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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值