fastdfs storage节点制作2

简介: fastdfs storage节点制作2(接上篇)

1 mkdir -p /home/fdfs/storage/dev1 /home/fdfs/storage/conf /home/fdfs/storage/metadata
2
vi storage.conf

disabled=false
group_name=group1
bind_addr=
client_bind=true
port=23000
connect_timeout=30
network_timeout=30
heart_beat_interval=30
stat_report_interval=60
base_path=/data/fast_data
max_connections=256
buff_size = 256KB
accept_threads=1
work_threads=4
disk_rw_separated = true
disk_reader_threads = 1
disk_writer_threads = 1
sync_wait_msec=50
sync_interval=0
sync_start_time=00:00
sync_end_time=23:59
write_mark_file_freq=500
store_path_count=1
store_path0=/home/fdfs/storage/dev1
subdir_count_per_path=256
tracker_server=10.88.1.93:22122
tracker_server=10.88.1.94:22122
log_level=debug
run_by_group=
run_by_user=
allow_hosts=*
file_distribute_path_mode=0
file_distribute_rotate_count=100
fsync_after_written_bytes=0
sync_log_buff_interval=10
sync_binlog_buff_interval=10
sync_stat_file_interval=300
thread_stack_size=512KB
upload_priority=10
if_alias_prefix=
check_file_duplicate=0
file_signature_method=hash
key_namespace=FastDFS
keep_alive=0
use_access_log = true
rotate_access_log = false
access_log_rotate_time=00:00
rotate_error_log = false
error_log_rotate_time=00:00
rotate_access_log_size = 0
rotate_error_log_size = 0
log_file_keep_days = 0
file_sync_skip_invalid_record=false
use_connection_pool = false
connection_pool_max_idle_time = 3600
http.domain_name=
http.server_port=9101
3
firewall-cmd --zone=public --add-port=23000/tcp --permanent
firewall-cmd --zone=public --add-port=9101/tcp --permanent
firewall-cmd --reload
4
vi nginx.conf

worker_processes 1;
error_log /data/fast_data/logs/nginx-error.log;

events {

worker_connections  1024;

}

http {

include       mime.types;
default_type  application/octet-stream;

log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                  '$status $body_bytes_sent "$http_referer" '
                  '"$http_user_agent" "$http_x_forwarded_for"';

access_log  /data/fast_data/logs/nginx-access.log  main;
sendfile        on;
keepalive_timeout  65;

server {
    listen       9101;
    server_name  localhost;

    location / {
        root   html;
        index  index.html index.htm;
    }

    location ~ /group1/M00 {
                root /home/fdfs/storage/dev1/data;
                ngx_fastdfs_module;
    }

    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   html;
    }
}

}

5 vi mod_fastdfs.conf

connect_timeout=30
network_timeout=30
base_path=/data/fast_data
load_fdfs_parameters_from_tracker=true
storage_sync_file_max_delay = 86400
use_storage_id = false
storage_ids_filename = storage_ids.conf
tracker_server=10.88.1.93:22122
tracker_server=10.88.1.94:22122
storage_server_port=23000
group_name=group1
url_have_group_name = true
store_path_count=1
store_path0=/home/fdfs/storage/dev1
log_level=info
log_filename=
response_mode=proxy
if_alias_prefix=
flv_support = true
flv_extension = flv
group_count = 0

include http.conf


6vi storage.sh

firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --zone=public --add-port=36000/tcp --permanent
firewall-cmd --zone=public --add-port=23000/tcp --permanent
firewall-cmd --zone=public --add-port=9101/tcp --permanent
firewall-cmd --zone=public --add-port=8080/tcp --permanent
firewall-cmd --reload

docker run -d --name storage3 --net=host --restart always \
-v /home/fdfs:/home/fdfs \
-v /home/fdfs/storage/metadata:/data/fast_data \
-v /etc/localtime:/etc/localtime \
-v /home/fdfs/storage/dev1:/fdfs/dev1/ \
-v /home/fdfs/storage/conf/storage.sh:/storage.sh \
-v /home/fdfs/storage/conf/storage.conf:/etc/fdfs/storage.conf \
-v /home/fdfs/storage/conf/nginx.conf:/etc/nginx/conf/nginx.conf \
-v /home/fdfs/storage/conf/mod_fastdfs.conf:/etc/fdfs/mod_fastdfs.conf \
-v /home/fdfs/storage/conf/client.conf:/data/fastdfs/conf/client.conf \
--privileged=true \
morunchang/fastdfs sh storage.sh
docker exec -it storage fdfs_monitor /data/fastdfs/conf/client.conf
docker exec -it storage3 fdfs_monitor /data/fast_data/conf/client.conf
docker exec -it storage3 fdfs_monitor /etc/fdfs/client.conf

docker run -d --name tracker1 --net=host --restart always \
-v /etc/localtime:/etc/localtime \
-v /fdfs/tracker/data:/data/fast_data/ \
-v /fdfs/tracker/conf/tracker.conf:/etc/fdfs/tracker.conf \
507f49bcf727 sh tracker.sh

相关文章
|
7月前
|
存储 负载均衡 Linux
|
2月前
|
存储 监控 网络协议
GlusterFS的复制
【10月更文挑战第1天】GlusterFS的复制
45 2
|
7月前
|
存储 负载均衡 容灾
Fastdfs安装与配置
Fastdfs安装与配置
|
存储 负载均衡 网络协议
fastdfs部署
FastDFS 是一个开源的高性能分布式文件系统。它的主要功能包括:文件存储、文件同步和文件访问(文件上传和文件下载),它可以解决高容量和负载均衡问题。FastDFS应该能满足图片分享网站、视频分享网站等以文件为基础服务的网站的要求。 FastDFS有两个角色:tracker和storage。跟踪器负责文件访问的调度和负载均衡。storage 存储文件,其功能是文件管理,包括:文件存储,文件同步,提供文件访问接口。它还管理元数据,这些元数据是表示文件键值对的属性。例如:width=1024,键为“width”,值为“1024”
370 0
fastdfs部署
|
存储 Linux 数据安全/隐私保护
【Storage】ISCSI IPSAN服务搭建
基于CentOS7的,不是WinServ啦
2386 0
【Storage】ISCSI IPSAN服务搭建
|
存储 网络协议 Shell
fastdfs storage节点制作过程1
fastdfs storage节点制作过程1(未完)
183 0
|
存储 负载均衡 网络协议
fastdfs的tracker文件的配这说明
fastdfs的tracker文件的配这说明 tracker.conf
363 0
|
存储 负载均衡 文件存储