You don't need to cd to the nutch directory for the startup script. All
you need to do is edit the nutch-site.xml that is found within the nutch
servlet and include a "searcher directory" property that tells tomcat
where to look for the crawl db.
So if you have nutch 0.8, edit the file
TOMCAT_PATH/webapps/NUTCH_DIR/WEB-INF/classes/nutch-site.xml and include
the following:
<property>
<name>searcher.dir</name>
<value>/your_index_folder_path</value>
</property>
I believe the "your_index_folder_path" is the path to your crawl
directory. However, if that doesn't work, make it the path to the index
folder within your crawl directory.
Now, save that and make sure your script just starts tomcat on init and
everything should work fine for you.
Matt
Bill Goffe wrote:
> I'd like to start Nutch automatically when I reboot. I wrote a real rough
> script (see below) that works on my Debian system when the system is up,
> but I get nothing on a reboot (and the links are set to the
> /etc/init.d/nutch). Any hints, ideas, or suggestions? I checked the FAQ
> and the archive but didn't see anything. In addition, it would be great to
> get messages going into /var/log to help figure out what is going on but
> I've had no luck doing that.
>
> Thanks,
>
> Bill
>
> ## Start and stop Nutch. Note how specific it is to
> ## (i) Tomcat (typically $CATALINA_HOME/bin/shutdown.sh
> ## or $CATALINA_HOME/bin/startup.sh) and (ii) the
> ## directory with the most recent fetch results.
>
> ## PATH stuff
> PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games"
> PATH=$PATH:/usr/local/SUNWappserver/bin
> CLASSPATH=/usr/local/SUNWappserver/jdk/jre/lib
> JAVA_HOME=/usr/local/SUNWappserver/jdk
> CATALINA_HOME=/usr/local/jakarta-tomcat-5
> JAVA_OPTS="-Xmx1024m -Xms512m"
>
> case "$1" in
> start)
> cd /home/bgoffe/nc/40 ## start in correct directory
> /usr/local/jakarta-tomcat-5/bin/startup.sh
> ;;
>
> stop)
> /usr/local/jakarta-tomcat-5/bin/shutdown.sh
> ;;
>
> force-reload|restart)
> /usr/local/jakarta-tomcat-5/bin/shutdown.sh
> cd /home/bgoffe/nc/40
> /usr/local/jakarta-tomcat-5/bin/startup.sh
> ;;
>
> *)
> echo "Usage: /etc/init.d/nutch {start|stop|force-reload|restart}"
> exit 1
> ;;
>
> esac
>
> exit 0
>
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Nutch-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nutch-general