网络云盘项目-fastdfs环境搭建

栏目: 服务器 · 发布时间: 6年前

内容简介:预备工具包:1.libfastcommon-1.0.38.tar.gz2.fastdfs-5.11.tar.gz

准备

预备 工具 包:

1.libfastcommon-1.0.38.tar.gz

2.fastdfs-5.11.tar.gz

3.fastdfs-nginx-module-1.20.tar.gz

4.libevent-2.1.8-stable.tar.gz

libfastcommon-1.0.38.tar.gz安装
$ tar xzvf libfastcommon-1.0.38.tar.gz
$ cd libfastcommon-1.0.38
$ ./make.sh
$ sudo ./make.sh install

fastdfs-5.11.tar.gz 安装
$ tar xzvf fastdfs-5.11.tar.gz
$ cd fastdfs-5.11
$ ./make.sh
$ sudo ./make.sh install

安装完成测试:

root@iZbp1anc6yju2dks3nw5j0Z:~/yunpan/lib/fastdfs/fastdfs-5.11# fdfs_test
This is FastDFS client test program v5.11

Copyright (C) 2008, Happy Fish / YuQing

FastDFS may be copied only under the terms of the GNU General
Public License V3, which may be found in the FastDFS source kit.
Please visit the FastDFS Home Page http://www.csource.org/
for more detail.

Usage: fdfs_test <config_file> <operation>
        operation: upload, download, getmeta, setmeta, delete and query_servers

配置tracker:

先建立fastdfs存储目录如下:

网络云盘项目-fastdfs环境搭建

修改etc/fdfs 配置文件:

root@iZbp1anc6yju2dks3nw5j0Z:/etc/fdfs# ls
client.conf         storage.conf         storage_ids.conf         tracker.conf
client.conf.sample  storage.conf.sample  storage_ids.conf.sample  tracker.conf.sample

配置完成后启动tracker:

root@iZbp1anc6yju2dks3nw5j0Z:/home/fastdfs/tracker# /etc/init.d/fdfs_trackerd start
Starting FastDFS tracker server:

配置完成:

root@iZbp1anc6yju2dks3nw5j0Z:~# fdfs_monitor /etc/fdfs/client.conf
[2019-06-05 16:41:30] DEBUG - base_path=/home/fastdfs/client, connect_timeout=30, network_timeout=60, tracker_server_count=1, anti_steal_token=0, anti_steal_secret_key length=0, use_connection_pool=0, g_connection_pool_max_idle_time=3600s, use_storage_id=0, storage server id count: 0

server_count=1, server_index=0

tracker server is 172.17.9.217:22122

group count: 1

Group 1:
group name = group1
disk total space = 40187 MB
disk free space = 28282 MB
trunk free space = 0 MB
storage server count = 1
active server count = 1
storage server port = 23000
storage HTTP port = 8888
store path count = 1
subdir count per path = 256
current write server index = 0
current trunk file id = 0

        Storage 1:
                id = 172.17.9.217
                ip_addr = 172.17.9.217  ACTIVE
                http domain =
                version = 5.11
                join time = 2019-06-05 16:14:24
                up time = 2019-06-05 16:14:24
                total storage = 40187 MB
                free storage = 28282 MB
                upload priority = 10
                store_path_count = 1
                subdir_count_per_path = 256
                storage_port = 23000
                storage_http_port = 8888
                current_write_path = 0
                source storage id =
                if_trunk_server = 0
                connection.alloc_count = 256
                connection.current_count = 0
                connection.max_count = 0
                total_upload_count = 0
                success_upload_count = 0
                total_append_count = 0
                success_append_count = 0
                total_modify_count = 0
                success_modify_count = 0
                total_truncate_count = 0
                success_truncate_count = 0
                total_set_meta_count = 0
                success_set_meta_count = 0
                total_delete_count = 0
                success_delete_count = 0
                total_download_count = 0
                success_download_count = 0
                total_get_meta_count = 0
                success_get_meta_count = 0
                total_create_link_count = 0
                success_create_link_count = 0
                total_delete_link_count = 0
                success_delete_link_count = 0
                total_upload_bytes = 0
                success_upload_bytes = 0
                total_append_bytes = 0
                success_append_bytes = 0
                total_modify_bytes = 0
                success_modify_bytes = 0
                stotal_download_bytes = 0
                success_download_bytes = 0
                total_sync_in_bytes = 0
                success_sync_in_bytes = 0
                total_sync_out_bytes = 0
                success_sync_out_bytes = 0
                total_file_open_count = 0
                success_file_open_count = 0
                total_file_read_count = 0
                success_file_read_count = 0
                total_file_write_count = 0
                success_file_write_count = 0
                last_heart_beat_time = 2019-06-05 16:41:02
                last_source_update = 1970-01-01 08:00:00
                last_sync_update = 1970-01-01 08:00:00
                last_synced_timestamp = 1970-01-01 08:00:00

上传文件用法:

Usage: fdfs_upload_file <config_file> <local_filename> [storage_ip:port] [store_path_index]

例子:

root@iZbp1anc6yju2dks3nw5j0Z:~# fdfs_upload_file /etc/fdfs/client.conf get-pip.py
group1/M00/00/00/rBEJ2Vz3iIWAa43KABoXAeKsnG06224.py

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

游戏化革命:未来商业模式的驱动力

游戏化革命:未来商业模式的驱动力

[美]盖布·兹彻曼、[美]乔斯琳·林德 / 应皓 / 中国人民大学出版社有限公司 / 2014-8-1 / CNY 59.00

第一本植入游戏化理念、实现APP互动的游戏化商业图书 游戏化与商业的大融合、游戏化驱动未来商业革命的权威之作 作者被公认为“游戏界的天才”,具有很高的知名度 亚马逊五星级图书 本书观点新颖,游戏化正成为最热门的商业新策略 游戏化是当今最热门的商业新策略,它能帮助龙头企业创造出前所未有的客户和员工的参与度。商业游戏化策略通过利用从游戏设计、忠诚度计划和行为经济学中所汲取......一起来看看 《游戏化革命:未来商业模式的驱动力》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

html转js在线工具
html转js在线工具

html转js在线工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具