安装:

##安装tracker、storage参考:http://www.cnblogs.com/zclzhao/p/5025229.html

nginx代理设置参考:http://www.cnblogs.com/zclzhao/p/5033391.html

192.168.12.92 tracker Nginx
192.168.12.22  storage nginx
192.168.12.25  storage nginx

192.168.12.22
tar zxvf fastdfs-nginx-module_v1.16.tar.gz
cd nginx-1.1.7
./configure --prefix=/usr/local/nginx --without-http_memcached_module --user=www --group=www --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module --with-openssl=/cacti/lnmp/openssl-1.0.0a --with-zlib=/cacti/lnmp/zlib-1.2.3 --with-pcre=/cacti/lnmp/pcre-8.20 --add-module=/cacti/lnmp/fastdfs-nginx-module/src
make
cp /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.bak
cp /cacti/nginx-1.1.7/objs/nginx /usr/local/nginx/sbin/nginx

ln -s /cacti/fastdfs-nginx-module/src/mod_fastdfs.conf /etc/fdfs/
vi /etc/fdfs/mod_fastdfs.conf
connect_timeout=30
network_timeout=30
base_path=/tmp
load_fdfs_parameters_from_tracker=true
storage_sync_file_max_delay = 86400
use_storage_id = false
storage_ids_filename = storage_ids.conf
tracker_server=192.168.12.92:22122
storage_server_port=23000
group_name=group1
url_have_group_name = true
store_path_count=1
store_path0=/fastdfs
log_level=info
log_filename=
response_mode=proxy
if_alias_prefix=
flv_support = true
flv_extension = flv
group_count = 0
注意:mod_fastdfs.conf 先关属性配置必须和storage.conf 配置保持一致
vi /usr/local/nginx/conf/nginx.conf
location / {
            root   /fastdfs/data/00/00/;
            ngx_fastdfs_module;
            index  index.html index.htm index.php;
        }

nginx重启:

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

---------------------------------------报错处理--------------------------------
fastdfs-nginx-module/src/common.c:21:25: 错误:fdfs_define.h:没有那个文件或目录
ln -s /usr/include/fastcommon /usr/local/include/
ln -s /usr/include/fastdfs /usr/local/include/
ln -s /usr/lib64/libfastcommon.so /usr/local/lib/

##ERROR - file: ini_file_reader.c, line: 394, include file "http.conf" not exists, line: "#include http.conf"
cd /cacti/FastDFS/conf
cp http.conf mime.types /etc/fdfs/

##ERROR - file: /cacti/fastdfs-nginx-module/src/common.c, line: 586, url length: 1 < 16
vi /cacti/fastdfs-nginx-module/src/mod_fastdfs.conf
url_have_group_name = true
--------------------------------------报错处理----------------------------------

以上操作在192.168.12.25上操作一遍

192.168.12.92上安装tracker、Nginx

vi /usr/local/nginx/conf/nginx.conf
user  www www;
worker_processes  1;
error_log  /cacti/nginx/logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;
#pid        logs/nginx.pid;
events {
    worker_connections  1024;
}

