Start and Stop the Solr Search Engine

You can start and stop the Solr Search Engine by using the command line scripts or through a Windows Service.

Security best practices

Since the Search Engine uses Tomcat as the web server, be sure to follow the following best practices (see also the Apache documentation for information on Tomcat security best practices).

  • On Windows operating systems, you need to create a user account that has been granted the Log on as a service right and has Full Control permissions to the search engine installation directory. Further, make sure the KM Search Engine - Master or KM Search Engine - Slave service is set to run as this user.
  • On Unix systems, follow these steps:
    1. Install the Search Engine as root.
    2. Create a user to run the Search Engine. Suppose the user is SearchEngineUser.
    3. Run the following command to change the owner of the Search Engine installation directory:

      sudo chown -R SearchEngineUser Search_Engine_install_directory
    4. Run the following command to start the Search Engine:

      sudo -u SearchEngineUser Search_Engine_install_directory/startup.sh

Start and stop the Search Engine using scripts

Run the following executable scripts in the Solr Search Engine installation folder to start and stop the Search Engine.

Search engine startup scripts
Name Purpose
startup.cmd

Starts the master Solr Search Engine server on a Windows system.

Starts the KMCrawler that has been installed separately.

startup.cmd slave Starts the slave Solr Search Engine server on a Windows system.
startup.sh Starts the master Solr Search Engine server on a UNIX system.
startup.sh slave Starts the slave Solr Search Engine server on a UNIX system.
Search engine shutdown scripts
Name Purpose
shutdown.cmd
  • Shuts down the master Solr Search Engine server on a Window system.
  • Shuts down the KMCrawler if it was installed separately.
shutdown.cmd slave Shuts down the slave Solr Search Engine server on a Windows system.
shutdown.sh
  • Shuts down the master Solr Search Engine server on a UNIX system.
  • Shuts down the KMCrawler if it was installed separately.
shutdown.sh slave Shuts down the slave Solr Search Engine server on a UNIX system.

Start and stop the Search Engine as a Windows service

You can register and install the Search Engine as a Windows service, and then start and stop the Solr Search Engine as a Windows service.

Register and install the Search engine as a Windows service

Run the following scripts to register the Solr Search Engine as a Windows service. Once the Solr Search Engine is registered as a Windows service, then you can use startup and shutdown scripts through the Windows service. The name of the Windows service in the Windows console is: KM Search Engine.

The following table lists the registration scripts for Windows systems.

Name Purpose
installasservice.cmd install master

Installs the master Solr Search Engine server as a Windows Service.

 

Installasservice.cmd install slave <identifier> Installs the slave server as a Windows Service.
installasservice.cmd install

Installs the KMCrawler as a Windows Service when the KMCrawler has been installed separately.

 

installasservice.cmd remove master Removes the master Windows Service.
installasservice.cmd remove slave <identifier> Removes the slave Windows Service.
installasservice.cmd remove Removes the KMCrawler Windows Service.

Start and stop the Solr Search Engine as a Windows Service

  1. From the Windows Start menu, select Control Panel > Administrative Tools > Services.
  2. Select the service that you want to start, for example:  KM Search Engine - Master, KM Search Engine - Slave <identifier>, or KM Search Engine - Crawler.
  3. To start the service, right-click the service and select Start.
  4. To stop the service, right-click the service and select Stop.

Once you have installed and started your search engine instances, you are ready to configure them and verify their connectivity in Knowledge Management. For more information, see Configuring Search Servers.

Related topics

Before You Start the Solr Search Engine

Install the Solr Search Engine