贝贝爸爸的程序人生

关注Seam、BPM
posts - 23, comments - 10, trackbacks - 0, articles - 32
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

FastDFS安装笔记

Posted on 2012-03-17 16:38 贝贝爸爸 阅读(754) 评论(0)  编辑  收藏 所属分类: 程序人生
系统环境
CentOS6.2
#step 1. download libevent https://github.com/downloads/libevent/libevent/libevent-2.0.17-stable.tar.gz
$ ./configure
$ make
$ make verify   # (optional)
$ sudo make install
$ln -s /usr/local/lib/libevent-2.0.so.5 /usr/lib64/libevent-2.0.so.5
#step 2. download FastDFS source package and unpack it,
$ ./make.sh
$ ./make.sh install
#step 3. edit/modify the config file of tracker and storage
#step 3.1.
$ vim /etc/fdfs/tracker.conf
## base_path=??
## reserved_storage_space = 1GB
#step 3.2
$ vim /etc/fdfs/storage.conf
## base_path=/home/yuan/fastdfs/storage
## path(disk or mount point) count, default value is 1
## store_path_count=1
## store_path#, based 0, if store_path0 not exists, it's value is base_path
## the paths must be exist
## store_path0=/home/yuan/fastdfs0
## tracker_server=host:port
#step 4 cp the start shell into /etc/init.d
$ cd FastDFS
$ cp init.d/fdfs_trackerd /etc/init.d
$ cp init.d/fdfs_storaged /etc/init.d
#step 5 mkdir the trackerd base path and storaged base path
$ mkdir /home/yuan/fastdfs
$ mkdir /home/yuan/fastdfs0
#step 6 start trackerd service
$/sbin/service fdfs_trackerd start
###$/sbin/service fdfs_trackerd status
###$fdfs_trackerd (pid 11441) is running...
#step 7 start storaged service
$/sbin/service fdfs_storaged start
###$/sbin/service fdfs_storaged status
###$fdfs_storaged (pid 11553) is running...
#step 8. run test program
#step 8.1. vim /etc/fdfs/client.conf
###base_path=/home/yuan/fastdfs
###tracker_server=192.168.0.197:22122
#step 8.2 run test program
$/usr/local/bin/fdfs_test /etc/fdfs/client.conf upload /usr/include/stdlib.h
#step 9 monitor fdfs
$/usr/local/bin/fdfs_monitor /etc/fdfs/client.conf

只有注册用户登录后才能发表评论。


网站导航: