1. 这个benchmark使用Nutch搜索引擎来测试索引处理过程。由一个客户端机器(模拟真实client)和一个前端服务器(接受客户端请求并发送给索引节点进行处理)组成。
原安装文档地址:http://parsa.epfl.ch/cloudsuite/search.html
2. 需要的软件包(提前装好jdk 和 ant即可):
Nutch: (used Nutch v1.2).(server)
Faban kit.(client)
Tomcat.(frontend)
Search client driver (located in the package).(frontend)
Apache Ant and JDK(all nodes need)
3.四个节点10.1.1.101(client,安装Faban Kit)、10.1.103(master及frontend,frontend)、10.1.1.104(slave)、10.1.1.105(slave)
4. 注意集群内所有机器均需安装ssh服务;还有最好拥有root权限;接下来我们开始进入安装阶段,集群四个节点;
5. 软件包下载地址,其中有nutch、Tomcat、Fanban Kit安装包;http://parsa.epfl.ch/cloudsuite/software/search.tar.gz
(ps:安装faban的时候发现jdk7不能用,所以在101节点上配置的是jdk5,其他节点配置jdk7)
6. 建立集群结构,所有节点(101节点除外)均需配置;在/home/username目录下创建目录nutch-test,之后再在nutch-test目录下创建dis_search、search、filesystem、local、home、tomcat六个目录;
7. 首先我们配置master(103)节点:
- 配置好jdk和ant,之前的文章有提到,要确保JAVA_HOME指向正确的java目录;
- 解压缩search benchmark package中的Nutch压缩包:tar -zxvf apache-nutch-1.2-src.tar.gz;
- 在解压缩之后的包中新建build.properties文件,并写入以下内容:dist.dir=/home/username/nutch-test/search,下面是我配置的示例:
- 同样在解压缩的目录中,新建build目录;
- 在解压缩的目录下使用ant编译Nutch,使用以下命令:ant package;
- 编辑/home/username/nutch-test/search/conf/hadoop-env.sh文件,确保配置正确,以下是我的配置:
- 确保home/username/nutch-test/search/conf/slaves文件中写入了localhost
- 配置/home/username/nutch-test/search/conf/core-site.xml文件,fs.default.name即master节点ip地址,下面是我的配置:
其中dfs.name.dir即是name node用来存储信息的,dfs.data.dir用来存储文件块;记住这些配<?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <!-- Put site-specific property overrides in this file. --> <configuration> <property> <name>dfs.name.dir</name> <value>/home/liulan/nutch-test/filesystem/name</value> </property> <property> <name>dfs.data.dir</name> <value>/home/liulan/nutch-test/filesystem/data</value> </property> <property> <name>dfs.replication</name> <value>1</value> </property> </configuration>