首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > windows >

Heritrix在windows上的配置步骤

2012-09-08 
Heritrix在windows下的配置步骤。1.?下载Heritrix,地址:http://nchc.dl.sourceforge.net/project/archive-c

Heritrix在windows下的配置步骤。

1.?下载Heritrix,地址:http://nchc.dl.sourceforge.net/project/archive-crawler/archive-crawler%20%28heritrix%201.x%29/1.14.4/heritrix-1.14.4.zip

?

2.?解压heritrix-1.14.4.zip

?

3. 设置环境变量:HERITRIX_HOME

?

4. 在命令行窗口,进入%HERITRIX_HOME%\bin目录,执行 heritrix.bat,出现类似如下字样的提示信息:

?

You have to specify either a username and password for theweb interface or start Heritrix without the web ui.Example: heritrix --admin=admin:letmein         heritrix --nowui myOrder.xml
?

?

5. 根据提示,把命令修改为: heritrix --admin=admin:123,出现类似如下字样的提示信息:

WARNING: It's currently not possible to run Heritrix in background         on Windows. It was just started minimized in a new Window         and will be shut down as soon as you log off.2011/02/25 周五 23:49:27.00 Starting heritrixHeritrix failed to start properly. Possible causes:- Login and password have not been specified (see --admin switch)- another program uses the port for the web UI (8080 by default)  (e.g. another Heritrix instance)- JMX password file is missing or permissions not set correctlyJMX permissions file missing. A template can be found in  E:\framework\heritrix-1.14.4\conf\jmxremote.password.template.Copy it to  E:\framework\heritrix-1.14.4\jmxremote.passwordand edit the passwords at the end of the file. Then, make surethe file is read-restricted to only the user that the HeritrixJava VM will run as. For example:
?

?

6. 根据提示,把%HERITRIX_HOME%\conf\jmxremote.password.template文件复制到%HERITRIX_HOME%\目录下,并将文件重命名为:jmxremote.password,用文本编辑器打开文件,根据文件内的提示,将文件最后两行的@PASSWORD@,替换为想要的密码字符串。

?

monitorRole  123controlRole  123
?

?

7. 再设置文件的为只读,并且要设置文件的拥有者只能为当前登录系统的用户,删除文件的其他用户或角色权限。修改方法:

?? 文件->属性->"安全"标签页->高级->"权限"标签页->更改权限按钮

??? ->取消"包括从该对象的父项继承的权限"的勾选-,同时再删除其他多余的用户或角色权限(只留下当前登录系统的用户)

?

8. 再次:heritrix --admin=admin:123,在弹出的cmd命令窗口中看到:

16:08:27.117 EVENT  Starting Jetty/4.2.2316:08:27.164 WARN!! Delete existing temp dir C:\Users\wiflish\AppData\Local\Temp\Jetty_127_0_0_1_8080__ for WebApplicationContext[/,jar:file:/E:/framework/heritrix-1.14.4/webapps/admin.war!/]16:08:27.256 EVENT  Started WebApplicationContext[/,Heritrix Console]16:08:27.323 EVENT  Started SocketListener on 127.0.0.1:808016:08:27.323 EVENT  Started org.mortbay.jetty.Server@13d93f42011-02-25 16:08:27.588 信息 thread-10 org.archive.crawler.Heritrix.postRegister() org.archive.crawler:guiport=8080,host=wiflish-PC,jmxport=8849,name=Heritrix,type=CrawlService registered to MBeanServerId=wiflish-PC_1298650106843, SpecificationVersion=1.4, ImplementationVersion=1.6.0_23-b05, SpecificationVendor=Sun MicrosystemsHeritrix version: 1.14.4
?

?

配置成功

热点排行