fastDfS文件系统配置

3 篇文章 0 订阅


1、下载

wget https://github.com/happyfish100/libfastcommon/archive/V1.0.42.tar.gz -SO libfastcommon.tar.gz
wget https://github.com/happyfish100/fastdfs/archive/V6.04.tar.gz -SO fastdfs.tar.gz
wget https://github.com/happyfish100/fastdfs-nginx-module/archive/V1.22.tar.gz -SO fastdfs-nginx-module.tar.gz

2、解压
tar -xf xxx.tar.gz

3、安装
安装好后,程序是在/usr/bin目录下:

$ which fdfs_trackerd
/usr/bin/fdfs_trackerd

配置    
sudo cp ~/data/fastdfs/fastdfs-6.04/conf/* /etc/fdfs

配置目录IP
https://segmentfault.com/a/1190000018251300?utm_source=tag-newest

测试

fdfs_test /etc/fdfs/client.conf upload /etc/fdfs/anti-steal.jpg

   
下载 openssl  openssl Nginx 编译需要设置--with-openssl 代码目录
wget https://www.openssl.org/source/openssl-1.0.2g.tar.gz
yum -y install zlib zlib-devel openssl openssl--devel pcre pcre-devel
 
/data/fastdfs/nginx

 
./configure \
--prefix=/data/fastdfs/nginx \
--sbin-path=/data/fastdfs/nginx/sbin/nginx \
--conf-path=/data/fastdfs/nginx/etc/nginx/nginx.conf \
--error-log-path=/data/fastdfs/nginx/logs/error.log \
--http-log-path=/data/fastdfs/nginx/logs/access.log \
--pid-path=/data/fastdfs/nginx/run/nginx.pid  \
--lock-path=/data/fastdfs/nginx/lock/nginx.lock \
--user=root \
--group=nginx \
--with-http_ssl_module \
--with-http_realip_module \
--with-http_stub_status_module \
--with-http_gzip_static_module \
--with-openssl=/data/fastdfs/openssl-1.0.2g \
--with-debug \
--http-client-body-temp-path=/data/fastdfs/nginx/client_body \
--http-proxy-temp-path=/data/fastdfs/nginx/proxy \
--http-fastcgi-temp-path=/data/fastdfs/nginx/fastcgi \
--http-uwsgi-temp-path=/data/fastdfs/nginx/uwsgi \
--http-scgi-temp-path=/data/fastdfs/nginx/scgi \
--with-stream \
--add-module=/data/fastdfs/fastdfs-nginx-module-1.22/src

安装
make install 

配置nginx,加入路由规则,映射到fastdfs的数据目录:

# config for fastdfs-nginx-module
server {
    listen 8777;
    location /M00 {
        root ~/fdfs/data;
        ngx_fastdfs_module;
    }
}

分布式部署文档参考
https://blog.csdn.net/wwxuelei/article/details/89211662

访问

M00/00/00/ChgGLF35252AW8hUAABdreSfEnY192_big.jpg
http://10.24.6.44:8777/M00/00/00/ChgGLF35252AW8hUAABdreSfEnY192_big.jpg

http://10.24.6.44:9270/group1/M00/00/00/ChgGLF35252AW8hUAABdreSfEnY192_big.jpg

http://10.24.6.44:8777/M00/00/00/ChgGLF355uGAVF8YAABdreSfEnY318_big.jpg


http://10.24.6.44:8777/group1/M00/00/00/ChgGLF355uGAVF8YAABdreSfEnY318.jpg
 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值