FastFDS常用命令

1.启停fastdfs相关服务

#start fastdfs  启动服务

/usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf restart

/usr/local/bin/fdhtd   /etc/fdht/fdhtd.conf   restart

/usr/bin/fdfs_storaged /etc/fdfs/storage.conf restart

/usr/local/nginx/sbin/nginx

# stop fastdfs  停止服务

#killall nginx

#killall fdfs_trackerd

#killall fdfs_storaged

#killall fdhtd

2.文件操作命令

      上传文件:/usr/bin/fdfs_upload_file  <config_file> <local_filename> 

      下载文件:/usr/bin/fdfs_download_file <config_file> <file_id> [local_filename] 

       删除文件:/usr/bin/fdfs_delete_file <config_file> <file_id> 

例如: 

# /usr/bin/fdfs_upload_file /etc/fdfs/client.conf ./FastDFS_hello 

group1/M00/00/00/wKgAxE6qbOzdjH9aAAAAD-G-Bkc3036472 

# /usr/bin/fdfs_download_file /etc/fdfs/client.conf

group1/M00/00/00/wKgAxE6qbOzdjH9aAAAAD-G-Bkc3036472 hello_dfs 

# /usr/bin/fdfs_delete_file /etc/fdfs/client.conf

group1/M00/00/00/wKgAxE6qbOzdjH9aAAAAD-G-Bkc3036472 

3.检查STORAGE SERVER

/usr/bin/fdfs_monitor /etc/fdfs/client.conf

4.测试上传

/usr/bin/fdfs_test /etc/fdfs/client.conf upload /tmp/test

5.查询文件是否存在

/usr/bin/fdfs_file_info /etc/fdfs/client.conf 

group1/M00/00/D1/CniXclQ0vdfCNdkzAABGC4v7nb4822.png

原文地址:https://www.cnblogs.com/eos666/p/9830740.html