FastDfs的搭建
一、什么是FastDFS
FastDFS是用c语言编写的一款开源的分布式文件系统。FastDFS为互联网量身定制,充分考虑了冗余备份、负载均衡、线性扩容等机制,并注重高可用、高性能等指标,使用FastDFS很容易搭建一套高性能的文件服务器集群提供文件上传、下载等服务。
(1)安装环境
yum install gcc-c++
(2)安装libevent
yum -y install libevent-devel
(3)安装libfastcommon
(4)./make.sh
(5)./make.sh install
(6)将/usr/lib64下的库文件拷贝至/usr/lib下(libfastcommon安装好后会自动将库文件拷贝至/usr/lib64下,由于FastDFS程序引用usr/lib目录所以需要将/usr/lib64下的库文件拷贝至/usr/lib下。)
(7)安装FastDFS
1.解压
2. ./make.sh
3. ./make.sh install
4.将FastDFS下的conf下面的文件全部拷贝到 /etc/fdfs
(8)修改配置文件
将
base_path=/home/yuqing/fastdfs
改为:
base_path=/home/fastdfs
自己需要手动在home下建一个fastdfs目录
启动:/usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf restart
注:至此,tracker就安装完成了,本人将tracker和storage安装在同一台机器上,如果要将storage安装在另外一台机器上,则重复上述一到7步即可
(9)修改storage的配置文件。
修改
group_name=group1
base_path=/home/yuqing/FastDFS改为:base_path=/home/FastDFS
store_path0=/home/yuqing/FastDFS改为:store_path0=/home/FastDFS/fdfs_storage
#如果有多个挂载磁盘则定义多个store_path,如下
#store_path1=.....
#store_path2=......
tracker_server=192.168.206.131:22122 #配置tracker服务器:IP
#如果有多个则配置多个tracker
tracker_server=192.168.206.131:22122
(10)启动storage
/usr/bin/fdfs_storaged /etc/fdfs/storage.conf restart
最新文章
- HTML5 Drop API
- ABAP SPLIT
- 【Cocos2d-x 3.x】 精灵帧缓存和纹理缓存
- 2005 TCO Online Round 1 - RectangleError
- IIS 伪静态配置(安装ISAPI_Rewrite配置)
- Set接口
- startssl,免费的ssl证书申请及注意事项
- linux网络配置相关命令、虚拟网络接口eth0:0
- Nodejs开发指南-笔记
- int* V.S. int[]
- ng-model 指令
- iOS高仿城觅应用客户端项目(开发思路和代码)
- 编译Boost 详细步骤
- Java web 基础
- python使用easygui写图形界面程序
- Windows Server 2012 安装dll到GAC
- Alibaba, I'm interested in you.
- submit提交判断
- 【Spring】入门HelloWorld
- 使用 Kubeadm 升级 Kubernetes 版本