设为首页 收藏本站
查看: 1424|回复: 0

[经验分享] FastDFS 分布式文件系统之一trackerd 服务部署

[复制链接]
累计签到:1 天
连续签到:1 天
发表于 2015-9-2 08:48:38 | 显示全部楼层 |阅读模式
1, 安装相关库文件
1
2
3
4
        git clone https://github.com/happyfish100/libfastcommon.git
        cd libfastcommon/
        sh make.sh
        sh make.sh install



2, 安装fastDFS trackerd
1
2
3
4
        git clone https://github.com/happyfish100/fastdfs.git
        cd fastdfs
        sh make.sh
        sh make.sh install



3, 安装完成信息
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
        mkdir -p /usr/bin
        mkdir -p /etc/fdfs
        cp -f fdfs_trackerd /usr/bin
        if [ ! -f /etc/fdfs/tracker.conf.sample ]; then cp -f ../conf/tracker.conf /etc/fdfs/tracker.conf.sample; fi
        mkdir -p /usr/bin
        mkdir -p /etc/fdfs
        cp -f fdfs_storaged  /usr/bin
        if [ ! -f /etc/fdfs/storage.conf.sample ]; then cp -f ../conf/storage.conf /etc/fdfs/storage.conf.sample; fi
        mkdir -p /usr/bin
        mkdir -p /etc/fdfs
        mkdir -p /usr/lib64
        cp -f fdfs_monitor fdfs_test fdfs_test1 fdfs_crc32 fdfs_upload_file fdfs_download_file fdfs_delete_file fdfs_file_info fdfs_appender_test fdfs_appender_test1 fdfs_append_file fdfs_upload_appender /usr/bin
        if [ 0 -eq 1 ]; then cp -f libfdfsclient.a /usr/lib64; fi
        if [ 1 -eq 1 ]; then cp -f libfdfsclient.so /usr/lib64; fi
        mkdir -p /usr/include/fastdfs
        cp -f ../common/fdfs_define.h ../common/fdfs_global.h ../common/mime_file_parser.h ../common/fdfs_http_shared.h ../tracker/tracker_types.h ../tracker/tracker_proto.h ../tracker/fdfs_shared_func.h ../storage/trunk_mgr/trunk_shared.h tracker_client.h storage_client.h storage_client1.h client_func.h client_global.h fdfs_client.h /usr/include/fastdfs
        if [ ! -f /etc/fdfs/client.conf.sample ]; then cp -f ../conf/client.conf /etc/fdfs/client.conf.sample; fi



4,traced 配置
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
        1, 查看 tracker 服务配置文件
            [iyunv@fast-master-649 fdfs]# cat tracker.conf |grep -v '^#'|grep -v '^$'
            disabled=false
            bind_addr=192.168.6.49
            port=22122
            connect_timeout=30
            network_timeout=120
            base_path=/var/log/fastdfs
            max_connections=256
            accept_threads=1
            work_threads=4
            store_lookup=2
            store_group=group2
            store_server=0
            store_path=0
            download_server=0
            reserved_storage_space = 10%
            log_level=info
            run_by_group=
            run_by_user=
            allow_hosts=*
            sync_log_buff_interval = 10
            check_active_interval = 120
            thread_stack_size = 64KB
            storage_ip_changed_auto_adjust = true
            storage_sync_file_max_delay = 86400
            storage_sync_file_max_time = 300
            use_trunk_file = false
            slot_min_size = 256
            slot_max_size = 16MB
            trunk_file_size = 64MB
            trunk_create_file_advance = false
            trunk_create_file_time_base = 02:00
            trunk_create_file_interval = 86400
            trunk_create_file_space_threshold = 20G
            trunk_init_check_occupying = false
            trunk_init_reload_from_binlog = false
            trunk_compress_binlog_min_interval = 0
            use_storage_id = false
            storage_ids_filename = storage_ids.conf
            id_type_in_filename = ip
            store_slave_file_use_link = false
            rotate_error_log = false
            error_log_rotate_time=00:00
            rotate_error_log_size = 0
            log_file_keep_days = 0
            use_connection_pool = false
            connection_pool_max_idle_time = 3600
            http.server_port=8080
            http.check_alive_interval=30
            http.check_alive_type=tcp
            http.check_alive_uri=/status.html



1
2
        2, 创建日志目录
            mkdir /var/log/fastdfs



5, 启动服务
1
2
3
         cp -fr restart.sh stop.sh  /usr/bin/fdfs_* /usr/local/bin/
         systemctl daemon-reload
         service fdfs_trackerd restart



6, 验证服务
1
2
3
4
5
6
7
8
9
10
11
12
        [iyunv@fast-master-649 fdfs]# netstat -tnpl
        Active Internet connections (only servers)
        Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   
        tcp        0      0 192.168.6.49:22122      0.0.0.0:*               LISTEN      15064/fdfs_trackerd
        tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      627/rpcbind         
        tcp        0      0 192.168.122.1:53        0.0.0.0:*               LISTEN      3113/dnsmasq        
        tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1365/sshd           
        tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      2630/master         
        tcp6       0      0 :::111                  :::*                    LISTEN      627/rpcbind         
        tcp6       0      0 :::22                   :::*                    LISTEN      1365/sshd           
        tcp6       0      0 ::1:25                  :::*                    LISTEN      2630/master         
        [iyunv@fast-master-649 fdfs]#






运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-108558-1-1.html 上篇帖子: 分布式文件存储fastdfs 下篇帖子: 品味FastDFS~目录
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表