= nutch 測試成功小計 = I. 環境 ubuntu 7.10 + tomcat 5.5 + jdk 1.5 + nutch 0.9 主機 (hd01~hd04).nchc.org.tw II. 目錄環境 :: * /nutch -[[br]] * -/filesystem[[br]] * -/search[[br]] * -/local[[br]] III. 修改 * /nutch/search/conf/[wiki:nutch.site.xml.nutch nutch.site.xml] * /nutch/search/conf/[wiki:hadoop.site.xml] * /nutch/search/conf/[wiki:hadoop.env.sh] * /nutch/search/conf/[wiki:crawl-urlfilter.txt] * /nutch/search/conf/[wiki:slaves] * /nutch/search/urls/urls.txt [wiki:urls.txt] IV. 指令需按照順序先後 (在/nutch/search/ 目錄下) 1. scp -r /nutch/* hd02:/nutch/ /* 重複hd03~hd04 */ ps: 居然不用 bin/hadoop namenode -format ? 神奇 2. bin/start-all.sh 3. bin/hadoop -put urls urls 4. bin/nutch crawl urls -dir crawl01 -depth 3 >& logs/crawl01.log 5. bin/hadoop dfs -copyToLocal crawl01 /nutch/local/ V. Tomcat設定 * 安裝Tomcat到hd01(只要一台即可) : * tar -zxvf apache-tomcate5.5.tar.gz -C /nutch/ * mv /nutch/apache-tomcat5.5 /nutch/tomcat * 解開nutch網頁套件到/nutch/tomcat/webapps/ROOT/中 * jar -xvf nutch-0.9.war * 修改Tomcat 設定 * /nutch/tomcat/webapps/ROOT/WEB-INF/classes/nutch.site.xml [wiki:nutch.site.xml.tomcat 不同於/nutch/search/conf] * /nutch/tomcat/conf/[wiki:server.xml] * 瀏覽網頁 hd01.nchc.org.tw:8080