jrldc 发表于 2017-1-3 18:44:15

fastDFS 集群添加group及存储

目前环境:
192.168.99.97    trackerstorage
192.168.99.98    storage
目前只有group1
需求:添加group2组,以及group2组对应存储路径storage2
1、在192.168.99.97 复制文件 cpstorage.conf   storage2.conf
2、修改storage.2conf
      group_name=group2
      port=24000
    store_path0=/data/fastdfs/storage2
    base_path=/data/fastdfs/storage2
3、修改mod_fastdfs.conf
group_count = 2
# group settings for group #1
# since v1.14
# when support multi-group, uncomment following section

group_name=group1
storage_server_port=23000
store_path_count=1
store_path0=/data/fastdfs/storage
#store_path1=/home/yuqing/fastdfs1

# group settings for group #2
# since v1.14
# when support multi-group, uncomment following section as neccessary

group_name=group2
storage_server_port=24000
store_path_count=1
store_path0=/data/fastdfs/storage2

4、启动group2 storage
fdfs_storaged/etc/fdfs/storage2.conf
5、修改 对应的nginx配置:
      location /group2/M00 {
            root /data/fastdfs/storage2/data;
                ngx_fastdfs_module;
#kuayu
                add_header Access-Control-Allow-Origin *;
                proxy_next_upstream http_502 http_504 error timeout invalid_header;
                proxy_cache http-cache;
                proxy_cache_valid200 304 12h;
                proxy_cache_key $uri$is_args$args;
                expires 30d;
}

192.168.99.98 同上,注意group_name一致。

boboge 发表于 2017-1-15 09:04:35

学习了!!
页: [1]
查看完整版本: fastDFS 集群添加group及存储