设为首页 收藏本站
查看: 1327|回复: 0

[经验分享] fastdfs 安装

[复制链接]
累计签到:1 天
连续签到:1 天
发表于 2015-9-10 09:09:23 | 显示全部楼层 |阅读模式
  最近看hadoop,知道了fastdfs,就想弄下看看 安装笔记
  tracker server:
192.168.56.130
storage server:
192.168.56.131
192.168.56.132
  [iyunv@Master bin]# rpm -qa|grep libevent
libevent-1.4.13-4.el6.x86_64
  [iyunv@Master data]# wget https://github.com/downloads/libevent/libevent/libevent-2.0.18-stable.tar.gz
  [iyunv@Master data]# tar xvf libevent-2.0.18-stable.tar.gz
  [iyunv@Master data]# cd libevent-2.0.18-stable
  [iyunv@Master libevent-2.0.18-stable]# ./configure && make && make install
  [iyunv@Master FastDFS]# ln -s /usr/local/lib/libevent* /lib
[iyunv@Master FastDFS]# ln -s /usr/local/lib/libevent* /lib64/
  [iyunv@Master data]# wget http://fastdfs.googlecode.com/files/FastDFS_v3.06.tar.gz
  [iyunv@Master data]# tar xvf FastDFS_v3.06.tar.gz
  [iyunv@Master data]# cd FastDFS
  [iyunv@Master 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
  [iyunv@Master FastDFS]# ./make.sh
  [iyunv@Master FastDFS]# ./make.sh install
  stracker server
  [iyunv@Master M00]# 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
  [iyunv@slave2 ~]# 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
  [iyunv@Master data]# wget http://fastdfs.googlecode.com/files/fastdfs-nginx-module_v1.10.tar.gz
  [iyunv@Master data]# tar xvf fastdfs-nginx-module_v1.10.tar.gz
  [iyunv@Master ~]# tar xvf nginx-1.0.10.tar.gz
  [iyunv@Master nginx-1.0.10]# ./configure --prefix=/data/nginx --add-module=/data/fastdfs-nginx-module/src/
  [iyunv@Master conf]# cp /data/fastdfs-nginx-module/src/mod_fastdfs.conf /etc/fdfs/
  [2014-01-03 19:36:22] 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
  [iyunv@Master logs]# vi /etc/fdfs/mod_fastdfs.conf
url_have_group_name = ture
  [iyunv@Master M00]# vi /data/nginx/conf/nginx.conf
  location /M00 {
           alias /data/fastdfs/;
           ngx_fastdfs_module;
       }
  
[iyunv@slave2 ~]#  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
  [iyunv@slave2 ~]# 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.
  [2014-01-18 02:12:19] 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、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-111766-1-1.html 上篇帖子: FastDFS安装配置 下篇帖子: Ubuntu安装配置FastDFS# HTTP settings http.disabled=false # HTTP port on this tracke
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表