fastdfs

1.

yum -y install libevent

2.

libfastcommon-1.0.7.tar.gz

tar -zxvf libfastcommon-1.0.7.tar.gz

cd libfastcommon-1.0.7

./make.sh

./make.sh install

cd /usr/lib64/

cp libfastcommon.so /usr/lib

3.

FastDFS_v5.05.tar.gz

tar -zxvf FastDFS_v5.05.tar.gz

cd FastDFS

./make.sh

./make.sh install

cd /usr/bin

ll fdfs*

cd /etc/fdfs/

ll

cd /root/FastDFS/conf

cp /root/FastDFS/conf/* /etc/fdfs/

cd /etc/fdfs/

vim /etc/fdfs/tracker.conf

------------------------------

/base_path

base_path=/home/fastdfs/tracker

 

----------------------------------------------

mkdir /home/fastdfs/tracker -p

mkdir /home/fastdfs/storage -p

mkdir /home/fastdfs/client -p

启动track

/usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf

/usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf restart

 

4.

vim /etc/fdfs/storage.conf

-----------------------------

group_name=group1

base_path=/home/fastdfs/storage

store_path0=/home/fastdfs/storage

tracker_server=xxx.xx.xx.xx:22122

 

------------------------------

启动storage

/usr/bin/fdfs_storaged /etc/fdfs/storage.conf

/usr/bin/fdfs_storaged /etc/fdfs/storage.conf restart

 

5 .

查看进程

ps aux|grep storage

ps aux|grep track

 

6.

测试

 vim /etc/fdfs/client.conf

base_path=/home/fastdfs/client

tracker_server=xx.xx.xxx.xx:22122

/usr/bin/fdfs_test /etc/fdfs/client.conf upload /root/cat.jpg

**************************************************************************************

This is FastDFS client test program v5.05

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.

[2018-08-22 22:46:24] DEBUG - base_path=/home/yuqing/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

tracker_query_storage_store_list_without_group:
server 1. group_name=, ip_addr=172.31.161.117, port=23000

group_name=group1, ip_addr=172.31.161.117, port=23000
storage_upload_by_filename
group_name=group1, remote_filename=M00/00/00/rB-hdVt9d0CAOYnSAABr5S_Msgo125.jpg
source ip address: 172.31.161.117
file timestamp=2018-08-22 22:46:24
file size=27621
file crc32=801944074
example file url: http://172.31.161.117/group1/M00/00/00/rB-hdVt9d0CAOYnSAABr5S_Msgo125.jpg
storage_upload_slave_by_filename
group_name=group1, remote_filename=M00/00/00/rB-hdVt9d0CAOYnSAABr5S_Msgo125_big.jpg
source ip address: 172.31.161.117
file timestamp=2018-08-22 22:46:24
file size=27621
file crc32=801944074
example file url: http://172.31.161.117/group1/M00/00/00/rB-hdVt9d0CAOYnSAABr5S_Msgo125_big.jpg

**************************************************************************************************************************************************

 7.

fastdfs-nginx-module_v1.16.tar.gz

vim src/config

根据情况删除三个 local/

8.

yum install gcc-c++

yum install pcre pcre-devel

yum install zlib zlib-devel

yum install openssl openssl-devel

nginx-1.14.0.tar.gz

tar -zxvf nginx-1.14.0.tar.gz

 

-----------------------------------

./configure \
--prefix=/usr/local/nginx \
--pid-path=/var/run/nginx/nginx.pid \
--lock-path=/var/lock/nginx.lock \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--with-http_gzip_static_module \
--http-client-body-temp-path=/var/temp/nginx/client \
--http-proxy-temp-path=/var/temp/nginx/proxy \
--http-fastcgi-temp-path=/var/temp/nginx/fastcgi \
--http-uwsgi-temp-path=/var/temp/nginx/uwsgi \
--http-scgi-temp-path=/var/temp/nginx/scgi \
--add-module=/home/tar/fastdfs-nginx-module/src

---------------------------------------------------------------

make

make install

cd /usr/local/nginx/

 

9.

cp /home/tar/fastdfs-nginx-module/src/mod_fastdfs.conf /etc/fdfs/

vim /etc/fdfs/mod_fastdfs.conf 

---------------------------------------------

 base_path=/home/fastdfs/tmp

tracker_server=xxx:22122

group_name=group1

url_have_group_name = true

store_path0=/home/fastdfs/storage

----------------------------------------------

 

mkdir /home/fastdfs/tmp -p

 

10.

 vim /usr/local/nginx/conf/nginx.conf

 

 server {
  listen 88;
  server_name xxxxx;

  location /group1/M00 {
    ngx_fastdfs_mo:dule;
  }
}

 

/usr/local/nginx/sbin/nginx -t

mkdir /var/temp/nginx/client -p

./nginx 

11.

/etc/init.d/iptables status

/etc/init.d/iptables stop

 

13 

重启命令

/usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf restart

/usr/bin/fdfs_storaged /etc/fdfs/storage.conf restart

/usr/local/nginx/sbin/nginx -s reload

 

ps aux|grep storage

ps aux|grep track

 ps aux|grep nginx

阿里云防火墙资料: https://www.cnblogs.com/yanghongfei/p/7168725.html

 

转载于:https://www.cnblogs.com/liuzhipeng/p/9520926.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Windows下使用FastDFS需要进行以下步骤: 1. 安装FastDFS依赖的软件: - 安装C语言编译器,如MinGW、Cygwin或者Visual Studio等。 - 安装libevent库,可以从官网下载源码编译安装,也可以从第三方网站下载预编译的版本。 - 安装libfastcommon库,可以从GitHub上下载源码编译安装。 2. 下载FastDFS源码: - 从FastDFS官方网站下载最新版本的源码压缩包,解压到本地。 3. 编译FastDFS: - 打开命令行界面(如cmd),进入FastDFS源码目录。 - 执行命令`make`编译FastDFS。 - 执行命令`make install`安装FastDFS。 4. 配置FastDFS: - 进入FastDFS安装目录,编辑`tracker.conf`和`storage.conf`配置文件。 - 根据实际需求修改配置参数,如Tracker服务器IP、端口等。 - 配置存储节点的IP、端口、存储路径等信息。 - 保存配置文件并退出。 5. 启动FastDFS: - 执行命令`trackerd start`启动Tracker服务器。 - 执行命令`storaged start`启动存储服务器。 6. 测试FastDFS: - 使用FastDFS提供的命令行工具或者API进行文件上传、下载等操作,验证FastDFS是否正常运行。 请注意,FastDFS是一个基于Linux的分布式文件系统,官方并没有提供Windows下的官方支持。上述步骤是通过在Windows环境下安装依赖库以及编译源码来实现的。在Windows环境下使用FastDFS可能会遇到一些兼容性或者功能限制的问题,建议在Linux环境下部署和使用FastDFS以获得更好的稳定性和性能。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值