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存储卷创建
GlusterFS存储卷创建
53 7
|
2月前
|
存储 监控 网络协议
GlusterFS的复制
【10月更文挑战第1天】GlusterFS的复制
49 2
|
存储 Kubernetes 应用服务中间件
K8s不同node如何共享存储&&nfs 搭建(markdown版本)
K8s不同node如何共享存储&&nfs 搭建(markdown版本)
417 0
|
存储 分布式计算 Hadoop
【FastDFS】FastDFS 分布式文件系统的安装与使用,看这一篇就够了!!
有不少小伙伴在实际工作中,对于如何存储文件(图片、视频、音频等)没有一个很好的解决思路。都明白不能将文件存储在单台服务器的磁盘上,也知道需要将文件进行副本备份。如果自己手动写文件的副本机制,那就太麻烦了,这会涉及冗余副本机制、服务器的调度、副本检测、服务器节点检测、文件副本存放策略、网络环境检测等等一系列的难题。了解Hadoop的小伙伴,会自然而然的想到HDFS,
335 0
【FastDFS】FastDFS 分布式文件系统的安装与使用,看这一篇就够了!!
|
存储 网络协议 Shell
fastdfs storage节点制作过程1
fastdfs storage节点制作过程1(未完)
183 0
|
存储 负载均衡 网络协议
fastdfs的tracker文件的配这说明
fastdfs的tracker文件的配这说明 tracker.conf
366 0