FASTDFS Installation Use combat three (use of the article)

Source: Internet
Author: User

After the previous installation, configuration, start, you can see the effect of Fastdfs, we first upload a file, and then through the HTTP download.

Related reading:

FASTDFS installation Use combat one (installation) http://www.linuxidc.com/Linux/2012-01/52112.htm

FASTDFS Installation Use Combat II (configuration) http://www.linuxidc.com/Linux/2012-01/52113.htm

First, upload files

FASTDFS installation package, with the client program, through the program can upload files. Before using this client program, you need to configure client.conf before uploading and downloading files.

1, modify the%fastdfs%/conf/client.conf file, modified as follows:
#可自定义, but this directory must be present to hold the file upload log

TXT code

    1. Base_path=/home/yuqing/fastdfs-> Base_path=/home/soar/fastdfs_tracker

TXT code

    1. tracker_server=192.168. 209.121:22122 -tracker_server=10.0. 2.15:22122

TXT code

    1. http.tracker_server_port=8080 ->http.tracker_server_port=8090

#支持http

TXT code

    1. # #include http.conf #include http.conf

2, enter the/usr/local/bin/directory, upload files, execute

TXT code

    1. sudo fdfs_test%fastdfs%/conf/client.conf upload a.txt

Note: A.txt can create a/usr/local/bin/directory by itself

If the command line feedback resembles the following:

Indicates that the file was uploaded successfully.

Second, download the file

In the browser, enter the URL address in, tracker server automatically redirects to the storage server where the file is stored, and the file download succeeds.

At this point, you have successfully set up the Fastdfs, write your own client to access it:)


FASTDFS Installation Use combat three (use of the article)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.