单节点配置FastDFS

FastDFS单点配置

单节点配置FastDFS

1.准备

系统:CentOS 5.7 32

Libeventlibevent-2.0.16-stable.tar.gz

FastDFSFastDFS_v3.06.tar.gz

Maleyum -y install make

2.安装Libevent

解压libevent-2.0.16-stable.tar.gz tar -zxvf  libevent-2.0.16-stable.tar.gz

新建目录libevent:用于放置libevent编译出来的文件

配置:在libevent-2.0.16-stable目录中执行:

./configure --prefix=/usr/xinwei/libevent

注:/usr/xinwei/libevent目录需要新建,不能设置libevent-2.0.16-stable目录,否则上传时会出错

Make: cd libevent-2.0.16-stable/  然后执行:make

安装:make install

执行完毕后再之前新建的libevent目录中会生成binincludelib三个目录

3.安装FastDFS

解压FastDFS_v3.06.tar.gztar -zxvf  FastDFS_v3.06.tar.gz

配置1vi make.sh

修改:

TARGET_PREFIX=/usr/local

TARGET_CONF_PATH=/etc/fdfs

WITH_HTTPD=1

WITH_LINUX_SERVICE=1

保存后退出

配置2:配置include的路径和lib的路径。均为之前新建目录libevent中的includelib

./make.sh C_INCLUDE_PATH=/usr/xinwei/libevent/include LIBRARY_PATH=/usr/xinwei/libevent/lib

Make:执行FastDFS目录中的make.sh文件  

安装:

cd FastDFS

./make.sh install

安装完成后在/etc/fdfs/目录中会生成配置文件,包含client.confhttp.confmime.typesstorage.conftracker.conf 

4.配置

需要对/etc/fdfs/目录中的client.confstorage.conftracker.conf 进行配置

Client.conf

base_path=/home/xinwei/fastdfs

tracker_server=192.168.113.234:22122

#include http.conf

Storage.conf

base_path=/home/xinwei/fastdfs

store_path0=/home/xinwei/fastdfs

tracker_server=192.168.113.234:22122
#include http.conf

Tracker.conf:

#include http.conf

配置完成后可进行启动:

5.启动

Service fdfs_storaged start

Service fdfs_trackerd start

6.测试

/usr/local/bin/fdfs_test /etc/fdfs/client.conf upload /usr/xinwei/test/test 

 

7.备注

(1).  FastDFSlog/home/xinwei/fastdfs/logs目录中

(2).  [2015-01-03 23:19:52] ERROR - file: ../common/fdfs_http_shared.c, line: 128, param "http.mime_types_filename" not exist or is empty 若出现该错误,则配置http.conf文件中:http.mime_types_filename=/etc/fdfs/mime.types

 

 

 

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值