FastDFS搭建
a、上传安装时需要的文件
①:FastDFS_v5.05.tar.gz
②:fastdfs-nginx-module_v1.16.tar.gz
③:libfastcommon-1.0.7.tar.gz
④:nginx-1.8.0.tar.gz
b、安装FastDFS之前,先安装libevent
[root@localhost /]# yum -y install libevent
c、安装 libfastcommon-1.0.7.tar.gz 工具包
①:[root@localhost ~]# tar -zxvf libfastcommon-1.0.7
②:[root@localhost libfastcommon-1.0.7]# ./make.sh
③:[root@localhost libfastcommon-1.0.7]# ./make.sh install
④:把/usr/lib64/libfastcommon.so文件向/usr/lib/下复制一份
[root@localhost lib64]# cp /user/lib64/libfastcommon.so /user/lib
d、安装Tracker服务
①:[root@localhost ~]# tar -zxvf FastDFS_v5.05.tar.gz
②:[root@localhost FastDFS]# ./make.sh
③:[root@localhost FastDFS]# ./make.sh install
安装后在/usr/bin/目录下有以fdfs开头的文件都是编译出来的,配置文件都放到/etc/fdfs文件夹
④:把/root/FastDFS/conf目录下的所有的配置文件都复制到/etc/fdfs下
[root@localhost ~]# cp /root/FastDFS/conf /etc/fdfs -r
⑤:配置tracker服务。修改/etc/fdfs/tracker.conf文件。
⑥:启动tracker:/usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf
重启使用命令:/usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf restart
e、安装storage服务
①:如果是在不同的服务器安装,第四步的1~4需要重新执行
②:配置storage服务。修改/etc/fdfs/storage.conf文件
f、测试服务
①:修改配置文件/etc/fdfs/client.conf
②:测试
[root@localhost FastDFS]# /usr/bin/fdfs_test /etc/fdfs/client.conf upload anti-steal.jpg
g、搭建nginx提供http服务
①:[root@localhost ~]# tar -zxvf fastdfs-nginx-module_v1.16.tar.gz
②:[root@localhost ~]# tar -zxvf nginx-1.8.0.tar.gz
③:修改/root/fastdfs-nginx-module/src/config文件,把其中的local去掉
④:对nginx重新config
[root@localhost nginx-1.8.0]#
./configure \
--prefix=/usr/local/nginx \
--pid-path=/var/run/nginx/nginx.pid \
--lock-path=/var/lock/nginx.lock \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--with-http_gzip_static_module \
--http-client-body-temp-path=/var/temp/nginx/client \
--http-proxy-temp-path=/var/temp/nginx/proxy \
--http-fastcgi-temp-path=/var/temp/nginx/fastcgi \
--http-uwsgi-temp-path=/var/temp/nginx/uwsgi \
--http-scgi-temp-path=/var/temp/nginx/scgi \
--add-module=/root/fastdfs-nginx-module/src ⑤:[root@localhost nginx-1.8.0]# make
[root@localhost nginx-1.8.0]# make install
⑥:把/root/fastdfs-nginx-module/src/mod_fastdfs.conf文件复制到/etc/fdfs目录下
⑦:nginx的配置
在nginx的配置文件中添加一个Server:
server {
listen 80;
server_name 192.168.0.11; location /group1/M00/{
#root /home/FastDFS/fdfs_storage/data;
ngx_fastdfs_module;
}
}
⑧:将libfdfsclient.so拷贝至/usr/lib下
[root@localhost sbin]# cp /usr/lib64/libfdfsclient.so /usr/lib/
⑨:启动nginx
[root@localhost sbin]# ./nginx
h、启动FastDFS
①:启动tracker: /usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf
②:启动storage: /usr/bin/fdfs_storaged /etc/fdfs/storage.conf
致此结束……
关注我的公众号,精彩内容不能错过
FastDFS搭建的更多相关文章
- FastDFS搭建分布式文件系统
FastDFS搭建分布式文件系统 1. 什么是分布式文件系统 分布式文件系统(Distributed File System)是指文件系统管理的物理存储资源不一定直接连接在本地节点上,而是通过计算机网 ...
- [转帖]使用fastdfs搭建文件管理系统
使用fastdfs搭建文件管理系统 https://www.jianshu.com/p/4e80069c84d3 今天同事说他们的系统用到了这个分布式文件管理系统. 一.FastDFS介绍 FastD ...
- FastDFS搭建单机图片服务器(二)
防丢失转载:https://blog.csdn.net/MissEel/article/details/80856194 根据 分布式文件系统 - FastDFS 在 CentOS 下配置安装部署 和 ...
- FastDFS搭建单机图片服务器(一)
防丢失转载:https://blog.csdn.net/MissEel/article/details/80856194 根据 分布式文件系统 - FastDFS 在 CentOS 下配置安装部署 和 ...
- FastDFS搭建及java整合代码【转】
FastDFS软件介绍 1.什么是FastDFS FastDFS是用C语言编写的一款开源的分布式文件系统.FastDFS为互联网量身定制,充分考虑了冗余备份.负载均衡.线性扩容等机制,并注重高可用.高 ...
- Centos7下用FastDFS搭建图片服务器
1.所用到的工具: 1.FastDFS_v5.05.tar 2.fastdfs-nginx-module_v1.16.tar 3.libfastcommonV1.0.7.tar 4.nginx-1.1 ...
- FastDFS 搭建
#FastDFS安装方式 安装必要插件:libevent (此次搭建方案采用libevent 1.4.13) wget http://fastdfs.googlecode.com/files/F ...
- Centos7 FastDFS 搭建
安装libfastcommon 首先第一步是安装libfastcommon,我这里将libfastcommon上传到的/opt目录下,直接解压: yum -y install gcc-c++ yum ...
- FastDFS搭建文件管理系统
参考:https://www.cnblogs.com/chiangchou/p/fastdfs.html 目录: 一:FastDFS介绍 1:简介: FastDFS 是一个开源的高性能分布式文件系统( ...
随机推荐
- nohup和&后台运行,进程查看及终止
1.nohup 用途:不挂断地运行命令. 语法:nohup Command [ Arg … ] [ & ] 无论是否将 nohup 命令的输出重定向到终端,输出都将附加到当前目录的 nohup ...
- configSections必须是根节点下第一个节点
对webconfig文档进行配置,添加了一个节点configSectionS,添加时,我自个想,按节点的名称以字母排序,就放在appSettings节点下. 谁知,在程序运行时,出现了错误: 参考上面 ...
- 《http权威指南》读书笔记15
概述 最近对http很感兴趣,于是开始看<http权威指南>.别人都说这本书有点老了,而且内容太多.我个人觉得这本书写的太好了,非常长知识,让你知道关于http的很多概念,不仅告诉你怎么做 ...
- nginx服务器入门知识汇总
IP-hash 就是根据IP进行hash计算,然后分配到对应的服务器,好处就是不用session同步,固定IP会固定访问一台服务器,缺点就是恶意攻击,会造成某台服务器压垮.提供的服务不同,面向的地区不 ...
- java IO流之详细总结
什么是io流? 分为两种: 输入流:可以从文件中读取到程序,从源数据源读取到程序,叫做输入流. 输出流:可以从程序中读取到文件,从程序写,使用输出流,写入到文件中.叫做输出流. 使用File操作文件或 ...
- 树莓派连接不上WiFi
之前还好好的,突然连接不上WiFi,打开文件WiFi配置文件:/etc/wpa_supplicant/wpa_supplicant.conf发现有多个连接记录,把用到的留下,其他的删掉即可: sudo ...
- 利用 Linux tap/tun 虚拟设备写一个 ICMP echo 程序
本文首发于我的公众号 Linux云计算网络(id: cloud_dev),专注于干货分享,号内有 10T 书籍和视频资源,后台回复「1024」即可领取,欢迎大家关注,二维码文末可以扫. 前面两篇文章已 ...
- 毕业不到一年,绩效打了个D!
周末了,和大家来聊聊程序员工作态度的问题. 说说栈长的事迹吧,这是好多年前的事了,那时候,栈长才毕业不到一年,那次绩效打了个D!事后,我很气愤啊,我那时还在博客上写文章怒骂了部门经理,现在想起来,真是 ...
- 整理了一周的Python资料,包含各阶段所需网站、项目,收藏了慢慢来
这周应该有不少学校已经开学了,那么同学们都该动起来了,把家里面的那些懒习惯给扔掉了可以. 不知怎么的,最近不少关注我的读者都开始私信我怎么学好python?零基础转行是不是合适,还有希望吗?今年30了 ...
- python(leetcode)-1.两数之和
给定一个整数数组 nums 和一个目标值 target,请你在该数组中找出和为目标值的那 两个 整数,并返回他们的数组下标. 你可以假设每种输入只会对应一个答案.但是,你不能重复利用这个数组中同样的元 ...