FastDFS安装使用实战三(使用篇)
来源:互联网 发布:mac页面刷新快捷键 编辑:程序博客网 时间:2024/06/11 15:23
Keywords:FastDFS、分布式文件系统、Ubuntu
Author:soartju
转载请注明出处:http://soartju.iteye.com/blog/803548
一、上传文件
FastDFS安装包中,自带了客户端程序,通过程序可以进行文件上传。在使用这个客户端程序之前,首先需要配置client.conf,然后再进行文件上传及下载。
1、修改%FastDFS%/conf/client.conf文件,修改如下:
#可自定义,但此目录必须存在,用于存放文件上传log
- base_path=/home/yuqing/fastdfs-> base_path=/home/soar/fastdfs_tracker
- tracker_server=192.168.209.121:22122 -> tracker_server=10.0.2.15:22122
- http.tracker_server_port=8080 ->http.tracker_server_port=8090
#支持http
- ##include http.conf ->#include http.conf
2、进入/usr/local/bin/目录,上传文件,执行
- sudo fdfs_test %FastDFS%/conf/client.conf upload a.txt
注:a.txt可以在/usr/local/bin/目录下自己创建一个
如果命令行反馈类似如下:
则说明上传文件成功。
二、下载文件
在浏览器中,输入上图中的url地址, tracker server会自动重定向到存储文件的storage server,文件下载成功。
至此,已经成功搭建了FastDFS,编写你自己的client来进行访问吧:)
- FastDFS安装使用实战三(使用篇)
- FastDFS安装使用实战三(使用篇)
- 【FastDFS专题】fastdfs使用实战(安装篇)
- FastDFS安装使用实战一(安装篇)
- FastDFS安装使用实战一(安装篇)
- FastDFS安装使用实战二(配置篇)
- FastDFS安装使用实战二(配置篇)
- 【FastDFS专题】fastdfs使用实战(使用篇)
- 【FastDFS专题】fastdfs使用实战(概念篇)
- 【FastDFS专题】fastdfs使用实战(配置篇)
- 【FastDFS专题】fastdfs使用实战(概念篇)
- 【FastDFS专题】fastdfs使用实战(概念篇)
- fastdfs使用实战(Java实例篇)
- fastdfs 图片服务器 使用java端作为客户端上传图片 / 【FastDFS专题】fastdfs使用实战(概念篇)
- FastDFS安装与使用
- FastDFS安装与使用
- FastDFS 安装及使用
- FastDFS 安装及使用
- WebService的事务处理
- android NDK配置及使用demo
- TCP/UDP 详解 (可靠传输、流量控制、连接管理等核心章节的详解)
- 将python 添加进64位win7 的注册表
- 类加载器的工作原理
- FastDFS安装使用实战三(使用篇)
- shell脚本格式的几点注意:格式严格,空格不能随便出现(一写就记不住)
- Tomcat数据源配置方法总结
- 套餐内容
- 优秀程序员不得不知道的20个位运算技巧
- android java.lang.UnsatisfiedLinkError: Native method not found及.so找不到无法加载问题
- Concurrency Programming Guide 并发设计指引(二)
- apache shiro集群实现(一) session共享
- 论文读书笔记-An Empirical Study on Learning to Rank of Tweets