三、分布式文件系统fastDFS-安装部署
CentOS下搭建FastDFS
背景描述:
OS CentOS-6.3_x86-64
tracker 192.168.0.10
storage 192.168.0.11
1、安装libevent
1、wget https://github.com/downloads/libevent/libevent/libevent-2.0.20-stable.tar.gz
2、tar xvzf libevent-2.0.20-stable.tar.gz
3、./configure
4、make
5、make install
6、将库文件链接到/lib64
7、ln -s /usr/local/lib/libevent-2.0.so.5 /lib64/libevent-2.0.so.5
2、安装FastDFS
1、wget http://fastdfs.googlecode.com/files/FastDFS_v3.11.tar.gz
2、tar xvzf FastDFS_v3.11.tar.gz
3、修改 make.sh
4、#WITH_HTTPD --> WITH_HTTPD
5、./make.sh
6、./make.sh install
3、启动FastDFS-->tracker
创建目录/opt/fastdfs:mkdir /opt/fastdfs
修改tracker.conf配置
[root@ www.linuxidc.com ~]# vim /etc/fdfs/tracker.conf
base_path=/home/yuqing/fastdfs -> base_path=/opt/fastdfs
##include http.conf -> #include http.conf
启动tracker
/usr/local/bin/fdfs_trackerd /etc/fdfs/tracker.conf
重启
/usr/local/bin/restart.sh /usr/local/bin/fdfs_trackerd /etc/fdfs/tracker.conf
4、启动FastDFS-->storage
修改storage.conf配置
[root@ www.linuxidc.com ~]# vim /etc/fdfs/storage.conf
base_path=/home/yuqing/fastdfs --> /opt/fastdfs
store_path0=/home/yuqing/fastdfs --> store_path0=/opt/fastdfs
group_name=group1
tracker_server=192.168.209.121:22122 --> tracker_server=192.168.0.10:22122
##include http.conf --> #include http.conf
启动storage
/usr/local/bin/fdfs_storaged /etc/fdfs/storage.conf
5,上传测试
修改client.conf
[root@ www.linuxidc.com ~]# vim /etc/fdfs/client.conf
vi /etc/fdfs/client.conf
base_path=/home/yuqing/fastdfs-> base_path=/opt/fastdfs
tracker_server=192.168.209.121:22122 -> tracker_server=192.168.0.10:22122
##include http.conf ->#include http.conf
上传:
[root@ www.linuxidc.com ~]# /usr/local/bin/fdfs_test /etc/fdfs/client.conf upload FastDFS_v3.03.tar.gz
原文:http://www.linuxidc.com/Linux/2012-09/70995.htm