tracker server and client:192.168.1.42

storage server:192.168.1.46

storage server:192.168.1.53

安装:

安装依赖包libfastcommon

安装fastDFS

需要关闭iptables、selinux

yum -y install epel-release

yum -y install git

下载地址:

git clone https://github.com/happyfish100/fastdfs.git

git clone https://github.com/happyfish100/libfastcommon.git

git clone https://github.com/happyfish100/fastdfs-nginx-module.git

tracker server配置:

[root@localhost ~]# cd libfastcommon-1.0.36
[root@localhost libfastcommon-1.0.36]# ./make.sh 
[root@localhost libfastcommon-1.0.36]# ./make.sh install
[root@localhost libfastcommon-1.0.36]#

[root@localhost ~]# cd fastdfs-5.0.10
[root@localhost fastdfs-5.0.10]# ./make.sh 
[root@localhost fastdfs-5.0.10]# ./make.sh install

cd /etc/fdfs/
cp tracker.conf.sample tracker.conf
vim  tracker.conf
修改配置文件
disabled=false        #启用配置文件
port=22122          #设置tracker的端口号
base_path=/data/fastdfs/trackerd   #设置tracker的数据文件和日志目录(需预先创建)
http.server_port=18080     #设置http端口号
 
cp client.conf.sample  client.conf
vim client.conf
base_path=/data/fastdfs/trackerd
tracker_server=192.168.1.42:22122
 
启动:
mkdir -p /data/fastdfs/trackerd
/usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf restart
设置开机启动
echo '/usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf restart' >> /etc/rc.d/rc.local
 
 
storage server配置:

[root@localhost ~]# cd libfastcommon-1.0.36
[root@localhost libfastcommon-1.0.36]# ./make.sh 
[root@localhost libfastcommon-1.0.36]# ./make.sh install
[root@localhost libfastcommon-1.0.36]#

[root@localhost ~]# cd fastdfs-5.0.10
[root@localhost fastdfs-5.0.10]# ./make.sh 
[root@localhost fastdfs-5.0.10]# ./make.sh install

cd /etc/fdfs/
cp tracker.conf.sample tracker.conf
vim  tracker.conf
修改配置文件
disabled=false        #启用配置文件
port=23000    
base_path=/data/fastdfs/storage
store_path0=/data/fastdfs/storage
http.server_port=18888     #设置http端口号
tracker_server=192.168.1.42:22122
 
启动:
mkdir -p /data/fastdfs/trackerd
/usr/bin/fdfs_storaged /etc/fdfs/storage.conf restart
echo '/usr/bin/fdfs_storaged /etc/fdfs/storage.conf restart' >> /etc/rc.d/rc.local
 
 
storage server测试连接性:
/usr/bin/fdfs_monitor /etc/fdfs/storage.conf

 

 tracker server测试上传下载:
 fdfs_upload_file /etc/fdfs/client.conf pom.xml      -----上传
fdfs_download_file /etc/fdfs/client.conf          -----下载

增加nginx upstream:

yum -y install epel-release

yum -y install nginx

位于http{}

 very good,晚上吃点好的去,啦啦啦啦!!!
 
 

