日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 综合教程 >内容正文

综合教程

CentOS 6.4 中安装部署 Nutch 1.7

發布時間:2023/10/11 综合教程 241 老码农
生活随笔 收集整理的這篇文章主要介紹了 CentOS 6.4 中安装部署 Nutch 1.7 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1.配置SSH

自行查閱相關資料

2.安裝JDK,配置Java環境

自行查閱相關資料

3.安裝SVN

[root@master ~]# yum install -y subversion

通過SVN簽出(Check Out)Nutch源代碼

[root@master ~]# svn co https://svn.apache.org/repos/asf/nutch/tags/release-1.7/

4.安裝ANT,配置ANT環境

自行查閱相關資料

5.在~/release-1.7/conf/nutch-site.xml配置文件中增加'http.agent.name'配置

<!-- HTTP properties -->

<property>
<name>http.agent.name</name>
<value>Mozilla/5.0 (Windows NT 6.3; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0</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>

6.進入Nutch所在目錄,執行ant命令,編譯Nutch源代碼

[root@master release-1.7]# ant

ANT構建之后會生成runtime目錄,該目錄下有deploy和local兩個目錄,分別代表了Nutch的兩種運行方式。

7.在local目錄中創建urls目錄

[root@master local]# mkdir urls

8.在urls目錄中通過VI編輯器創建url文件

[root@master local]# vi urls/url

9.在url文件中添加要抓取的URLs

http://www.leezhen.net/

10.開始抓取

[root@master local]# nohup bin/nutch crawl urls -dir data -depth 3 -threads 100 &

參考:?http://wiki.apache.org/nutch/NutchTutorial

總結

以上是生活随笔為你收集整理的CentOS 6.4 中安装部署 Nutch 1.7的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。