Centos6.3 下安装 FastDHT + FastDFS

FastDHT-高效分布式Hash系统

  1. http://www.cnblogs.com/netflu/archive/2011/06/20/2085345.html
  2. http://code.google.com/p/fastdht/

FastDHT是一个基于键值对(Key Value Pair)的高效的分布式Hash系统,她可以用来存储大量的Key Value
Pair,比如可以用来存储文件名映射表、session数据、用户相关数据等等。

FastDHT服务器端底层存储采用Berkeley
DB,支持大数据量;网络IO采用libevent,支持大并发连接。FastDHT只用到了BDB最基本的存储功能,数据同步是自己实现的,采用了binlog的复制方式。

FastDFS - 分布式文件系统

  1. http://www.programmer.com.cn/4380/
  2. http://bbs.chinaunix.net/forum-240-1.html
  3. http://fastdfs.googlecode.com/
  4. http://team.91town.com/2011/11/%E6%B5%85%E6%9E%90fastdfs%E5%8F%8A%E6%89%80%E9%81%87%E9%97%AE%E9%A2%98%E9%9B%86%E9%94%A6/

FastDFS是一款类Google FS的开源分布式文件系统,它用纯C语言实现,支持Linux、FreeBSD、AIX等UNIX系统。它只能通过专有API对文件进行存取访问,不支持POSIX接口方式,不能mount使用。准确地讲,Google FS以及FastDFS、mogileFS、HDFS、TFS等类Google FS都不是系统级的分布式文件系统,而是应用级的分布式文件存储服务。

下载文件

wget https://fastdht.googlecode.com/files/FastDHT_v1.22.tar.gz -P /data/soft/src/
wget http://fastdfs.googlecode.com/files/FastDFS_v4.05.tar.gz -P /data/soft/src/

进入安装目录

mkdir /data/soft/install
cd /data/soft/install

安装 FastDHT_v1.20

yum install libevent libevent-devel    
tar xzvf /data/soft/src/FastDHT_v1.22.tar.gz -C /data/soft/install
cd FastDHT
./make.sh; ./make.sh install

mkdir /data/fastdht

sudo sed -i "s/192.168.0.196:11411/192.168.0.101:11411/g" /etc/fdht/fdht_servers.conf
sudo sed -i "s/192.168.0.116:11411/192.168.0.101:11412/g" /etc/fdht/fdht_servers.conf
sudo sed -i "s/home\/yuqing\/fastdht/data\/fastdht/g" /etc/fdht/fdhtd.conf

/usr/local/bin/fdhtd /etc/fdht/fdhtd.conf


Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name
tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN      8368/mysqld
tcp        0      0 0.0.0.0:11411               0.0.0.0:*                   LISTEN      26989/fdhtd
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      1607/sshd
tcp        0      0 115.236.73.152:25           0.0.0.0:*                   LISTEN      29417/sendmail
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      1240/master
tcp        0      0 :::80                       :::*                        LISTEN      12111/httpd
tcp        0      0 :::22                       :::*                        LISTEN      1607/sshd
tcp        0      0 ::1:25                      :::*                        LISTEN      1240/master

FastDFS

tar xzvf /data/soft/src/FastDFS_v4.05.tar.gz -C /data/soft/install
./make.sh
./make.sh install

mkdir /data/fastdfs

sudo sed -i "s/192.168.0.197/192.168.0.101/g" /etc/fdfs/client.conf
sudo sed -i "s/##include http.conf/#include http.conf/g" /etc/fdfs/client.conf
sudo sed -i "s/home\/yuqing/data/g" /etc/fdfs/client.conf

sudo sed -i "s/192.168.209.121/192.168.0.101/g" /etc/fdfs/storage.conf
sudo sed -i "s/home\/yuqing/data/g" /etc/fdfs/storage.conf


sudo sed -i "s/home\/yuqing/data/g" /etc/fdfs/tracker.conf

/usr/local/bin/fdfs_trackerd /etc/fdfs/tracker.conf
/usr/local/bin/fdfs_storaged /etc/fdfs/storage.conf

你可能感兴趣的:(Centos6.3 下安装 FastDHT + FastDFS)