Fastdfs 部署干货的更多相关文章

  1. FastDFS部署安装全过程

    你好!欢迎阅读我的博文,你可以跳转到我的个人博客网站,会有更好的排版效果和功能. 此外,本篇博文为本人Pushy原创,如需转载请注明出处:https://pushy.site/posts/153205 ...

  2. FastDFS部署

    环境: CentOS 7 FastDFS 5.05 Nginx 1.10 fastdfs-nginx-module_v1.16 libfastcommon-1.0.7 libevent-2.0.21- ...

  3. FastDFS的配置、部署与API使用解读(7)Nginx的FastDFS模块(转)

    1.Nginx的FastDFS模块什么作用? 我们在使用FastDFS部署一个分布式文件系统的时候,通过FastDFS的客户端API来进行文件的上传.下载.删除等操作.同时通过 FastDFS的HTT ...

  4. FastDFS为什么要结合Nginx

    FastDFS为什么要结合Nginx? 我们在使用FastDFS部署一个分布式文件系统的时候,通过FastDFS的客户端API来进行文件的上传.下载.删除等操作.同时通过FastDFS的HTTP服务器 ...

  5. FastDFS分布式存储实战

    <FastDFS分布式存储实战> 技术选型 FastDFS相关组件及原理 FastDFS介绍 FastDFS架构 FastDFS工作流程 上传 同步机制 下载 文件合并原理 实验环境说明 ...

  6. linux上安装fastdfs+nginx+ngin-module实践并解决多个异常篇

    为什么选择Nginx Nginx 是一个很牛的高性能Web和反向代理服务器, 它具有有很多非常优越的特性: 在高连接并发的情况下,Nginx是Apache服务器不错的替代品:Nginx在美国是做虚拟主 ...

  7. CentOS7搭建FastDFS V5.11分布式文件系统-第三篇

    1.测试 前面两篇博文已对FastDFS的安装和配置,做了比较详细的讲解.FastDFS的基础模块都搭好了,现在开始测试下载. 1.1 配置客户端 同样的,需要修改客户端的配置文件: /etc/fdf ...

  8. fastdfs+nginx+image_filter安装与生成缩略图

    fastdfs简介 类似google FS的一个轻量级分布式文件系统,纯C实现,支持linux.FreeBSD等UNIX系统: 只能通过API访问,不支持POXIS: 文件不分块存储,上传的文件和OS ...

  9. fastdfs5.11+centos7.2 按照部署(三)【转载】

    1.测试 前面两篇博文已对FastDFS的安装和配置,做了比较详细的讲解.FastDFS的基础模块都搭好了,现在开始测试下载. 1.1 配置客户端 同样的,需要修改客户端的配置文件: vim /etc ...

随机推荐

  1. python创建目录并更改权限的代码

    如下代码段是关于python创建目录并更改权限的代码. import os os.mkdir("foo", 0666)

  2. Python——模块以及导入注意事项

    在Python中,每一个文件都应该是可以被导入的. 每一个独立的python文件都是一个模块 在导入文件时,文件中所有没有任何缩进的代码都会被执行一遍. 而在实际应用时,每个模块都是有专人负责独立开发 ...

  3. 批处理 进行svn代码拉取,vs编译,dotfuscator混淆

    Dotfuscator的使用:https://www.cnblogs.com/aitong/p/10684004.html 从拉取代码,编译到最后的混淆步骤很多.这时就可以使用批处理来进行自动化. 用 ...

  4. 原子操作类AtomicInteger详解

    为什么需要AtomicInteger原子操作类?对于Java中的运算操作,例如自增或自减,若没有进行额外的同步操作,在多线程环境下就是线程不安全的.num++解析为num=num+1,明显,这个操作不 ...

  5. RHCE 入门 第一篇

    随着工作压力越来越大,我们越需要技术储备. 从2017年10月14日开始参加RHCE培训

  6. linux下对应mysql数据库的常用操作

    ssh管理工具连接mysql数据库. 一.连接mysql数据库: 通过shh管理工具,登录linux的用户名,密码,进入ssh的命令行界面后,执行如下命令: mysql -u 数据库用户名 -p 然后 ...

  7. 【微信小程序】采坑之scroll-view组件

    一.摘要 今天在使用scroll-view组件的时候发现结果跟预想的不一样.其实也不是第一次用了,同样的写法却出现了意料之外的效果,所以认定是bug了.博主使用的是2.3.0版本,所以之前的版本应该也 ...

  8. haproxy 503 service unavailable no server is avaible to handle this request

    原因: haproxy 对server检测时是对默认页面进行检测,如果没有默认错误,则直接报503错误,不会转发到相应的server上去. 解决方法: 添加 option httpchk 检测页面位置 ...

  9. 使用YUM安装MySQL 5.5(适用于CentOS6.2/5.8及Fedora 17/16平台)

    目前CentOS/Red Hat (RHEL) 6.2官方自带的mysql版本为5.1,mysql5.5已经出来了. 相比mysql5.1,mysql5.5不仅在多个方面进行了改进: 性能上有了很大提 ...

  10. 【极客学院-idea教程】

    极客学院idea教程: http://whudoc.qiniudn.com/2016/IntelliJ-IDEA-Tutorial/index.html