Install Apache Cassandra on Windows

For local debugging of the service, I needed to install Apache Cassandra on Windows 10. Only DataStax had a normal installer, but they stopped supporting it.


In this article I will describe how to install Apache Cassandra on Windows as a service.


1. Install JDK


Cassandra requires Java 8 - JavaSE or OpenJDK. On newer versions of Java, Cassandra does not start.


After trying several OpenJDK distributions, I chose Amazon Corretto - Cassandra started and worked on it. Other distributions may cause problems.


You can download Amazon Corretto here
When installing, make sure that the "Setup Enviroment" component is enabled. Otherwise, you will have to manually set the environment variable 'JAVA_HOME'.


2. Installing Cassandra


2.1. Download required



2.2 Unpacking


Unpack the archive with Cassandra in the folder where it will be installed.


From the commons-daemon archive, copy the prunsrv.exe file of the desired architecture to the __cassandra\bin\daemon . If the daemon folder does not exist, then it must be created.


2.3 Installation


  1. Open PowerShell with administrator privileges.
  2. Go to __cassandra\bin
  3. .\cassandra.ps1 -install

After that, Cassandra will be installed as a service that can be managed through the service management console.


3. Optional


cqlsh requires Python 2.7 installed.


In many cases, you need to set the CASSANDRA_HOME environment CASSANDRA_HOME , pointing to the bin folder of Cassandra.

Source: https://habr.com/ru/post/465151/


All Articles