[
https://issues.apache.org/jira/browse/SOLR-7644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14576364#comment-14576364
]
Bill Bell commented on SOLR-7644:
---------------------------------
Guillaume Belrose [email protected] via lucene.apache.org
Jun 4 (3 days ago)
to solr-user
Hi,
I've successfully used procrun (see
http://commons.apache.org/proper/commons-daemon/procrun.html) to wrap Solr 5.1
solr.cmd script as a Windows service (I’ve only tested on Windows 2008 R2).
Previously, I was using Procrun to manage Jetty services running the Solr.war
from older versions but with a bit a tweaking, I was able to wrap the new Solr
5.1.0 scripts.
I roughly did the following:
-download and unzip the Solr 5.1.0 distribution to a local folder (i.e. c:\opt )
-download and unzip the Apache Commons Daemon .zip file (from
http://commons.apache.org/proper/commons-daemon/download_daemon.cgi) in my solr
local folder (i.e. c:\opt\solr-5.1.0)
-run the batch file [1].
All of this was done through Ansible Playbooks which is the tool I use for
configuration management on Windows and Linux.
Cheers,
Guillaume.
[1]
@echo off
set SERVICE_NAME=solr
set SERVICE_HOME=c:\opt\solr-5.1.0
set PR_INSTALL=%SERVICE_HOME%\amd64\prunsrv.exe
@REM Service Log Configuration
set PR_LOGPREFIX=%SERVICE_NAME%
set PR_LOGPATH=%SERVICE_HOME%\logs
set PR_STDOUTPUT=auto
set PR_STDERROR=auto
set PR_LOGLEVEL=Debug
set PR_STARTUP=auto
set PR_STARTMODE=exe
set PR_STARTIMAGE=%SERVICE_HOME%\bin\solr.cmd
set PR_STARTPARAMS=start
@REM Shutdown Configuration
set PR_STOPMODE=exe
set PR_STOPIMAGE=%SERVICE_HOME%\bin\solr.cmd
set PR_STOPPARAMS=stop -p 8983
%PR_INSTALL% //IS/%SERVICE_NAME% ^
--Description="Solr-5.1.0" ^
--DisplayName="%SERVICE_NAME%" ^
--Install="%PR_INSTALL%" ^
--Startup="%PR_STARTUP%" ^
--LogPath="%PR_LOGPATH%" ^
--LogPrefix="%PR_LOGPREFIX%" ^
--LogLevel="%PR_LOGLEVEL%" ^
--StdOutput="%PR_STDOUTPUT%" ^
--StdError="%PR_STDERROR%" ^
--StartMode="%PR_STARTMODE%" ^
--StartImage="%PR_STARTIMAGE%" ^
--StartParams="%PR_STARTPARAMS%" ^
--StopMode="%PR_STOPMODE%" ^
--StopImage="%PR_STOPIMAGE%" ^
--StopParams="%PR_STOPPARAMS%"
if not errorlevel 1 goto installed
echo Failed to install "%SERVICE_NAME%" service. Refer to log in %PR_LOGPATH%
exit /B 1
:installed
echo The Service "%SERVICE_NAME%" has been installed
exit /B 0
> Add Common Daemons to bin/run for -d
> ------------------------------------
>
> Key: SOLR-7644
> URL: https://issues.apache.org/jira/browse/SOLR-7644
> Project: Solr
> Issue Type: Improvement
> Affects Versions: 5.2
> Reporter: Bill Bell
>
> Why don't we change the bin/run -d to have Common Daemons? This would be a
> great enhancement to SOLR 5.x.
> Common Daemons.
> http://commons.apache.org/proper/commons-daemon/
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]