• 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 crawl website with apache nutch , how to chekc nutch version , 50ZF , installing nutch JAVA_HOME missing , installing nutch , how to install apache nutch , does nutch require its own server for installation for web crawling , DM7D , apache nutch java main , apache lucene ubuntu setup

This Article Has Been Shared 155 Times!

Facebook Twitter Pinterest
Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Orthopaedic 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

  • Integration of Apache Hadoop With OpenStack Swift

    The Topic Integration of Apache Hadoop With OpenStack Swift Is Not Exactly New. You Can Follow Our Guide Specially For Handling OpenStack.

  • Join/Merge Multiple Log Files For Big Data Analysis

    Here Are The Ways To Join/Merge Multiple Log Files For Big Data Analysis, Store Them To OpenStack Based Cloud Storage And Delete Old Files.

  • How To Install Apache Pig On Ubuntu 16.04

    Apache Pig is intended for analyzing large data sets. Usually we combine Pig with Hadoop. Here is How To Install Apache Pig On Ubuntu 16.04.

  • How To Install Apache Ambari on Ubuntu 16.04 to Manage Hadoop Cluster

    Apache Ambari Helps Management, Monitoring of Hadoop Cluster. Here is How To Install Apache Ambari on Ubuntu 16.04 to Manage Hadoop Cluster.

  • How To Learn Big Data : Free Courses and Resources

    How To Learn Big Data With Free Courses and Resources? First You Need to Know the Proper Websites, Second You Need to Know What Not to Learn.

Additionally, 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

You can subscribe to our Free Once a Day, Regular Newsletter by clicking the subscribe button below.

Click To Subscribe

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 (20K Followers)
  • Twitter (4.9k Followers)
  • Facebook (5.8k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.2k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • What is Domain-Driven Design (DDD)? January 23, 2021
  • Top 10 Anti Hacking Software for Microsoft Windows January 22, 2021
  • What is Software Modernization? January 21, 2021
  • Cloud Computing : Cybersecurity Tips for Small Business Owners January 20, 2021
  • Arduino : Independently Blink Multiple LED January 18, 2021

 

About This Article

Cite this article as: Abhishek Ghosh, "Install Apache Nutch (Web Crawler) on Ubuntu Server," in The Customize Windows, June 14, 2018, January 24, 2021, https://thecustomizewindows.com/2018/06/install-apache-nutch-web-crawler-on-ubuntu-server/.

Source:The Customize Windows, JiMA.in

 

This website uses cookies. If you do not want to allow us to use cookies and/or non-personalized Ads, kindly clear browser cookies after closing this webpage.

Read Cookie Policy.

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

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

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