第二讲
1、 git来作为分布式版本控制工具,github作为server。bitbucket.org提供免费的私有库。
2、 nutch的提高在于研读nutch-default.xml文件中的每一个配置项的实际含义(需要结合源代码理解)。
3、 定制开发nutch的入门方法是研读build.xml文件。
4、 命令:
apt-get install subversion
svn co https://svn.apache.org/repos/asf/nutch/tags/release-1.6/
cd release-1.6
apt-get install ant
ant
cd runtime/local
mkdir urls
vi urls/url.txt 并输入http://blog.tianya.cn
nohup bin/nutch crawl urls -dir data -depth 3 -threads 100 &
vi release-1.6/conf/nutch-site.xml 增加http.agent.name配置
cd ../../release-1.6
ant
cd runtime/local
nohup bin/nutch crawl urls -dir data -depth 3 -threads 100 &
删除报错的文件夹
nohup bin/nutch crawl urls -dir data -depth 1 -threads 100 &