heritrix 3.2.0 詳解 1 -- 環境搭建

heritrix做爲一個比較經典的開源爬蟲,寫這篇文章目的是由於,3.X以後的heritrix的介紹以及配置的文章比較少了。 java

heritrix 3.x 之後使用maven 2配置jar包引用,可是老是有好多包無法從maven庫下載。因此,這裏講的環境搭建直接使用了編譯好的工程來作,heritrix-3.2.0-dist.tar.gz以及源碼壓縮包heritrix-3.2.0-src.tar.gz git

 

具體方法以下: web

新建java工程(非maven) tomcat


將heritrix-3.2.0-dist.tar.gz解壓放到工程目錄
maven

添加源代碼引用,使用heritrix-3.2.0-src.zip: spa



 


 嘗試啓動heritrix,heritrix內核使用jetty因此不須要依附tomcat或者其餘web容器。 code

入口類是這個org.archive.crawler.Heritrix blog



 
 

 啓動成功: ip

Oracle Corporation Java(TM) SE Runtime Environment 1.7.0_55-b13
Using ad-hoc HTTPS certificate with fingerprint...
SHA1:7C:99:FC:BC:62:13:DD:F3:B8:24:2F:EF:B7:60:0E:E2:AF:A1:13:8E
Verify in browser before accepting exception.
2014-07-11 01:54:31.408 警告 thread-1 org.archive.crawler.framework.Engine.findJobConfigs() invalid job directory: .\jobs\.gitignore where job expected from: .\jobs\.gitignore
2014-07-11 01:54:31.550:INFO::Logging to STDERR via org.mortbay.log.StdErrLog
2014-07-11 01:54:31.552:INFO::jetty-6.1.26
2014-07-11 01:54:31.753:INFO::Started SslSocketConnector@localhost:9095
engine listening at port 9095
operator login set per command-line
NOTE: We recommend a longer, stronger password, especially if your web 
interface will be internet-accessible.
Heritrix version: 3.2.0

請求: https://localhost:9095/ ci



 如今能夠正常使用了。

heritrix 3.2.0 dist 包下載見http://mitchz.iteye.com/blog/2088134

相關文章
相關標籤/搜索