fastdfs源码包、libfastcommon源码包、nginx模块,我存放源码包于 /usr/local/src

 wget https://github.com/happyfish100/fastdfs/archive/V5.05.tar.gz
wget https://github.com/happyfish100/libfastcommon/archive/V1.0.7.tar.gz
wget https://github.com/happyfish100/fastdfs-nginx-module.git

按装之前,我们最好检查一下我们的依赖包,yum安装一下

 yum  -y install zlib zlib-devel pcre pcre-devel gcc gcc-c++ openssl openssl-devel libevent libevent-devel perl unzip net-tools wget

下一步是创建我们的安装目录,我习惯安装在/usr/local/ 目录下面。

 mkdir -p /usr/local/fastdfs/{storage,tracker}

安装libfastcommon库。

 tar -xzvf  libfastcommon-1.0.7.tar.gz
cd libfastcommon-1.0.7
./make.sh
./make.sh install

安装FastDFS

tar -zxvf V5.05.tar.gz
cd fastdfs-5.05/
./make.sh
./make.sh install

这步完成后我们就安装成功了!剩下的就是对tracker和storage、client。

cd /etc/fdfs     #配置文件都在这个目录
mv storage.conf.sample storage.conf
mv tracker.conf.sample tracker.conf
mv client.conf.sample client.conf

配置tracker:

bind_addr=192.168.32.11
base_path=/usr/local/fastdfs/tracker

配置storage:

group_name=group1
bind_addr=192.168.32.11
base_path=/usr/local/fastdfs/tracker
store_path0=/usr/local/fastdfs/storage
tracker_server=192.168.32.11:22122

配置client:

base_path=/usr/local/fastdfs/client    # 用于存储日志文件
tracker_server=192.168.32.11:22122

好啦!各位小伙伴,我们现在可以启动我们的服务去测试啦。

/usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf start
/usr/bin/fdfs_storaged /etc/fdfs/storage.conf start

上传并查看

/usr/bin/fdfs_test /etc/fdfs/client.conf upload /usr/include/stdlib.h

成功提示:

file size=34254
file crc32=2553486104example
file url: http://10.170.219.146:8080/group1/M00/00/00/CqrbklVRaTiAVsRkAACFzpgzGxg03754_big.h
存储目录在:
/home/yuqing/fastdfs/data/00/00/00/

作者:weiluoliang
链接:https://www.jianshu.com/p/04ba31ea10a1
來源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。

最新文章

  1. C++中typename和class的区别
  2. PHP经典算法
  3. 使用pgbench测试PostgreSQL
  4. cocos2dx 2.x 竖屏
  5. 【DWT笔记】傅里叶变换与小波变换
  6. insertAfter()
  7. python练习 根据日志中的ip和url排序
  8. CentOS7.1 JDK安装 和 CentOS7.1配置yum源
  9. VirtualBox中centos网络配置
  10. 迷宫问题python实现(靠右手摸墙)
  11. POJ 2240 Arbitrage(最短路 套汇)
  12. jquery跨域请求数据
  13. ubuntu16.04 uninstall cuda 9.0 completely and install 8.0 instead
  14. UOJ14 DZY Loves Graph 并查集
  15. PL/SQL Developer几个使用小技巧
  16. Spring 在+publicId+和+systemId+之间需要有空格
  17. OpenCV 学习笔记03 凸包convexHull、道格拉斯-普克算法Douglas-Peucker algorithm、approxPloyDP 函数
  18. ssh面密码登录配置-hadoop安装准备
  19. 2349 Arctic Network(中文版)
  20. 小课堂week18 编程范式巡礼第三季 谈谈依赖反转

热门文章

  1. (二)Spring框架之JDBC的基本使用(p6spy插件的使用)
  2. (错误)Lucene工具Luck启动错误
  3. .net core partial view的一些心得
  4. HTTP协议 学习
  5. 如何禁止Chrome浏览器隐藏URL的WWW前缀
  6. Python练习_集合和深浅拷贝_day7
  7. 最近公共祖先 LCA (Lowest Common Ancestors)-树上倍增
  8. Element-ui-Basic
  9. 安装theano踩过的坑(gpu)
  10. LeetCode 【2】 Reverse Integer --007