Aapche Nutch建立自己的搜索引擎

sudo apt install default-jdk'

java -version

openjdk version "11.0.22" 2024-01-16

vi .bashrc

export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64

爬梯子下载源代码 Apache Nutch™ -- Downloads

mkdir -p urls

cd urls

touch seed.txt

里面放入我的网站地址

bin/nutch inject crawl/crawldb urls

显示

Injecting seed URL file file:/data/apache-nutch-1.19/urls/seed.txt

Total new urls injected: 1

s1=`ls -d crawl/segments/2* | tail -1`

echo $s1

bin/nutch generate crawl/crawldb crawl/segments

apache nutch No agents listed in 'http.agent.name' property.

conf/ nutch-site.xml

<property>

<name>http.agent.name</name>

<value>MyNutchBot/1.0</value>

</property>

export APACHE_SOLR_HOME=/data/solr-8.11.3

export NUTCH_RUNTIME_HOME=/data/apache-nutch-1.19

${APACHE_SOLR_HOME}/bin/solr start -force

open file limit is currently 1024

vi /etc/security/limits.conf

* soft nofile 4096

* hard nofile 4096

Started Solr server on port 8983 (pid=29369). Happy searching!

http://192.168.1.131:8983

${APACHE_SOLR_HOME}/bin/solr start -force

{APACHE_SOLR_HOME}/bin/solr create -c nutch -d {APACHE_SOLR_HOME}/server/solr/configsets/nutch/conf/ -force

ls crawl/segments/

bin/nutch index crawl/crawldb/ -linkdb crawl/linkdb/ crawl/segments/20240326063028/ -filter -normalize -deleteGone

https://dlcdn.apache.org/lucene/solr/8.11.3/solr-8.11.3.tgz

https://nutch.apache.org/download/

https://dlcdn.apache.org/nutch/1.19/apache-nutch-1.19-bin.tar.gz

https://cwiki.apache.org/confluence/display/NUTCH/NutchTutorial

去掉robot的处理

https://blog.csdn.net/jediael_lu/article/details/43227693

相关推荐
xbgRS34 分钟前
spring整合mybaits
java·spring·mybatis
abbgogo1 小时前
OSPF动态路由协议
开发语言·php
en.en..1 小时前
C 语言嵌入式事件驱动状态机完整教程(枚举配套)
c语言·开发语言
Tim_102 小时前
【C++】024、new[]与delete[]配对使用
java·开发语言
Yyyyyy~2 小时前
[C语言]break和continue作业
c语言·开发语言
小黑技术栈2 小时前
Java前端基础到入门——16day
java·开发语言·前端
此生决int2 小时前
深入理解C++系列(10)——lsit
开发语言·c++
NoteStream2 小时前
【C语言基础】分支和循环(上)
c语言·开发语言·c++·经验分享·笔记·算法·c#
2401_827499992 小时前
C++(黑马)05-提高编程
java·开发语言·c++
卷心菜的学习路2 小时前
基于多模态向量检索的数学相似题推荐系统:完整设计、算法与实验
java·python·算法·大模型·推荐算法·数学相似题