fastDFS安装手册
来源:互联网 发布:淘宝无线端链接转化 编辑:程序博客网 时间:2024/06/17 21:06
流行的开源分布式文件系统有很多,介绍如下: mogileFS:Key-Value型元文件系统,不支持FUSE,应用程序访问它时需要API,主要用在web领域处理海量小图片,效率相比mooseFS高很多。fastDFS:国人在mogileFS的基础上进行改进的key-value型文件系统,同样不支持FUSE,提供比mogileFS更好的性能。mooseFS:支持FUSE,相对比较轻量级,对master服务器有单点依赖,用perl编写,性能相对较差,国内用的人比较多glusterFS:支持FUSE,比mooseFS庞大ceph:支持FUSE,客户端已经进入了linux-2.6.34内核,也就是说可以像ext3/rasierFS一样,选择ceph为文件系统。彻底的分布式,没有单点依赖,用C编写,性能较好。基于不成熟的btrfs,其本身也非常不成熟。lustre:Oracle公司的企业级产品,非常庞大,对内核和ext3深度依赖NFS:老牌网络文件系统,具体不了解,反正NFS最近几年没发展,肯定不能用。
一、安装libevent
首先检查依赖环境gcc安装没有,如果没有安装,先安装
fastDFS需要安装libevent比较新的版本,将本机的比较低的版本卸载了。
查看是否已安装,如果已安装且版本低于1.3,则先进行卸载。安装一个最新稳定版
为libevent创建软链接到/lib库下,64位系统对应/lib64
二、安装FastDFS
三、配置FastDFS
环境:tracker server192.168.1.5storage server192.168.1.51192.168.1.52 1、配置并启动 tracker server配置 tracker.conf
启动 tracker
设置开机启动
2、配置并启动 storage server配置 storage.conf
启动 storage
设置开机启动
3、为storage节点安装fastdfs-nginx-module模块①安装模块安装Nginx详见:需重新编译Nginx
②配置编辑nginx.conf
拷贝mod_fastdfs.conf 到 /etc/fdfs/并编辑
如果需要上传之后访问路径包含group1,则需要配置mod_fastdfs.conf配置文件如下:
启动nginx:
如果需要重启nginx,命令如下:
四、使用FastDFS
1、上传文件FastDFS安装包中,自带了客户端程序,通过程序可以进行文件上传。在使用这个客户端程序之前,首先需要配置client.conf,然后再进行文件上传及下载。在tracker上修改客户端配置文件client.conf 如果需要支持外网访问需要用真实的IPvim a.htmlThis Is FastDFS Test.上传文件
This is FastDFS client test program v3.06 Copyright (C) 2008, Happy Fish / YuQing FastDFS may be copied only under the terms of the GNU GeneralPublic 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-04-29 12:42:53] INFO - base_path=/data/tracker, 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.1.51, port=23000server 2. group_name=group1, ip_addr=192.168.1.52, port=23000 group_name=group1, ip_addr=192.168.1.51, port=23000storage_upload_by_filenamegroup_name=group1, remote_filename=M00/00/00/wKgBM0-cxs32qFyYAAAADigvbpc90.htmlsource ip address: 192.168.1.51file timestamp=2012-04-29 12:42:53file size=14file crc32=674197143file url: http://192.168.1.5/group1/M00/00/00/wKgBM0-cxs32qFyYAAAADigvbpc90.htmlstorage_upload_slave_by_filenamegroup_name=group1, remote_filename=M00/00/00/wKgBM0-cxs32qFyYAAAADigvbpc90_big.htmlsource ip address: 192.168.1.51file timestamp=2012-04-29 12:42:53file size=14file crc32=674197143file url: http://192.168.1.5/group1/M00/00/00/wKgBM0-cxs32qFyYAAAADigvbpc90_big.html上传成功试试用 http://192.168.1.51/M00/00/00/wKgBM0-cxs32qFyYAAAADigvbpc90_big.html 访问看看吧。
五、FastDFS常见命令
1: 启动FastDFS
tracker: /usr/local/bin/fdfs_trackered /etc/fdfs/tracker.conf
storage: /usr/local/bin/fdfs_storaged /etc/fdfs/storage.conf
2:关闭FastDFS
tracker:/usr/local/bin/stop.sh /usr/local/bin/fdfs_tracker
storage:/usr/local/bin/stop.sh /usr/local/bin/fdfs_storage
或者 killall fdfs_trackered(storaged) -------注意,千万不要使用-9强行杀死进程。
3:重启FastDFS
4:查看集群情况
在任意一台storage(tracker也可以) /usr/local/bin/fdfs_monitor /etc/fdfs/storage.conf
5:删除一个storage:
在任意一台storage(tracker也可以) /usr/local/bin/fdfs_monitor /etc/fdfs/storage.conf delete group2 20.12.1.73
tracker: /usr/local/bin/fdfs_trackered /etc/fdfs/tracker.conf
storage: /usr/local/bin/fdfs_storaged /etc/fdfs/storage.conf
2:关闭FastDFS
tracker:/usr/local/bin/stop.sh /usr/local/bin/fdfs_tracker
storage:/usr/local/bin/stop.sh /usr/local/bin/fdfs_storage
或者 killall fdfs_trackered(storaged) -------注意,千万不要使用-9强行杀死进程。
3:重启FastDFS
在任意一台storage(tracker也可以) /usr/local/bin/fdfs_monitor /etc/fdfs/storage.conf
5:删除一个storage:
在任意一台storage(tracker也可以) /usr/local/bin/fdfs_monitor /etc/fdfs/storage.conf delete group2 20.12.1.73
阅读全文
0 0
- fastDFS安装手册
- 分布式存储系统FastDFS手册之二安装配置
- FastDfs (四) Fastdfs安装
- 【FastDFS】FastDFS安装配置
- fastdfs接入手册
- fastdfs安装
- 安装FastDFS
- fastdfs安装
- fastdfs安装
- FastDFS安装
- fastDFS安装
- fastDFS 安装
- fastDFS安装
- FastDFS安装
- fastdfs安装
- fastDFS安装
- 安装FastDFS
- 安装FastDfs
- 根据网络url图片路径获取图片字节数组工具类
- jQuery常用方法(持续更新)
- 顺序表
- 逻辑回归
- Linux字符设备驱动v1.0
- fastDFS安装手册
- cas sso 4.0 集成OAuth,用微信登陆示例
- JMockit入门
- boost之Boost.Foreach遍历
- 异常java.lang.IllegalArgumentException: Validation failed for query for method public abstract
- LC-Baseball Game
- [Linux/Ubuntu] vi/vim 使用方法讲解
- 语音听写(识别)
- nginx开启stub_status模块配置方法