Running Solr under Daemontools


Taken from

1. install daemontools

2. create /etc/solr

3. create a user and group called solr

4. create shell script /etc/solr/run (edit to taste; I'm using the default jetty that comes with solr)

exec 2>&1
cd /usr/local/apache-solr-1.3.0/example
exec setuidgid solr java -jar start.jar

5. create /etc/solr/log/run containing:

exec setuidgid solr multilog t ./main

6. ln -s /etc/solr /service/solr

that is all. as long as you've got svscan set to launch when the system boots, solr will run and auto-restart on crashes. logs will be in /service/solr/log/main (auto-rotated).

Daemontools (last edited 2009-09-20 22:04:46 by localhost)