FastDFS安装使用实战三(使用篇)
来源:互联网 发布:什么是淘宝大促商品 编辑:程序博客网 时间:2024/06/05 08:34
Keywords:FastDFS、分布式文件系统、Ubuntu
Author:soartju
转载请注明出处:http://soartju.iteye.com/blog/803548
经过前面的安装、配置、启动,马上就可以看到FastDFS的效果了,我们先上传一个文件,然后再通过http下载。
一、上传文件
FastDFS安装包中,自带了客户端程序,通过程序可以进行文件上传。在使用这个客户端程序之前,首先需要配置client.conf,然后再进行文件上传及下载。
1、修改%FastDFS%/conf/client.conf文件,修改如下:
#可自定义,但此目录必须存在,用于存放文件上传log
- base_path=/home/yuqing/fastdfs-> base_path=/home/soar/fastdfs_tracker
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
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.tracker_server_port=8080 ->http.tracker_server_port=8090
#支持http
- ##include http.conf ->#include http.conf
##include http.conf ->#include http.conf
2、进入/usr/local/bin/目录,上传文件,执行
- sudo fdfs_test %FastDFS%/conf/client.conf upload a.txt
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 安装及使用
- ubuntu 下在 XAMPP 和 eclipse-php 环境下安装 XDebug
- android入门:zxing学习笔记(六)
- Linux的自旋锁struct spinlock_t的使用
- linux内核学习(6)Kbuild Makefile语法分析 .
- NDK环境搭建学习笔记
- FastDFS安装使用实战三(使用篇)
- android学习笔记---50_样式与主题,给控件使用样式,给应用使用主题
- 一道笔试题
- C文件
- asp.net网站定时执行指定任务
- ZXing改横屏识别为竖屏识别
- D5100配35 1.5G和50 1.8G哪个更合适些呢?
- iOS学习笔记(四)——iOS应用程序生命周期
- 线段树