http {
include       mime.types;
default_type  application/octet-stream;
server_names_hash_bucket_size 128;
proxy_headers_hash_max_size 51200;
proxy_headers_hash_bucket_size 6400;
client_header_buffer_size 4k;
large_client_header_buffers 4 32k;
tcp_nopush     on;
keepalive_timeout 300;
tcp_nodelay on;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 64k;
fastcgi_buffers 4 64k;
fastcgi_busy_buffers_size 128k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;
server_tokens off;
client_body_buffer_size 256k;
send_timeout 3m;
client_header_timeout 3m;
client_body_timeout 3m;
proxy_ignore_client_abort on;
gzip on;
gzip_min_length  1k;
gzip_buffers     4 16k;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_types       text/plain application/x-javascript text/css ap        plication/xml;
gzip_vary on;
include vhosts/*.conf;
}

vi /usr/local/nginx/conf/vhosts/upstream.conf

upstream test {
        server 192.168.12.22:80;
        server 192.168.12.25:80;
        }

vi /usr/local/nginx/conf/vhosts/proxy.conf

server{
        listen             80;
        server_name  192.168.12.22;

location / {
        proxy_pass http://test/;
  }
}
server{
        listen             80;
        server_name  192.168.12.25;

location / {
        proxy_pass http://test/;
  }
}

vi /cacti/FastDFS/conf/client.conf
tracker_server=192.168.12.92:22122

启动trackerd

/etc/init.d/fdfs_trackerd start

测试上传

cd /fastdfs/data

/usr/bin/fdfs_test /cacti/FastDFS/conf/client.conf upload 234.jpg.

到此配置完成

FastDFS+Nginx分布式文件系统部署安装的更多相关文章

  1. FastDFS轻量级分布式文件系统部署

    FastDFS介绍 FastDFS 是一个由 C 语言实现的开源轻量级分布式文件系统,作者余庆,支持 Linux.FreeBSD.AID 等 Unix 系统,解决了大数据存储和读写负载均衡等问题,适合 ...

  2. Dubbo入门到精通学习笔记(八):ActiveMQ的安装与使用(单节点)、Redis的安装与使用(单节点)、FastDFS分布式文件系统的安装与使用(单节点)

    文章目录 ActiveMQ的安装与使用(单节点) 安装(单节点) 使用 目录结构 edu-common-parent edu-demo-mqproducer edu-demo-mqconsumer 测 ...

  3. FastDFS 分布式文件系统的安装与使用(单节点)

    FastDFS 分布式文件系统的安装与使用(单节点) 跟踪服务器:192.168.4.121 (edu-dfs-tracker-01) 存储服务器:192.168.4.125 (edu-dfs-sto ...

  4. FastDFS 分布式文件系统部署实战及基本使用

    FastDFS 分布式文件系统部署实战及基本使用 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. FastDFS是一个开源的高性能分布式文件系统.它的主要功能包括:文件存储,文件同步 ...

  5. 170519、FastDFS分布式文件系统的安装与使用(单节点)

    基于 于 D Do ubbo 的分布 式系统架构 视频 教程 高 级篇S FastDFS 分布 式 文件系统的安装与使用 (单 节点)跟踪 服务器 : 192.168.4.12 21 1 (edu- ...

  6. FastDFS搭建分布式文件系统

    FastDFS搭建分布式文件系统 1. 什么是分布式文件系统 分布式文件系统(Distributed File System)是指文件系统管理的物理存储资源不一定直接连接在本地节点上,而是通过计算机网 ...

  7. GlusterFS分布式文件系统部署及基本使用(CentOS 7.6)

    GlusterFS分布式文件系统部署及基本使用(CentOS 7.6) 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. Gluster File System 是一款自由软件,主要由 ...

  8. 【FastDFS】FastDFS 分布式文件系统的安装与使用,看这一篇就够了!!

    写在前面 有不少小伙伴在实际工作中,对于如何存储文件(图片.视频.音频等)没有一个很好的解决思路.都明白不能将文件存储在单台服务器的磁盘上,也知道需要将文件进行副本备份.如果自己手动写文件的副本机制, ...

  9. FastDFS 分布式文件系统的安装与使用---两台服务器搭建FastDFS环境

    写在前面 有不少小伙伴在实际工作中,对于如何存储文件(图片.视频.音频等)没有一个很好的解决思路.都明白不能将文件存储在单台服务器的磁盘上,也知道需要将文件进行副本备份.如果自己手动写文件的副本机制, ...

随机推荐

  1. Android 实现动态匹配输入的内容 AutoCompleteTextView和MultiAutoCompleteTextView

    AutoCompleteTextView1.功能:动态匹配输入的内容,如百度搜索引擎当输入文本时可以根据内容显示匹配的热门信息.2.独特属性:android:completionThreshold 设 ...

  2. Android 简单案例:onSaveInstanceState 和 onRestoreInstanceState

    import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widg ...

  3. kerberos认证协议分析

    Kerberos认证协议分析 Kerberos认证协议流程 如上图: * 第一步:client和认证服务器(AS)通信完成认证过程,如果认证成功AS返回给client一个TGT(用来向TGS获取tic ...

  4. SHTML 教程

    什么是 SHTML 使用SSI(Server Side Include)的html文件扩展名,SSI(Server Side Include),通常称为“服务器端嵌入”或者叫“服务器端包含”,是一种类 ...

  5. linux 下 安装go

    首先肯定是下载资源包了,链接汇总在http://www.golangtc.com/download,我用的是 http://www.golangtc.com/static/go/go1.4beta1. ...

  6. maven指定项目的构建、打包和tomcat插件的pom.xml配置

    1.pom.xml添加如下配置: <build> <finalName>${parent.artifactId}</finalName> <plugins&g ...

  7. 【转载】keil(MDK-ARM)的调试使用

    现在软件的模拟功能都是非常强大,但是有时候会用不好. 原文地址: 那就看这里吧:http://www.cnblogs.com/strongerHuang/p/5596355.html 1.编译+调试 ...

  8. maven学习(二)(转)

    一.maven父工程与子模块的拆分与聚合原理 问题描述:将ssh工程拆分为多个模块开发 1.1.拆分原理 创建一个maven project(pom),然后在创建三个子模块(maven moudule ...

  9. xpath定位方法小结(转载)

    1.实例化一个浏览器WebDriver driver = new FirefoxDriver(); 2.driver.get() get传参数到浏览器中 3.常用定位方法webelement XX=d ...

  10. postgresql----继承表INHERITS PARENT TABLE

    使用INHERITS创建的新表会继承一个或多个父表,子表只会继承父表的表结构和NOT NULL,DEFAULT,CHECK三种约束,主键,外键和唯一键以及索引不会被继承,所以修改父表的结构(增删字段) ...