• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » Install Apache Nutch (Web Crawler) on Ubuntu Server

By Abhishek Ghosh June 14, 2018 12:16 am Updated on June 14, 2018

Install Apache Nutch (Web Crawler) on Ubuntu Server

Advertisement

Aache Nutch is a Production Ready Web Crawler. Nutch Can Be Extended With Apache Tika, Apache Solr, Elastic Search, SolrCloud, etc. Here is How to Install Apache Nutch on Ubuntu Server. Nutch relies on Apache Hadoop data structure. Apache Lucene is similar to Apache Nutch. Apache Lucene plays an important role in helping Nutch to index and search. We use Apache Tika for parsing, Apache Solr, Elastic Search etc for search functionalities and so on. There are some Python and Java projects for the same work. Main objective of Nutch is to scrape unstructured data from resources like RSS, HTML, CSV, PDF, and structure it.

Apache Nutch can not written as one tutorial. In this current tutorial, we will only show how to install Apache Nutch on Ubuntu Server and do basic configuration. We will not configure it with other software, like Apache Lucene or MongoDB.

Nutch 2.x and Nutch 1.x are quite different in terms of set up, functioning, and architecture. Nutch 2.x uses Apache Gora to manage NoSQL persistence over database stores. Nutch 1.x has much more features, many bug fixed. For advanced need, consider Nutch 1.x. For flexibility of database stores, use Nutch 2.x. We will install Nutch 1.x in this guide.

Advertisement

---

Install Apache Nutch on Ubuntu Server

 

Install Apache Nutch on Ubuntu Server

 

Let us update, upgrade as root user :

Vim
1
apt update -y && apt upgrade -y

Next, we have to install the Java runtime (JRE) :

Vim
1
apt install default-jre

Java runtime (JRE) and development environment (JDK)

After JRE, next we will install Java development environment (JDK) :

Vim
1
apt install default-jdk

After installation of both JRE and JDK, run the following command to check whether both has been installed correctly :

Vim
1
java -version

Now set JAVA_HOME in the bash file with the following command:

Vim
1
export JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::")

Check with below command :

Vim
1
echo JAVA_HOME

Download the binary distribution of Apache Nutch from here :

Vim
1
http://www.apache.org/dyn/closer.cgi/nutch/

It is version 1.14 at the moment of publishing this guide. Nutch 2.x is different series. You should use your closest mirror, we are showing just example of wget for clarifying version :

Vim
1
wget http://www-eu.apache.org/dist/nutch/1.14/apache-nutch-1.14-bin.tar.gz

You can use any directory, like documents directory for download. Uncompress it :

Vim
1
2
3
ls -al
tar -xvzf apache-nutch-1.14-bin.tar.gz
ls -al

Now run this command :

Vim
1
bin/nutch

You will able to see print of commands. Now about the configuration files :

nutch-default.xml : default property, located in ${nutch_home}/conf directory
nutch-site.xml : alternative for nutch-default.xml

core-default.xml, hdfs-default.xml, mapred-default.xml : used for Hadoop configuration.
mapred- default.xml : used to configure the map-reduce.
hdfs-default.xml : used to implement Hadoop Distributed File System in Nutch

To provide basic example, we will only minimally configure nutch-site.xml file, open it :

Vim
1
nano conf/nutch-site.xml

You’ll get a stanza like this :

Vim
1
2
3
4
5
6
7
8
9
10
<configuration>
 
<property>
 
     <name>http.agent.name</name>
 
     <value>nutch-1.1.4-crawler</value>
 
</property>
...

We need to create a directory which will hold text files with list of URLs to crawl :

Vim
1
2
mkdir -p urls
touch seed.txt

Add some URLs on that seed.txt file, like :

Vim
1
2
3
http://nutch.apache.org/
https://wiki.apache.org/nutch/FrontPage
http://events.linuxfoundation.org/events/apachecon-europe

Save the file. Now, inject those with the following format of command :

Vim
1
bin/nutch inject crawl/crawldb urls

It is like manual crawl. Run to generate list of pages :

Vim
1
bin/nutch generate crawl/crawldb crawl/segments

You’ll see segment directory with name of the directory as digits – timestamp as directory name. Like this :

Vim
1
crawl/segments/201806271566721

Create shell variable with path :

Vim
1
s1 = crawl/segments/20170129163653

Then parse :

Vim
1
bin/nutch parse $s1

Update database :

Vim
1
bin/nutch updatedb crawl/crawldb $s1

At this point, you need some other software. Like Apache SOLR. Actually the successful completion of the crawling process, on desktop computers we can run the luke-all jar tool (Luke is Lucene Index Toolbox), browse to open the crawler/index directory to view crawled pages. Official website of Apache Nutch has good tutorial :

Vim
1
https://wiki.apache.org/nutch/FrontPage

Tagged With how to chekc nutch version , crawl website with apache nutch , nutch on Ubuntu server pdf , installing nutch , how to install apache nutch , does nutch require its own server for installation for web crawling , DM7D , apache nutch webcrawl oauth , apache nutch java main , apache lucene ubuntu setup
Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Install Apache Nutch (Web Crawler) on Ubuntu Server

  • Integrating Apache Nutch With Apache Solr on Ubuntu Server

    Integrating Apache Nutch With Apache Solr Will Offer a Web UI, Options to Visually Search and Use Extended Functions of Apache Nutch.

  • How to Install Apache Tika on Ubuntu Server

    Apache Tika is a Content Analysis Framework Which Can Be Configure With Web Software Like WordPress For Metadata Extraction of PDF, doc. Here is How to Install Apache Tika on Ubuntu Server.

  • Difference Between Apache Solr and Apache Lucene

    One user have installation guide for Apache Solr but we do not have guide for Apache Lucene. It is kind of deliberate omission. There is an easy way to use Lucence on the command line. In most of the situations possibly you’ll use Apache Solr and when you’ll realize the need to utilize Apache Lucene, […]

  • Command Prompt Commands : Alphabetical list of all commands in Windows 7

    Command Prompt Commands in Windows 7 provides the user access to 180+ command line commands. Here is a list of 200 Command Prompt Commands in Windows 7.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy