Linux_FastDFS 安装笔记

来源:互联网 发布:amd游戏优化档案 编辑:程序博客网 时间:2024/05/21 12:48

环境:Vmware Workstation 10,CentOS-7-x86_64-DVD-1511.iso,Xshell 4.0,ip:192.168.216.140.

[root@localhost ~]# yum install make cmake gcc gcc-c++

下载安装libfastcommon

[root@localhost ~]# wget https://github.com/happyfish100/libfastcommon/archive/V1.0.35.tar.gz

[root@localhost ~]# mv V1.0.35.tar.gz libfastcommon-1.0.35.tar.gz

[root@localhost ~]# tar -zxvf libfastcommon-1.0.35.tar.gz -C /usr/local/

[root@localhost ~]# cd /usr/local/libfastcommon-1.0.35/

[root@localhost libfastcommon-1.0.35]# ./make.sh

[root@localhost libfastcommon-1.0.35]# ./make.sh install

下载安装fastdfs

[root@localhost ~]# wget https://github.com/happyfish100/fastdfs/archive/V5.10.tar.gz

[root@localhost ~]# mv V5.10.tar.gz fastdfs-5.10.tar.gz

[root@localhost ~]# tar -zxvf fastdfs-5.10.tar.gz -C /usr/local/

[root@localhost ~]# mv /usr/local/fastdfs-5.10/ /usr/local/fastdfs

[root@localhost ~]# cd /usr/local/fastdfs/

[root@localhost fastdfs]# ./make.sh

[root@localhost fastdfs]# ./make.sh install

编辑tracker.conf, storage.conf和client.conf配置文件

[root@localhost ~]# mkdir -p /data/fdfs/tracker /data/fdfs/storage /data/fdfs/client

[root@localhost ~]# cp /etc/fdfs/tracker.conf.sample /etc/fdfs/tracker.conf

[root@localhost ~]# cp /etc/fdfs/storage.conf.sample /etc/fdfs/storage.conf

[root@localhost ~]# cp /etc/fdfs/client.conf.sample /etc/fdfs/client.conf

[root@localhost ~]# vim /etc/fdfs/tracker.conf

这里写图片描述

[root@localhost ~]# vim /etc/fdfs/storage.conf

这里写图片描述
这里写图片描述
这里写图片描述

[root@localhost ~]# vim /etc/fdfs/client.conf

这里写图片描述

[root@localhost ~]# /usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf

[root@localhost ~]# /usr/bin/fdfs_storaged /etc/fdfs/storage.conf

[root@localhost ~]# ps -ef | grep fdfs

root 3483 1 0 10:54 ? 00:00:00 /usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf
root 3494 1 3 10:55 ? 00:00:01 /usr/bin/fdfs_storaged /etc/fdfs/storage.conf
root 3507 2703 0 10:56 pts/0 00:00:00 grep –color=auto fdfs

[root@localhost ~]# tail -n 50 /data/fdfs/storage/logs/storaged.log

这里写图片描述

[root@localhost ~]# tail -n 5 /data/fdfs/storage/logs/storaged.log

这里写图片描述

upload文件

[root@localhost ~]# /usr/bin/fdfs_test /etc/fdfs/client.conf upload ~/turtle.jpg

这里写图片描述

download文件

[root@localhost ~]# /usr/bin/fdfs_download_file /etc/fdfs/client.conf group1/M00/00/00/wKjYjFko7RiAaIAaAABL1JGdlX4889.jpg

这里写图片描述

delete文件

[root@localhost ~]# /usr/bin/fdfs_delete_file /etc/fdfs/client.conf group1/M00/00/00/wKjYjFko7RiAaIAaAABL1JGdlX4889.jpg

[root@localhost ~]# /usr/bin/fdfs_download_file /etc/fdfs/client.conf
group1/M00/00/00/wKjYjFko7RiAaIAaAABL1JGdlX4889.jpg

[2017-05-27 11:13:29] ERROR - file: tracker_proto.c, line: 48, server: 192.168.216.140:23000, response status 2 != 0
[2017-05-27 11:13:29] ERROR - file: ../client/storage_client.c, line: 598, fdfs_recv_header fail, result: 2
download file fail, error no: 2, error info: No such file or directory

原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 换异地户口驾照怎么办 驾照罚款5年没交怎么办 日本签证被拒怎么办 在杭州怎么办日本签证 去日本访友签证怎么办 重庆去日本签证怎么办 申根签证澳洲怎么办 甲方不退保证金怎么办 押金不给退怎么办 在夏门办加急居住证怎么办 学车证明丢失怎么办? 哈尔滨空挂户口怎么办 厦大学生怎么办厦门居住证 厦门网上办理居住证怎么办 宝宝风热咳嗽怎么办 小孩感冒后鼻炎怎么办 小孩感冒引起鼻炎怎么办 婴幼儿喉咙有痰怎么办 驾校的居住证明怎么办 去韩国留学护照怎么办 去韩国签证怎么办d4 出国留学拒签怎么办 高中毕业考不上大学怎么办 深圳怎么办客运营运证 深圳龙岗怎么办居住证 想去日本怎么办签证 孩子没有出生证怎么办通行证 去日本旅游怎么办签证 去美国旅游签证怎么办 我想去泰国怎么办签证 怎么办去泰国的签证 去韩国工作怎么办签证 去越南打工怎么办签证 越南到中国签证怎么办 去越南工作签证怎么办 马来西亚留学签证过期后怎么办 日本留学存款不够怎么办 没有工作单位怎么办签证 深户日本签证怎么办 土耳其跟团签证怎么办 公司取消交通车职工怎么办