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

[[email protected] ~]# yum install make cmake gcc gcc-c++

下载安装libfastcommon

[[email protected] ~]# wget https://github.com/happyfish100/libfastcommon/archive/V1.0.35.tar.gz

[[email protected] ~]# mv V1.0.35.tar.gz libfastcommon-1.0.35.tar.gz

[[email protected] ~]# tar -zxvf libfastcommon-1.0.35.tar.gz -C /usr/local/

[[email protected] ~]# cd /usr/local/libfastcommon-1.0.35/

[[email protected] libfastcommon-1.0.35]# ./make.sh

[[email protected] libfastcommon-1.0.35]# ./make.sh install

下载安装fastdfs

[[email protected] ~]# wget https://github.com/happyfish100/fastdfs/archive/V5.10.tar.gz

[[email protected] ~]# mv V5.10.tar.gz fastdfs-5.10.tar.gz

[[email protected] ~]# tar -zxvf fastdfs-5.10.tar.gz -C /usr/local/

[[email protected] ~]# mv /usr/local/fastdfs-5.10/ /usr/local/fastdfs

[[email protected] ~]# cd /usr/local/fastdfs/

[[email protected] fastdfs]# ./make.sh

[[email protected] fastdfs]# ./make.sh install

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

[[email protected] ~]# mkdir -p /data/fdfs/tracker /data/fdfs/storage /data/fdfs/client

[[email protected] ~]# cp /etc/fdfs/tracker.conf.sample /etc/fdfs/tracker.conf

[[email protected] ~]# cp /etc/fdfs/storage.conf.sample /etc/fdfs/storage.conf

[[email protected] ~]# cp /etc/fdfs/client.conf.sample /etc/fdfs/client.conf

[[email protected] ~]# vim /etc/fdfs/tracker.conf

Linux_FastDFS 安装笔记

[[email protected] ~]# vim /etc/fdfs/storage.conf

Linux_FastDFS 安装笔记
Linux_FastDFS 安装笔记
Linux_FastDFS 安装笔记

[[email protected] ~]# vim /etc/fdfs/client.conf

Linux_FastDFS 安装笔记

[[email protected] ~]# /usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf

[[email protected] ~]# /usr/bin/fdfs_storaged /etc/fdfs/storage.conf

[[email protected] ~]# 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

[[email protected] ~]# tail -n 50 /data/fdfs/storage/logs/storaged.log

Linux_FastDFS 安装笔记

[[email protected] ~]# tail -n 5 /data/fdfs/storage/logs/storaged.log

Linux_FastDFS 安装笔记

upload文件

[[email protected] ~]# /usr/bin/fdfs_test /etc/fdfs/client.conf upload ~/turtle.jpg

Linux_FastDFS 安装笔记

download文件

[[email protected] ~]# /usr/bin/fdfs_download_file /etc/fdfs/client.conf group1/M00/00/00/wKjYjFko7RiAaIAaAABL1JGdlX4889.jpg

Linux_FastDFS 安装笔记

delete文件

[[email protected] ~]# /usr/bin/fdfs_delete_file /etc/fdfs/client.conf group1/M00/00/00/wKjYjFko7RiAaIAaAABL1JGdlX4889.jpg

[[email protected] ~]# /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

相关文章:

  • 2021-10-13
  • 2021-07-12
  • 2021-05-20
  • 2021-11-20
  • 2021-04-09
  • 2021-11-16
  • 2021-08-16
  • 2021-08-16
猜你喜欢
  • 2021-11-02
  • 2021-06-20
  • 2021-12-14
  • 2021-11-29
  • 2021-09-10
  • 2021-08-10
  • 2021-04-25
相关资源
相似解决方案