Warning: This page has not been updated in over over a year and may be outdated or deprecated.
administration:starting_and_stopping_solr
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
administration:starting_and_stopping_solr [2023/03/10 11:45] – Remove VuFind 2.x script example (now obsolete). demiankatz | administration:starting_and_stopping_solr [2023/03/10 11:57] – [Linux (systemd) Method] demiankatz | ||
---|---|---|---|
Line 4: | Line 4: | ||
===== Starting Solr Manually ===== | ===== Starting Solr Manually ===== | ||
- | |||
- | |||
==== Linux Method ==== | ==== Linux Method ==== | ||
Line 155: | Line 153: | ||
If you don't want to have to manually start and stop Solr every time you turn on or shut down your server, you can set it up to run automatically. | If you don't want to have to manually start and stop Solr every time you turn on or shut down your server, you can set it up to run automatically. | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | ==== Linux (init.d) Method ==== | ||
- | |||
- | You can set up Solr to run as a daemon. To do so, create a wrapper script in / | ||
- | |||
- | :!: Important: These instructions were written for VuFind 3.0 or later, when the Solr script was changed to solr.sh instead of vufind.sh; if running VuFind 2.x or earlier, you should replace " | ||
- | |||
- | :!: If you need to run VuFind with non-default settings, you may wish to add some lines to export environment variables in this script, or else source a script containing all of your environment settings prior to running " | ||
- | |||
- | :!: Newer versions of Solr do not like to be run by the root user; you may need to either add " | ||
- | |||
- | < | ||
- | #!/bin/sh | ||
- | ### BEGIN INIT INFO | ||
- | # Provides: vufind | ||
- | # Required-Start: | ||
- | # Required-Stop: | ||
- | # Default-Start: | ||
- | # Default-Stop: | ||
- | # Description: | ||
- | ### END INIT INFO | ||
- | cd / | ||
- | ./solr.sh $* | ||
- | </ | ||
- | |||
- | // Note: The information in the INIT INFO block is only required for RedHat-style systems that use the chkconfig utility. | ||
- | |||
- | // Note: If your VuFind instance is installed somewhere other than / | ||
- | |||
- | Make sure that the script is executable (sudo may be needed on the command for some platforms): | ||
- | |||
- | < | ||
- | chmod +x / | ||
- | </ | ||
- | |||
- | You will then need to add the script to your runlevel configuration (generally found under / | ||
- | |||
- | On RedHat (including Fedora): chkconfig --add vufind | ||
- | On Debian (including Ubuntu): update-rc.d vufind defaults | ||
- | |||
- | If this doesn' | ||
- | |||
- | === Interacting with Solr After Automation === | ||
- | |||
- | On some platforms, the " | ||
- | |||
- | < | ||
- | service vufind start | ||
- | service vufind stop | ||
- | service vufind restart | ||
- | service vufind check | ||
- | </ | ||
- | |||
- | // | ||
- | |||
- | If service is available, it is the preferred way of starting and stopping Solr after automation. | ||
==== Linux (systemd) Method ==== | ==== Linux (systemd) Method ==== | ||
Line 220: | Line 158: | ||
// Thanks to [[https:// | // Thanks to [[https:// | ||
- | Some newer flavors of Linux (such as CentOS 7) use [[https:// | + | Most modern |
To automate Solr with systemd: | To automate Solr with systemd: | ||
- | * [[administration: | + | * [[administration: |
- | * add permission for the solr directory to this user: | + | * add permission for the solr directory to this user if you have not already: |
< | < |
administration/starting_and_stopping_solr.txt · Last modified: 2023/10/24 13:47 by demiankatz