安装fastFDS
2024-09-05 04:38:57
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
來源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。
最新文章
- C++中typename和class的区别
- PHP经典算法
- 使用pgbench测试PostgreSQL
- cocos2dx 2.x 竖屏
- 【DWT笔记】傅里叶变换与小波变换
- insertAfter()
- python练习 根据日志中的ip和url排序
- CentOS7.1 JDK安装 和 CentOS7.1配置yum源
- VirtualBox中centos网络配置
- 迷宫问题python实现(靠右手摸墙)
- POJ 2240 Arbitrage(最短路 套汇)
- jquery跨域请求数据
- ubuntu16.04 uninstall cuda 9.0 completely and install 8.0 instead
- UOJ14 DZY Loves Graph 并查集
- PL/SQL Developer几个使用小技巧
- Spring 在+publicId+和+systemId+之间需要有空格
- OpenCV 学习笔记03 凸包convexHull、道格拉斯-普克算法Douglas-Peucker algorithm、approxPloyDP 函数
- ssh面密码登录配置-hadoop安装准备
- 2349 Arctic Network(中文版)
- 小课堂week18 编程范式巡礼第三季 谈谈依赖反转