FastDFS搭建
来源:互联网 发布:如何玩转linux 编辑:程序博客网 时间:2024/05/18 03:01
FastDFS,作为一款开源的分布式文件系统,对文件进行管理,解决了大容量存储和负载均衡的问题。最近在项目中就应用了该系统作为图片服务器,下面来进行FastDFS的搭建。
一、准备
1、准备相关文件:fastdfs-5.05.tar.gz 、fastdfs-nginx-module_v1.16.tar.gz 、 libfastcommon-1.0.7.tar.gz
2、需要安装libevent工具包
使用命令: yum -y install libevent
二、安装
1、安装libfastcommon-1.0.7工具包
使用命令:(1)./make.sh (2)./make.sh install
2、安装Tracker服务
首先使用 ./make.sh 和./make.sh install 两个命令安装服务,然后进行配置。
将/root/fastdfs-5.05/conf目录下的所有配置文件拷贝到/etc/fdfs下
配置Tracker服务,修改/etc/fdfs/tracker.conf文件,将路径设置为本地home文件夹下真实存在的文件夹。修改如下:
配置好之后,启动Tracker服务:
/usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf
3、安装Storage服务
Tracker服务安装好之后,在拷贝后的目录下有storage的配置文件(如果Storage服务与Tracker服务不在同一服务器上,则需要重复Tracker安装中配置文件之前的步骤),如下:
修改storage.conf文件,在home文件创建存储的文件夹,本次使用/home/fastdfs/storage;tracker服务的地址为当前ip地址:
启动storage服务:
/usr/bin/fdfs_storaged /etc/fdfs/storage.conf
4、安装nginx
上两篇博客已经介绍了nginx的内容及安装,此处不再重复。
三、测试
1、修改client配置文件,在home下创建文件夹/fastdfs/client
2、使用上传命令:
/usr/bin/fdfs_test /etc/fdfs/client.conf upload anti-steal.jpg
查看本地/home/fastdfs/storage下的data/00/00下可以找到上传的文件
至此,FastDFS的搭建就完成了,至于其中的一些命令及FastDFS的实现原理还需进一步学习和研究。
- FastDFS搭建
- FastDFS搭建
- FastDFS搭建
- FastDFS的搭建
- fastdfs环境搭建
- FastDFS集群服务器搭建
- Linux中搭建fastDFS
- ngnix、fastdfs搭建文件服务器
- 搭建fastdfs文件系统
- 文件服务器-FastDFS搭建
- FastDFS环境搭建使用
- fastdfs集群搭建
- FastDFS 文件服务器搭建
- 【linux】搭建fastdfs
- FastDFS简介及搭建
- FastDfs的搭建
- nginx fastDFS 搭建安装
- 【Nginx】FastDFS搭建
- Spring通过@Value注解注入属性的几种方式
- OpenGL在vs2015上的配置(蓝宝书win10)
- JetBrains套装免费学生授权申请(IntelliJ, WebStorm...)
- IO流_把集合中的数据存储到文本文件案例
- IDEA创建MAVEN WEB项目问题
- FastDFS搭建
- OSI模型;TCP/IP
- noi-7904-陶陶摘苹果
- Android实战——jsoup实现网络爬虫,糗事百科项目的起步
- eclipse 安装反编译工具
- 适配器设计模式(Adapter Pattern)
- Oracle数据库
- Ajax三级联动下拉选择省市区
- 【SocketIO】笔记