fastdfs
链接:https://pan.baidu.com/s/18kFkoRkT05wUJM7WFTBU-Q 密码:v76q
请使用相同版本 不然会出乱七八糟的问题
1.1原理图

1.2 上传过程

1.3 下载过程

1.4安装过程
1.安装gcc
yum install -y gcc gcc-c++
2.安装libevent
yum -y install libeven
3.解压
tar -zxvf libfastcommon-1.0.42.tar.gz
tar -zxvf fastdfs-6.04.tar.gz
tar -zxvf fastdfs-nginx-module-1.22.tar.gz
4.安装linfastcommon-1.0.42
cd libfastcommon-1.0.42/
./make.sh
./make.sh install
5.安装fastdfs-6.04/
cd fastdfs-6.04/
./make.sh
./make.sh install
6.可以在/usr/bin/ 中查看相关文件

7.可以在/etc/fdfs 中查看配置文件
-
进入到主体文件夹下 复制配置文件/etc/fdfs

cd /usr/local/softwear/fastdfs-6.0/conf
cp * /etc/fdfs
cd /etc/fdfs/
9.配置trackervim tracker.conf
//修改其中的配置
base_path=/usr/local/fastdfs/tracker
10.创建basepath 文件夹
mkdir /usr/local/fastdfs/tracker -p
11.启动tracker 前面为命令后边为配置文件路径
/usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf
12.查看是否启动
ps -ef |grep tracker

8.配置storage
vim storage.conf
需要修改的内容
//修改组名
group_name=fanxlxs
//修改basepath
base_path=/usr/local/fastdfs/storage
//修改storepath
store_path0=/usr/local/fastdfs/storage
//trackerserver地址
tracker_server=106.13.148.210:22122
//http端口
http.server_port=8888
9.创建文件夹
//创建文件夹
mkdir /usr/loca/fastdfs/storage -p
10.启动
//启动storaged 前边为命令后边为配置文件
/usr/bin/fdfs_storaged /etc/fdfs/storage.conf
11.查看是否启动成功
ps -ef |grep storage

9.配置客户端
vim client.conf
//修改客户端地址
base_path=/usr/local/fastdfs/client
//修改tracker地址
tracker_server=106.13.148.210:22122
13.测试上传 前边为测试上传命令中间为配置文件地址 upload 图片名称
/usr/bin/fdfs_test /etc/fdfs/client.conf upload fanxlxs.jpg

10.安装nginx
https://www.runoob.com/linux/nginx-install-setup.html 参照该文档
11.安装nginx 模块
//进入nginx 模块包内
cd /usr/local/softwear/fastdfs-nginx-module-1.22/src
//编辑configure 文件
vim config
ngx_module_incs="/usr/include"
CORE_INCS="$CORE_INCS /usr/include"
//复制配置文件
cp mod_fastdfs.conf /etc/fdfs/
//创建文件夹
mkdir /var/temp/nginx -p
//查看已安装模块
/usr/local/webserver/nginx/sbin/nginx -V

//添加模块
./configure --prefix=/usr/local/webserver/nginx --with-http_stub_status_module --with-http_ssl_module --with-pcre=/usr/local/src/pcre-8.35 --add-module=/usr/local/softwear/fastdfs-nginx-module-1.22/src
//编译
make
//安装
make install
//修改配置文件
cd /etc/fdfs
vim mod_fastdfs.conf
//修改basepath
base_path=/usr/local/fastdfs/tmp
//修改trackerserver
tracker_server=106.13.148.210:22122
//group
group_name=fanxlxs
/url中是否包好组名
url_have_group_name = true
//store_path0
store_path0=/usr/local/fastdfs/storage
进入到nginx 配置文件目录
重启nginx 服务器 不要使用reload 或者reopen 不管用 需要关闭在重新开启
进入
/usr/local/webserver/nginx/sbin/nginx -s stop
/usr/local/webserver/nginx/sbin/nginx
访问图片地址
http://106.13.148.210:8888/fanxlxs/M00/00/00/ag2U0l5_GZqAbU95AAAivM0NP64659.jpg
本文详细介绍了FastDFS 6.04的安装过程,包括原理图、上传与下载流程,并提供了每个步骤的详细操作指南,如安装依赖、配置tracker和storage、设置客户端以及集成Nginx。确保使用相同版本,避免问题。
2518

被折叠的 条评论
为什么被折叠?



