fvgb 发表于 2015-9-10 09:09:23

fastdfs 安装

  最近看hadoop,知道了fastdfs,就想弄下看看 安装笔记
  tracker server:
192.168.56.130
storage server:
192.168.56.131
192.168.56.132
  # rpm -qa|grep libevent
libevent-1.4.13-4.el6.x86_64
  # wget https://github.com/downloads/libevent/libevent/libevent-2.0.18-stable.tar.gz
  # tar xvf libevent-2.0.18-stable.tar.gz
  # cd libevent-2.0.18-stable
  # ./configure && make && make install
  # ln -s /usr/local/lib/libevent* /lib
# ln -s /usr/local/lib/libevent* /lib64/
  # wget http://fastdfs.googlecode.com/files/FastDFS_v3.06.tar.gz
  # tar xvf FastDFS_v3.06.tar.gz
  # cd FastDFS
  # more INSTALL
  #step 1. download libevent 1.4.x and install it
  #step 2. download FastDFS source package and unpack it,
tar xzf FastDFS_v3.x.tar.gz
#for example:
tar xzf FastDFS_v3.05.tar.gz
  #step 3. enter the FastDFS dir
cd FastDFS
  #step 4. if build-in HTTP supported, modify make.sh, uncomment the line:
# WITH_HTTPD=1, then execute:
./make.sh
  #step 5. make install
./make.sh install
  # ./make.sh
  # ./make.sh install
  stracker server
  # grep -Ev '^$|^#' /etc/fdfs/tracker.conf
disabled=false
bind_addr=
port=22122
connect_timeout=30
network_timeout=60
base_path=/data/fastdfs
max_connections=256
work_threads=4
store_lookup=2
store_group=group2
store_server=0
store_path=0
download_server=0
reserved_storage_space = 4GB
log_level=info
run_by_group=
run_by_user=
allow_hosts=*
sync_log_buff_interval = 10
check_active_interval = 120
thread_stack_size = 64KB
storage_ip_changed_auto_adjust = true
storage_sync_file_max_delay = 86400
storage_sync_file_max_time = 300
use_trunk_file = false
slot_min_size = 256
slot_max_size = 16MB
trunk_file_size = 64MB
trunk_create_file_advance = false
trunk_create_file_time_base = 02:00
trunk_create_file_interval = 86400
trunk_create_file_space_threshold = 20G
http.disabled=false
http.server_port=8080
http.check_alive_interval=30
http.check_alive_type=tcp
http.check_alive_uri=/status.html
http.need_find_content_type=true
  # grep -Ev '^$|^#' /etc/fdfs/storage.conf
disabled=false
group_name=group1
bind_addr=
client_bind=true
port=23000
connect_timeout=30
network_timeout=60
heart_beat_interval=30
stat_report_interval=60
base_path=/data/fastdfs
max_connections=256
buff_size = 256KB
work_threads=4
disk_rw_separated = true
disk_rw_direct = false
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=/data/images
subdir_count_per_path=256
tracker_server=192.168.56.130:22122
log_level=info
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
key_namespace=FastDFS
keep_alive=0
http.disabled=false
http.domain_name=
http.server_port=8888
http.trunk_size=256KB
http.need_find_content_type=true
  # wget http://fastdfs.googlecode.com/files/fastdfs-nginx-module_v1.10.tar.gz
  # tar xvf fastdfs-nginx-module_v1.10.tar.gz
  # tar xvf nginx-1.0.10.tar.gz
  # ./configure --prefix=/data/nginx --add-module=/data/fastdfs-nginx-module/src/
  # cp /data/fastdfs-nginx-module/src/mod_fastdfs.conf /etc/fdfs/
   DEBUG - file: /data/fastdfs-nginx-module/src//common.c, line: 623, redirect to http://192.168.56.132/M00/00/00/wKg4hFLZUOjCf0AtAAAAGPQRP7U65_big.html?redirect=1
  # vi /etc/fdfs/mod_fastdfs.conf
url_have_group_name = ture
  # vi /data/nginx/conf/nginx.conf
  location /M00 {
         alias /data/fastdfs/;
         ngx_fastdfs_module;
       }
  
#grep -Ev '^$|^#' /etc/fdfs/client.conf
connect_timeout=30
network_timeout=60
base_path=/data/fastdfs
tracker_server=192.168.56.130:22122
log_level=info
http.tracker_server_port=80
  # fdfs_test /etc/fdfs/client.conf upload aa.html
This is FastDFS client test program v3.06
  Copyright (C) 2008, Happy Fish / YuQing
  FastDFS may be copied only under the terms of the GNU General
Public License V3, which may be found in the FastDFS source kit.
Please visit the FastDFS Home Page http://www.csource.org/
for more detail.
   INFO - base_path=/data/fastdfs, connect_timeout=30, network_timeout=60, tracker_server_count=1, anti_steal_token=0, anti_steal_secret_key length=0
  tracker_query_storage_store_list_without_group:
      server 1. group_name=group1, ip_addr=192.168.56.131, port=23000
      server 2. group_name=group1, ip_addr=192.168.56.132, port=23000
  group_name=group1, ip_addr=192.168.56.132, port=23000
storage_upload_by_filename
group_name=group1, remote_filename=M00/00/00/wKg4hFLZcoPxiC3gAAAAGPQRP7U66.html
source ip address: 192.168.56.132
file timestamp=2014-01-18 02:12:19
file size=24
file crc32=4094771125
file url: http://192.168.56.130/group1/M00/00/00/wKg4hFLZcoPxiC3gAAAAGPQRP7U66.html
storage_upload_slave_by_filename
group_name=group1, remote_filename=M00/00/00/wKg4hFLZcoPxiC3gAAAAGPQRP7U66_big.html
source ip address: 192.168.56.132
file timestamp=2014-01-18 02:12:19
file size=24
file crc32=4094771125
file url: http://192.168.56.130/group1/M00/00/00/wKg4hFLZcoPxiC3gAAAAGPQRP7U66_big.html
  
页: [1]
查看完整版本: fastdfs 安装