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
Base_path=/home/yuqing/fastdfs-> Base_path=/home/soar/fastdfs_tracker
TXT code
tracker_server=192.168. 209.121:22122 -tracker_server=10.0. 2.15:22122
TXT code
http.tracker_server_port=8080 ->http.tracker_server_port=8090
#支持http
TXT code
# #include http.conf #include http.conf
2, enter the/usr/local/bin/directory, upload files, execute
TXT code
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)