Skip to content

armgit / nutch

Public Imported from GitHub
0

Apache Nutch is an extensible and scalable web crawler

- progress towards NUTCH-833 Website is still Lucene branded

Chris Mattmann080834ee9c29
diff --git a/src/site/src/documentation/content/xdocs/about.xml b/src/site/src/documentation/content/xdocs/about.xml
index 74990345b..7e463159f 100644
--- a/src/site/src/documentation/content/xdocs/about.xml
+++ b/src/site/src/documentation/content/xdocs/about.xml
@@ -27,7 +27,7 @@
<section>
<title>Overview</title> <p>Nutch is open source web-search
- software. It builds on <a href="ext:lucene">Lucene and SolR</a>,
+ software. It builds on <a href="ext:lucene">Lucene and Solr</a>,
adding web-specifics, such as a crawler, a link-graph database,
parsers for HTML and other document formats, etc.</p>
@@ -35,7 +35,7 @@
strength from running in a <a href="ext:hadoop">Hadoop cluster</a></p>
<p>The system can be enhanced (eg other document formats can be
- parsed) using a plugin mechanism</p>
+ parsed) using a plugin mechanism.</p>
<p>For more information about Nutch, please see the <a
href="ext:wiki">Nutch wiki.</a></p>
diff --git a/src/site/src/documentation/content/xdocs/bot.xml b/src/site/src/documentation/content/xdocs/bot.xml
index 4c2bb58be..e81b2ffc6 100644
--- a/src/site/src/documentation/content/xdocs/bot.xml
+++ b/src/site/src/documentation/content/xdocs/bot.xml
@@ -36,7 +36,7 @@ a misbehaving crawler appearing with our Agent string is not run by
us. Our software may be run by anyone. However, we'd still like to
hear about any bad behavior. If possible, please include the name of
the domain and some representative log entries. We can be reached at
-<a href="mailto:[email protected]">[email protected]</a>.</p>
+<a href="mailto:[email protected]">[email protected]</a>.</p>
<p> Our software obeys the robots.txt exclusion standard, described at
<a href="http://www.robotstxt.org/wc/exclusion.html#robotstxt">
@@ -67,7 +67,7 @@ http://www.robotstxt.org/wc/meta-user.html</a>. </p>
<section><title>Contact us</title>
<p>If your site has problems or questions about the Nutch crawler, please
-send an email to the <a href="mailto:[email protected]">Nutch agent
+send an email to the <a href="mailto:[email protected]">Nutch agent
mailing list</a>.</p>
</section>
diff --git a/src/site/src/documentation/content/xdocs/faq.xml b/src/site/src/documentation/content/xdocs/faq.xml
deleted file mode 100644
index 20af9dc23..000000000
--- a/src/site/src/documentation/content/xdocs/faq.xml
+++ /dev/null
@@ -1,90 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN"
- "http://forrest.apache.org/dtd/document-v20.dtd">
-<document>
-
-<header>
- <title>Nutch FAQ</title>
-</header>
-
-<body>
-
-<section>
-<title>How can I stop Nutch from crawling my site?</title>
-
-<p>Please visit our <a href="bot.html">webmaster info page</a>.</p>
-
-</section>
-
-<section>
-<title>Will Nutch be a distributed, P2P-based search engine?</title>
-
-<p>We don't think it is presently possible to build a peer-to-peer
-search engine that is competitive with existing search engines. It
-would just be too slow. Returning results in less than a second is
-important: it lets people rapidly reformulate their queries so that
-they can more often find what they're looking for. In short, a fast
-search engine is a better search engine. I don't think many people
-would want to use a search engine that takes ten or more seconds to
-return results.</p>
-
-<p>That said, if someone wishes to start a sub-project of Nutch
-exploring distributed searching, we'd love to host it. We don't think
-these techniques are likely to solve the hard problems Nutch needs to
-solve, but we'd be happy to be proven wrong.</p>
-
-</section>
-
-<section>
-<title>Will Nutch use a distributed crawler, like <a
-href="http://www.grub.org/">Grub</a>?</title>
-
-<p>Distributed crawling can save download bandwidth, but, in the long
-run, the savings is not significant. A successful search engine
-requires more bandwidth to upload query result pages than its crawler
-needs to download pages, so making the crawler use less bandwidth does
-not reduce overall bandwidth requirements. The dominant expense of
-operating a search engine is not crawling, but searching.</p>
-
-</section>
-
-<section>
-<title>Won't open source just make it easier for sites to manipulate
-rankings?</title>
-
-<p>Search engines work hard to construct ranking algorithms that are
-immune to manipulation. Search engine optimizers still manage to
-reverse-engineer the ranking algorithms used by search engines, and
-improve the ranking of their pages. For example, many sites use link
-farms to manipulate search engines' link-based ranking algorithms, and
-search engines retaliate by improving their link-based algorithms to
-neutralize the effect of link farms.</p>
-
-<p>With an open-source search engine, this will still happen, just out
-in the open. This is analagous to encryption and virus protection
-software. In the long term, making such algorithms open source makes
-them stronger, as more people can examine the source code to find
-flaws and suggest improvements. Thus we believe that an open source
-search engine has the potential to better resist manipulation of its
-rankings.</p>
-
-</section>
-
-</body>
-</document>
diff --git a/src/site/src/documentation/content/xdocs/index.xml b/src/site/src/documentation/content/xdocs/index.xml
index 55ebb93d6..6901e890e 100644
--- a/src/site/src/documentation/content/xdocs/index.xml
+++ b/src/site/src/documentation/content/xdocs/index.xml
@@ -123,9 +123,9 @@
<title>23 March 2009 - Apache Nutch 1.0 Released</title>
<p>The 1.0 release of Nutch is now available. This release includes several major feature improvements
such as new indexing framework, new scoring framework, Apache Solr integration just to mention a few.
- See <a href="http://www.apache.org/dist/lucene/nutch/CHANGES-1.0.txt">
+ See <a href="http://www.apache.org/dist/nutch/CHANGES-1.0.txt">
list of changes</a> made in this version. The release is available
- <a href="http://lucene.apache.org/nutch/release/">here</a>.</p>
+ <a href="http://www.apache.org/dyn/closer.cgi/nutch/">here</a>.</p>
</section>
<section>
@@ -163,49 +163,49 @@
based entirely on the underlying Hadoop platform. This release includes several critical
bug fixes, as well as key speedups described in more detail at
<a href="http://blog.foofactory.fi/2007/03/twice-speed-half-size.html">Sami Siren's blog</a>.
- See <a href="http://www.apache.org/dist/lucene/nutch/CHANGES-0.9.txt">
+ See <a href="http://www.apache.org/dist/nutch/CHANGES-0.9.txt">
list of changes</a> made in this version. The release is available
- <a href="http://lucene.apache.org/nutch/release/">here</a>.</p>
+ <a href="http://www.apache.org/dyn/closer.cgi/nutch/">here</a>.</p>
</section>
<section>
<title>24 September 2006: Nutch 0.8.1 Released</title>
<p>The 0.8.1 release of Nutch is now available. This is a maintenance release to 0.8 branch fixing many serous bugs found in version 0.8.
- See <a href="http://www.apache.org/dist/lucene/nutch/CHANGES-0.8.1.txt">
+ See <a href="http://www.apache.org/dist/nutch/CHANGES-0.8.1.txt">
list of changes</a> made in this version. The release is available
- <a href="http://lucene.apache.org/nutch/release/">here</a>.</p>
+ <a href="http://www.apache.org/dyn/closer.cgi/nutch/">here</a>.</p>
</section>
<section>
<title>25 July 2006: Nutch 0.8 Released</title>
<p>The 0.8 release of Nutch is now available. This is the first release of Nutch based on
- hadoop architecure. See <a href="http://svn.apache.org/viewvc/lucene/nutch/tags/release-0.8/CHANGES.txt?view=markup">
+ hadoop architecure. See <a href="http://svn.apache.org/viewvc/nutch/tags/release-0.8/CHANGES.txt?view=markup">
CHANGES.txt</a> for list of changes made in this version. The release is available
- <a href="http://lucene.apache.org/nutch/release/">here</a>.</p>
+ <a href="http://www.apache.org/dyn/closer.cgi/nutch/">here</a>.</p>
</section>
<section>
<title>31 March 2006: Nutch 0.7.2 Released</title>
<p>The 0.7.2 release of Nutch is now available. This is a bug fix release for 0.7 branch. See
- <a href="http://svn.apache.org/viewcvs.cgi/lucene/nutch/branches/branch-0.7/CHANGES.txt?rev=390158">
+ <a href="http://svn.apache.org/viewcvs.cgi/nutch/branches/branch-0.7/CHANGES.txt?rev=390158">
CHANGES.txt</a> for details. The release is available
- <a href="http://lucene.apache.org/nutch/release/">here</a>.</p>
+ <a href="http://www.apache.org/dyn/closer.cgi/nutch/">here</a>.</p>
</section>
<section>
<title>1 October 2005: Nutch 0.7.1 Released</title>
<p>The 0.7.1 release of Nutch is now available. This is a bug fix release. See
- <a href="http://svn.apache.org/viewcvs.cgi/lucene/nutch/branches/branch-0.7/CHANGES.txt?rev=292986">
+ <a href="http://svn.apache.org/viewcvs.cgi/nutch/branches/branch-0.7/CHANGES.txt?rev=292986">
CHANGES.txt</a> for details. The release is available
- <a href="http://lucene.apache.org/nutch/release/">here</a>.</p>
+ <a href="http://www.apache.org/dyn/closer.cgi/nutch/">here</a>.</p>
</section>
<section>
<title>17 August 2005: Nutch 0.7 Released</title>
<p>This is the first Nutch release as an Apache Lucene sub-project. See
- <a href="http://svn.apache.org/viewcvs.cgi/lucene/nutch/trunk/CHANGES.txt?rev=233150">
+ <a href="http://svn.apache.org/viewcvs.cgi/nutch/trunk/CHANGES.txt?rev=233150">
CHANGES.txt</a> for details. The release is available
- <a href="http://lucene.apache.org/nutch/release/">here</a>.</p>
+ <a href="http://www.apache.org/dyn/closer.cgi/nutch/">here</a>.</p>
</section>
diff --git a/src/site/src/documentation/content/xdocs/mailing_lists.xml b/src/site/src/documentation/content/xdocs/mailing_lists.xml
index 48afd1e4a..2ee37b0ae 100644
--- a/src/site/src/documentation/content/xdocs/mailing_lists.xml
+++ b/src/site/src/documentation/content/xdocs/mailing_lists.xml
@@ -90,7 +90,7 @@
<p>
The Nutch agent mailing list is :
- <a href="mailto:[email protected]">[email protected]</a>.
+ <a href="mailto:[email protected]">[email protected]</a>.
</p>
<ul>
<li><a href="mailto:[email protected]">Subscribe to List</a></li>
diff --git a/src/site/src/documentation/content/xdocs/nightly.xml b/src/site/src/documentation/content/xdocs/nightly.xml
index e3650cfad..53a6975ea 100644
--- a/src/site/src/documentation/content/xdocs/nightly.xml
+++ b/src/site/src/documentation/content/xdocs/nightly.xml
@@ -35,7 +35,7 @@
To report bugs see <a href="issue_tracking.html">issue tracking</a>
</p>
<p>
- <a href="http://people.apache.org/builds/lucene/nutch/nightly/">Nutch nightly builds</a>
+ <a href="http://hudson.zones.apache.org/hudson/view/Nutch/job/Nutch-trunk/lastSuccessfulBuild/artifact/">Nutch nightly builds</a>
</p>
</body>
diff --git a/src/site/src/documentation/content/xdocs/tabs.xml b/src/site/src/documentation/content/xdocs/tabs.xml
index c3f3475cb..11e59447f 100644
--- a/src/site/src/documentation/content/xdocs/tabs.xml
+++ b/src/site/src/documentation/content/xdocs/tabs.xml
@@ -31,6 +31,6 @@
<tab label="Main" dir=""/>
<tab label="Wiki" href="http://wiki.apache.org/nutch/"/>
- <tab label="Jira" href="http://issues.apache.org/jira/browse/Nutch"/>
+ <tab label="Jira" href="http://issues.apache.org/jira/browse/NUTCH"/>
</tabs>
diff --git a/src/site/src/documentation/content/xdocs/tutorial.xml b/src/site/src/documentation/content/xdocs/tutorial.xml
deleted file mode 100644
index 7460750ff..000000000
--- a/src/site/src/documentation/content/xdocs/tutorial.xml
+++ /dev/null
@@ -1,291 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN"
- "http://forrest.apache.org/dtd/document-v20.dtd">
-
-<document>
-
-<header>
- <title>Nutch version 0.7 tutorial</title>
-</header>
-
-<body>
-
-<section>
-<title>Requirements</title>
-<ol>
- <li>Java 1.4.x, either from <a
- href="http://java.sun.com/j2se/downloads.html">Sun</a> or <a
- href="http://www-106.ibm.com/developerworks/java/jdk/">IBM</a> on
- Linux is preferred. Set <code>NUTCH_JAVA_HOME</code> to the root
- of your JVM installation.
- </li>
- <li>Apache's <a href="http://jakarta.apache.org/tomcat/">Tomcat</a>
-4.x.</li>
- <li>On Win32, <a href="http://www.cygwin.com/">cygwin</a>, for
-shell support. (If you plan to use Subversion on Win32, be sure to select the subversion package when you install, in the "Devel" category.)</li>
- <li>Up to a gigabyte of free disk space, a high-speed connection, and
-an hour or so.
- </li>
-</ol>
-</section>
-<section>
-<title>Getting Started</title>
-
-<p>First, you need to get a copy of the Nutch code. You can download
-a release from <a
-href="http://lucene.apache.org/nutch/release/">http://lucene.apache.org/nutch/release/</a>.
-Unpack the release and connect to its top-level directory. Or, check
-out the latest source code from <a
-href="version_control.html">subversion</a> and build it
-with <a href="http://ant.apache.org/">Ant</a>.</p>
-
-<p>Try the following command:</p>
-<source>bin/nutch</source>
-<p>This will display the documentation for the Nutch command script.</p>
-
-<p>Now we're ready to crawl. There are two approaches to crawling:</p>
-<ol>
-<li>Intranet crawling, with the <code>crawl</code> command.</li>
-<li>Whole-web crawling, with much greater control, using the lower
-level <code>inject</code>, <code>generate</code>, <code>fetch</code>
-and <code>updatedb</code> commands.</li>
-</ol>
-
-</section>
-<section>
-<title>Intranet Crawling</title>
-
-<p>Intranet crawling is more appropriate when you intend to crawl up to
-around one million pages on a handful of web servers.</p>
-
-<section>
-<title>Intranet: Configuration</title>
-
-<p>To configure things for intranet crawling you must:</p>
-
-<ol>
-
-<li>Create a flat file of root urls. For example, to crawl the
-<code>nutch</code> site you might start with a file named
-<code>urls</code> containing just the Nutch home page. All other
-Nutch pages should be reachable from this page. The <code>urls</code>
-file would thus look like:
-<source>
-http://lucene.apache.org/nutch/
-</source>
-</li>
-
-<li>Edit the file <code>conf/crawl-urlfilter.txt</code> and replace
-<code>MY.DOMAIN.NAME</code> with the name of the domain you wish to
-crawl. For example, if you wished to limit the crawl to the
-<code>apache.org</code> domain, the line should read:
-<source>
-+^http://([a-z0-9]*\.)*apache.org/
-</source>
-This will include any url in the domain <code>apache.org</code>.
-</li>
-
-</ol>
-
-</section>
-<section>
-<title>Intranet: Running the Crawl</title>
-
-<p>Once things are configured, running the crawl is easy. Just use the
-crawl command. Its options include:</p>
-
-<ul>
-<li><code>-dir</code> <em>dir</em> names the directory to put the crawl in.</li>
-<li><code>-depth</code> <em>depth</em> indicates the link depth from the root
-page that should be crawled.</li>
-<li><code>-delay</code> <em>delay</em> determines the number of seconds
-between accesses to each host.</li>
-<li><code>-threads</code> <em>threads</em> determines the number of
-threads that will fetch in parallel.</li>
-</ul>
-
-<p>For example, a typical call might be:</p>
-
-<source>
-bin/nutch crawl urls -dir crawl.test -depth 3 >&amp; crawl.log
-</source>
-
-<p>Typically one starts testing one's configuration by crawling at low
-depths, and watching the output to check that desired pages are found.
-Once one is more confident of the configuration, then an appropriate
-depth for a full crawl is around 10.</p>
-
-<p>Once crawling has completed, one can skip to the Searching section
-below.</p>
-
-</section>
-</section>
-
-<section>
-<title>Whole-web Crawling</title>
-
-<p>Whole-web crawling is designed to handle very large crawls which may
-take weeks to complete, running on multiple machines.</p>
-
-<section>
-<title>Whole-web: Concepts</title>
-
-<p>Nutch data is of two types:</p>
-
-<ol>
- <li>The web database. This contains information about every
-page known to Nutch, and about links between those pages.</li>
- <li>A set of segments. Each segment is a set of pages that are
-fetched and indexed as a unit. Segment data consists of the
-following types:</li>
- <li><ul>
- <li>a <em>fetchlist</em> is a file
-that names a set of pages to be fetched</li>
- <li>the<em> fetcher output</em> is a
-set of files containing the fetched pages</li>
- <li>the <em>index </em>is a
-Lucene-format index of the fetcher output.</li>
- </ul></li>
-</ol>
-<p>In the following examples we will keep our web database in a directory
-named <code>db</code> and our segments
-in a directory named <code>segments</code>:</p>
-<source>mkdir db
-mkdir segments</source>
-
-</section>
-<section>
-<title>Whole-web: Boostrapping the Web Database</title>
-<p>The admin tool is used to create a new, empty database:</p>
-
-<source>bin/nutch admin db -create</source>
-
-<p>The <em>injector</em> adds urls into the database. Let's inject
-URLs from the <a href="http://dmoz.org/">DMOZ</a> Open
-Directory. First we must download and uncompress the file listing all
-of the DMOZ pages. (This is a 200+Mb file, so this will take a few
-minutes.)</p>
-
-<source>wget http://rdf.dmoz.org/rdf/content.rdf.u8.gz
-gunzip content.rdf.u8.gz</source>
-
-<p>Next we inject a random subset of these pages into the web database.
- (We use a random subset so that everyone who runs this tutorial
-doesn't hammer the same sites.) DMOZ contains around three million
-URLs. We inject one out of every 3000, so that we end up with
-around 1000 URLs:</p>
-
-<source>bin/nutch inject db -dmozfile content.rdf.u8 -subset 3000</source>
-
-<p>This also takes a few minutes, as it must parse the full file.</p>
-
-<p>Now we have a web database with around 1000 as-yet unfetched URLs in it.</p>
-
-</section>
-<section>
-<title>Whole-web: Fetching</title>
-<p>To fetch, we first generate a fetchlist from the database:</p>
-<source>bin/nutch generate db segments
-</source>
-<p>This generates a fetchlist for all of the pages due to be fetched.
- The fetchlist is placed in a newly created segment directory.
- The segment directory is named by the time it's created. We
-save the name of this segment in the shell variable <code>s1</code>:</p>
-<source>s1=`ls -d segments/2* | tail -1`
-echo $s1
-</source>
-<p>Now we run the fetcher on this segment with:</p>
-<source>bin/nutch fetch $s1</source>
-<p>When this is complete, we update the database with the results of the
-fetch:</p>
-<source>bin/nutch updatedb db $s1</source>
-<p>Now the database has entries for all of the pages referenced by the
-initial set.</p>
-
-<p>Now we fetch a new segment with the top-scoring 1000 pages:</p>
-<source>bin/nutch generate db segments -topN 1000
-s2=`ls -d segments/2* | tail -1`
-echo $s2
-
-bin/nutch fetch $s2
-bin/nutch updatedb db $s2
-</source>
-<p>Let's fetch one more round:</p>
-<source>
-bin/nutch generate db segments -topN 1000
-s3=`ls -d segments/2* | tail -1`
-echo $s3
-
-bin/nutch fetch $s3
-bin/nutch updatedb db $s3
-</source>
-
-<p>By this point we've fetched a few thousand pages. Let's index
-them!</p>
-
-</section>
-<section>
-<title>Whole-web: Indexing</title>
-<p>To index each segment we use the <code>index</code>
-command, as follows:</p>
-<source>bin/nutch index $s1
-bin/nutch index $s2
-bin/nutch index $s3</source>
-
-<p>Then, before we can search a set of segments, we need to delete
-duplicate pages. This is done with:</p>
-
-<source>bin/nutch dedup segments dedup.tmp</source>
-
-<p>Now we're ready to search!</p>
-
-</section>
-<section>
-<title>Searching</title>
-
-<p>To search you need to put the nutch war file into your servlet
-container. (If instead of downloading a Nutch release you checked the
-sources out of SVN, then you'll first need to build the war file, with
-the command <code>ant war</code>.)</p>
-
-<p>Assuming you've unpacked Tomcat as ~/local/tomcat, then the Nutch war
-file may be installed with the commands:</p>
-
-<source>rm -rf ~/local/tomcat/webapps/ROOT*
-cp nutch*.war ~/local/tomcat/webapps/ROOT.war
-</source>
-
-<p>The webapp finds its indexes in <code>./segments</code>, relative
-to where you start Tomcat, so, if you've done intranet crawling,
-connect to your crawl directory, or, if you've done whole-web
-crawling, don't change directories, and give the command:</p>
-
-<source>~/local/tomcat/bin/catalina.sh start
-</source>
-
-<p>Then visit <a href="http://localhost:8080/">http://localhost:8080/</a>
-and have fun!</p>
-
-<p>More detailed tutorials are available on the Nutch Wiki.
-</p>
-</section>
-</section>
-
-</body>
-</document>
diff --git a/src/site/src/documentation/content/xdocs/tutorial8.xml b/src/site/src/documentation/content/xdocs/tutorial8.xml
deleted file mode 100644
index 6310196fe..000000000
--- a/src/site/src/documentation/content/xdocs/tutorial8.xml
+++ /dev/null
@@ -1,420 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN"
- "http://forrest.apache.org/dtd/document-v20.dtd">
-
-<document>
-
-<header>
- <title>Nutch version 0.8.x tutorial</title>
-</header>
-
-<body>
-
-<section>
-<title>Requirements</title>
-<ol>
- <li>Java 1.4.x, either from <a
- href="http://java.sun.com/j2se/downloads.html">Sun</a> or <a
- href="http://www-106.ibm.com/developerworks/java/jdk/">IBM</a> on
- Linux is preferred. Set <code>NUTCH_JAVA_HOME</code> to the root
- of your JVM installation.
- </li>
- <li>Apache's <a href="http://jakarta.apache.org/tomcat/">Tomcat</a>
-4.x.</li>
- <li>On Win32, <a href="http://www.cygwin.com/">cygwin</a>, for
-shell support. (If you plan to use Subversion on Win32, be sure to select the subversion package when you install, in the "Devel" category.)</li>
- <li>Up to a gigabyte of free disk space, a high-speed connection, and
-an hour or so.
- </li>
-</ol>
-</section>
-<section>
-<title>Getting Started</title>
-
-<p>First, you need to get a copy of the Nutch code. You can download
-a release from <a
-href="http://lucene.apache.org/nutch/release/">http://lucene.apache.org/nutch/release/</a>.
-Unpack the release and connect to its top-level directory. Or, check
-out the latest source code from <a
-href="version_control.html">subversion</a> and build it
-with <a href="http://ant.apache.org/">Ant</a>.</p>
-
-<p>Try the following command:</p>
-<source>bin/nutch</source>
-<p>This will display the documentation for the Nutch command script.</p>
-
-<p>Now we're ready to crawl. There are two approaches to crawling:</p>
-<ol>
-<li>Intranet crawling, with the <code>crawl</code> command.</li>
-<li>Whole-web crawling, with much greater control, using the lower
-level <code>inject</code>, <code>generate</code>, <code>fetch</code>
-and <code>updatedb</code> commands.</li>
-</ol>
-
-</section>
-<section>
-<title>Intranet Crawling</title>
-
-<p>Intranet crawling is more appropriate when you intend to crawl up to
-around one million pages on a handful of web servers.</p>
-
-<section>
-<title>Intranet: Configuration</title>
-
-<p>To configure things for intranet crawling you must:</p>
-
-<ol>
-
-<li>Create a directory with a flat file of root urls. For example, to
-crawl the <code>nutch</code> site you might start with a file named
-<code>urls/nutch</code> containing the url of just the Nutch home
-page. All other Nutch pages should be reachable from this page. The
-<code>urls/nutch</code> file would thus contain:
-<source>
-http://lucene.apache.org/nutch/
-</source>
-</li>
-
-<li>Edit the file <code>conf/crawl-urlfilter.txt</code> and replace
-<code>MY.DOMAIN.NAME</code> with the name of the domain you wish to
-crawl. For example, if you wished to limit the crawl to the
-<code>apache.org</code> domain, the line should read:
-<source>
-+^http://([a-z0-9]*\.)*apache.org/
-</source>
-This will include any url in the domain <code>apache.org</code>.
-</li>
-<li>Edit the file <code>conf/nutch-site.xml</code>, insert at minimum
-following properties into it and edit in proper values for the properties:
-<source>
-<![CDATA[
-<property>
- <name>http.agent.name</name>
- <value></value>
- <description>HTTP 'User-Agent' request header. MUST NOT be empty -
- please set this to a single word uniquely related to your organization.
-
- NOTE: You should also check other related properties:
-
- http.robots.agents
- http.agent.description
- http.agent.url
- http.agent.email
- http.agent.version
-
- and set their values appropriately.
-
- </description>
-</property>
-
-<property>
- <name>http.agent.description</name>
- <value></value>
- <description>Further description of our bot- this text is used in
- the User-Agent header. It appears in parenthesis after the agent name.
- </description>
-</property>
-
-<property>
- <name>http.agent.url</name>
- <value></value>
- <description>A URL to advertise in the User-Agent header. This will
- appear in parenthesis after the agent name. Custom dictates that this
- should be a URL of a page explaining the purpose and behavior of this
- crawler.
- </description>
-</property>
-
-<property>
- <name>http.agent.email</name>
- <value></value>
- <description>An email address to advertise in the HTTP 'From' request
- header and User-Agent header. A good practice is to mangle this
- address (e.g. 'info at example dot com') to avoid spamming.
- </description>
-</property>
-
-]]>
-</source>
-</li>
-</ol>
-
-</section>
-<section>
-<title>Intranet: Running the Crawl</title>
-
-<p>Once things are configured, running the crawl is easy. Just use the
-crawl command. Its options include:</p>
-
-<ul>
-<li><code>-dir</code> <em>dir</em> names the directory to put the crawl in.</li>
-<li><code>-threads</code> <em>threads</em> determines the number of
-threads that will fetch in parallel.</li>
-<li><code>-depth</code> <em>depth</em> indicates the link depth from the root
-page that should be crawled.</li>
-<li><code>-topN</code> <em>N</em> determines the maximum number of pages that
-will be retrieved at each level up to the depth.</li>
-</ul>
-
-<p>For example, a typical call might be:</p>
-
-<source>
-bin/nutch crawl urls -dir crawl -depth 3 -topN 50
-</source>
-
-<p>Typically one starts testing one's configuration by crawling at
-shallow depths, sharply limiting the number of pages fetched at each
-level (<code>-topN</code>), and watching the output to check that
-desired pages are fetched and undesirable pages are not. Once one is
-confident of the configuration, then an appropriate depth for a full
-crawl is around 10. The number of pages per level
-(<code>-topN</code>) for a full crawl can be from tens of thousands to
-millions, depending on your resources.</p>
-
-<p>Once crawling has completed, one can skip to the Searching section
-below.</p>
-
-</section>
-</section>
-
-<section>
-<title>Whole-web Crawling</title>
-
-<p>Whole-web crawling is designed to handle very large crawls which may
-take weeks to complete, running on multiple machines.</p>
-
-<section>
-<title>Whole-web: Concepts</title>
-
-<p>Nutch data is composed of:</p>
-
-<ol>
-
- <li>The crawl database, or <em>crawldb</em>. This contains
-information about every url known to Nutch, including whether it was
-fetched, and, if so, when.</li>
-
- <li>The link database, or <em>linkdb</em>. This contains the list
-of known links to each url, including both the source url and anchor
-text of the link.</li>
-
- <li>A set of <em>segments</em>. Each segment is a set of urls that are
-fetched as a unit. Segments are directories with the following
-subdirectories:</li>
-
- <li><ul>
- <li>a <em>crawl_generate</em> names a set of urls to be fetched</li>
- <li>a <em>crawl_fetch</em> contains the status of fetching each url</li>
- <li>a <em>content</em> contains the content of each url</li>
- <li>a <em>parse_text</em> contains the parsed text of each url</li>
- <li>a <em>parse_data</em> contains outlinks and metadata parsed
- from each url</li>
- <li>a <em>crawl_parse</em> contains the outlink urls, used to
- update the crawldb</li>
- </ul></li>
-
-<li>The <em>indexes</em>are Lucene-format indexes.</li>
-
-</ol>
-
-</section>
-<section>
-<title>Whole-web: Boostrapping the Web Database</title>
-
-<p>The <em>injector</em> adds urls to the crawldb. Let's inject URLs
-from the <a href="http://dmoz.org/">DMOZ</a> Open Directory. First we
-must download and uncompress the file listing all of the DMOZ pages.
-(This is a 200+Mb file, so this will take a few minutes.)</p>
-
-<source>wget http://rdf.dmoz.org/rdf/content.rdf.u8.gz
-gunzip content.rdf.u8.gz</source>
-
-<p>Next we select a random subset of these pages.
- (We use a random subset so that everyone who runs this tutorial
-doesn't hammer the same sites.) DMOZ contains around three million
-URLs. We select one out of every 5000, so that we end up with
-around 1000 URLs:</p>
-
-<source>mkdir dmoz
-bin/nutch org.apache.nutch.tools.DmozParser content.rdf.u8 -subset 5000 &gt; dmoz/urls</source>
-
-<p>The parser also takes a few minutes, as it must parse the full
-file. Finally, we initialize the crawl db with the selected urls.</p>
-
-<source>bin/nutch inject crawl/crawldb dmoz</source>
-
-<p>Now we have a web database with around 1000 as-yet unfetched URLs in it.</p>
-
-</section>
-<section>
-<title>Whole-web: Fetching</title>
-<p>
-Starting from 0.8 nutch user agent identifier needs to be configured
-before fetching. To do this you must edit the file <code>conf/nutch-site.xml</code>, insert at minimum
-following properties into it and edit in proper values for the properties:
-</p>
-<source>
-<![CDATA[
-<property>
- <name>http.agent.name</name>
- <value></value>
- <description>HTTP 'User-Agent' request header. MUST NOT be empty -
- please set this to a single word uniquely related to your organization.
-
- NOTE: You should also check other related properties:
-
- http.robots.agents
- http.agent.description
- http.agent.url
- http.agent.email
- http.agent.version
-
- and set their values appropriately.
-
- </description>
-</property>
-
-<property>
- <name>http.agent.description</name>
- <value></value>
- <description>Further description of our bot- this text is used in
- the User-Agent header. It appears in parenthesis after the agent name.
- </description>
-</property>
-
-<property>
- <name>http.agent.url</name>
- <value></value>
- <description>A URL to advertise in the User-Agent header. This will
- appear in parenthesis after the agent name. Custom dictates that this
- should be a URL of a page explaining the purpose and behavior of this
- crawler.
- </description>
-</property>
-
-<property>
- <name>http.agent.email</name>
- <value></value>
- <description>An email address to advertise in the HTTP 'From' request
- header and User-Agent header. A good practice is to mangle this
- address (e.g. 'info at example dot com') to avoid spamming.
- </description>
-</property>
-
-]]>
-</source>
-<p>To fetch, we first generate a fetchlist from the database:</p>
-<source>bin/nutch generate crawl/crawldb crawl/segments
-</source>
-<p>This generates a fetchlist for all of the pages due to be fetched.
- The fetchlist is placed in a newly created segment directory.
- The segment directory is named by the time it's created. We
-save the name of this segment in the shell variable <code>s1</code>:</p>
-<source>s1=`ls -d crawl/segments/2* | tail -1`
-echo $s1
-</source>
-<p>Now we run the fetcher on this segment with:</p>
-<source>bin/nutch fetch $s1</source>
-<p>When this is complete, we update the database with the results of the
-fetch:</p>
-<source>bin/nutch updatedb crawl/crawldb $s1</source>
-<p>Now the database has entries for all of the pages referenced by the
-initial set.</p>
-
-<p>Now we fetch a new segment with the top-scoring 1000 pages:</p>
-<source>bin/nutch generate crawl/crawldb crawl/segments -topN 1000
-s2=`ls -d crawl/segments/2* | tail -1`
-echo $s2
-
-bin/nutch fetch $s2
-bin/nutch updatedb crawl/crawldb $s2
-</source>
-<p>Let's fetch one more round:</p>
-<source>
-bin/nutch generate crawl/crawldb crawl/segments -topN 1000
-s3=`ls -d crawl/segments/2* | tail -1`
-echo $s3
-
-bin/nutch fetch $s3
-bin/nutch updatedb crawl/crawldb $s3
-</source>
-
-<p>By this point we've fetched a few thousand pages. Let's index
-them!</p>
-
-</section>
-<section>
-<title>Whole-web: Indexing</title>
-
-<p>Before indexing we first invert all of the links, so that we may
-index incoming anchor text with the pages.</p>
-
-<source>bin/nutch invertlinks crawl/linkdb crawl/segments/*</source>
-
-<p>To index the segments we use the <code>index</code> command, as follows:</p>
-
-<source>bin/nutch index crawl/indexes crawl/crawldb crawl/linkdb crawl/segments/*</source>
-
-<!-- <p>Then, before we can search a set of segments, we need to delete -->
-<!-- duplicate pages. This is done with:</p> -->
-
-<!-- <source>bin/nutch dedup indexes</source> -->
-
-<p>Now we're ready to search!</p>
-
-</section>
-<section>
-<title>Searching</title>
-<p>
-Simplest way to verify the integrity of your crawl is to launch NutchBean from command line:
-</p>
-<source>bin/nutch org.apache.nutch.searcher.NutchBean apache</source>
-<p>
-After you have verified that the above command returns results you can proceed to
-setting up the web interface.
-</p>
-<p>To search you need to put the nutch war file into your servlet
-container. (If instead of downloading a Nutch release you checked the
-sources out of SVN, then you'll first need to build the war file, with
-the command <code>ant war</code>.)</p>
-
-<p>Assuming you've unpacked Tomcat as ~/local/tomcat, then the Nutch war
-file may be installed with the commands:</p>
-
-<source>rm -rf ~/local/tomcat/webapps/ROOT*
-cp nutch*.war ~/local/tomcat/webapps/ROOT.war
-</source>
-
-<p>The webapp finds its indexes in <code>./crawl</code>, relative
-to where you start Tomcat, so use a command like:</p>
-
-<source>~/local/tomcat/bin/catalina.sh start
-</source>
-
-<p>Then visit <a href="http://localhost:8080/">http://localhost:8080/</a>
-and have fun!</p>
-
-<p>More detailed tutorials are available on the Nutch Wiki.
-</p>
-
-</section>
-</section>
-
-</body>
-</document>