[ 
https://issues.apache.org/jira/browse/CASSANDRA-292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12887381#action_12887381
 ] 

Todd Kochheiser commented on CASSANDRA-292:
-------------------------------------------

Thank you for testing the contrib!  In response to your comments on 10, July:

*  I've fixed the typo on line 95.  

* In regards to "CASSANDRA_HOME" not being necessary, you are technically 
correct but "ONLY" you plan to run Cassandra as a service directly from source 
tree (contrib\windows\bin).  If CASSANDRA_HOME is not set, the service.bat 
script will create it and set it to the root of the Cassandra source tree 
(note: I found a bug where I was setting CASSANDRA_HOME to the "contrib" 
directory in the script if it wasn't defined and this is probably why you had a 
problem.)  However, the script is designed such that you can use it to install 
and run a Cassandra instance from any location "and" for the windows/bin 
directory to be anywhere on your system.  Without it, that flexibility is 
missing and the only way to run Cassandra as a service would be from a source 
distribution.  Further, the cassandra.bat file uses CASSANDRA_HOME in a similar 
way.  If you are using that to start Cassandra, you are technically using 
CASSANDRA_HOME just only internal to the bat file.

* In regards to requiring %CASSANDRA_HOME%\conf in the CLASSPATH, this is not 
true as long CASSANDRA_HOME is set properly.  What Cassandra uses and expects 
is a storage-conf system variable (-Dstorage-conf).  As far as I know this is 
the proper way to tell Cassandra where the configuration file is.  Cassandra 
also uses storage-conf to find log4j's configuration file.  So, the service.bat 
(and cassandra.bat) does the following:
** Sets a CASSANDRA_CONF variable: CASSANDRA_CONF=%CASSANDRA_HOME%\conf
** Sets storage-conf: -Dstorage-config="%CASSANDRA_CONF%"

My best guess is that since I was not setting the CASSANDRA_HOME properly in 
the situation where is was not already defined, this would cause the service 
installation to have storage-conf set improperly.  I've fixed this.

I've attached a new zip file called windows_u1.zip file (update 1) that fixes 
the typo and sets CASSANDRA_HOME properly to the root of the src distribution 
"if" it is not already defined.  I've also changed the script to use %~dp0 
instead of %CD%.  I've tested the installation without CASSANDRA_HOME from the 
contrib area and it seems to work and updated the README.txt.  The only files 
that are different are the service.bat and README.txt.

> Cassandra should be runnable as a Windows service and distribute a Windows 
> installer
> ------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-292
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-292
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Tools
>         Environment: OS: Windows
>            Reporter: Michael Greene
>            Priority: Minor
>             Fix For: 0.6.4
>
>         Attachments: windows.zip
>
>
> In addition to the tarballs already distributed, Cassandra should distribute 
> an exe installer that can install the Cassandra daemon as a Windows service.
> Tomcat's NSIS scripts can be used as a reference for the installer: 
> http://svn.apache.org/repos/asf/tomcat/trunk/res/
> Apache Commons Daemon's procrun would probably be used to create the Win32 
> service: http://commons.apache.org/daemon/procrun.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to