This project sets up Apache Nutch for web crawling and integrates it with Apache Tomcat for deploying a web application. The setup involves configuring Nutch to crawl websites, indexing the data, and then deploying the Nutch web application on Tomcat.
- Web crawling with Apache Nutch.
- Indexing of crawled data.
- Deployment of Nutch web application on Apache Tomcat.
- URL filtering and exclusion rules.
Before you begin, ensure you have the following installed:
- Apache Nutch: Version 0.9 or later.
- Apache Tomcat: Version 7.0.109 or compatible.
- Java: Java Development Kit (JDK) 8 or later.
- Ant: For building the WAR file.
-
Clone the Repository
git clone https://github.com/AyuAnchor/web-crawling.git cd web-crawling -
Set Up Nutch and Tomcat
- Download and install Apache Nutch and Apache Tomcat (ignore if using those provided with this repo).
- Configure Nutch and Tomcat paths in the
crawlscript.
-
Add custom URLs
- Edit
seed.txtfile inurlsfolder to add websites you want to crawl.
- Edit
-
Configure URL Filtering
- Modify
crawl-urlfilter.txtandregex-urlfilter.txtinnutch-0.9/conffolder to include or exclude URLs based on your requirements.
- Modify
-
Update Scripts
- Edit the
crawlscript to match your environment. Ensure paths and configurations are correctly set.
- Edit the
-
Build Nutch WAR File
-
Use Ant to build the Nutch WAR file.
cd /path/to/nutch ant war
-
-
Run the Crawl Script
Execute the crawl script to start crawling:
./crawl.sh
-
Access the Web Application
Open your browser and navigate to:
http://localhost:8080/nutch-0.9
Thank you for using this project. Happy crawling!