How to start Cassandra as service in Windows 10/7/server

- Advertisment -
- Advertisement -

We already did a tutorial article in which we had explained the way to install Apache Cassandra on Windows 10 or Windows Server 2008/2012 but without datastax. But there was a problem after running the Apache Cassandra service on Command prompt you can’t close it otherwise you won’t be able to use Cassandra commands for Database. However, running on PowerShell, indeed, we can close it and Cassandra service will still be running in the background, but there is one catch that is after restarting the computer you again have to start service to get Apache Cassandra up and running. This is a little bit annoying for regular users of this NoSQL database. So, here is the way to run the Apache Cassandra as background Windows service which automatically starts with computer boot up.

Run or Start Cassandra as Windows 10/7 or Server service

Before following the below steps the Cassandra must be installed on your computer if it not then here is tutorial on that: Install Apache Cassandra on windows 10/8/7 without Datastax

Step 1: Download Apache commons daemon

To run Cassandra as a Windows service, the first thing we need is the open source project Apache commons daemon that provides a portable way to start and stop a Java Virtual Machine that is running server-side applications.

Here is the link to download Apache commons daemon library. Select the latest update zip file and download that.

apache common daemon

Step 2: Extract Apache commons daemon

After downloading the Apache commons daemon zipped file, extract it and move to the next step.

 

Step 3: Cassandra Bin folder

Go to your Cassandra folder that you have downloaded and set up to run its different services. Inside the Cassandra folder there in one another folder named “Bin” open that.

Step 4: Create a Daemon folder

Inside the bin folder of Cassandra create a folder named daemon, manually. As shown in the below screenshot.

Start Cassandra as Windows 10 or Server service 

Step 5: Copy prunsrv.exe

Now get back to your Apache common Daemon extracted the folder and as per your operating system 32 bit or 64-bit copy prunsrv.exe file. The 64-bit version file is inside the amd64 folder.

Copy prunsrv

After copying it again go to the daemon folder you have created inside the bin folder of Cassandra and paste prunsrv.exe there.

Step 6: Install Cassandra as a Windows service

Open the Command prompt as administrator and navigate to Cassandra->bin folder and execute the following command:

cassandra.bat -install

Install Cassandra as a Windows service

This makes Cassandra service automatically starts on Windows 10/8/7 or Windows servers.

Step 7: How to start or stop Cassandra service in windows

We have added the Casandra in Windows service, thus, you can easily get it in the Services app of windows. To open that type services in the Windows search box and open it, as it appears.

run services app

Find the Cassandra service and from there you can start or stop Apache Cassandra service on Windows platform with one click.

Running Cassandra as a Windows Service

Other Useful Resources:

Rajkumar Mauryahttps://www.how2shout.com
Rajkumar Maurya is the H2S Media tech expert. He’s always been passionate about technology and has been writing on the subject since 2014. He has extensive knowledge of all kinds of technology, from consumer-tech to enterprise solutions. You can contact the author at-- raj@how2shout.com

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Latest Posts

How to run Chrome extensions on Microsoft Edge Chromium browser

It is long since we know about Microsoft Edge, which is Microsoft's endeavour to dominate the market of browsers....

How to get dark mode on WhatsApp to keep eyes stress free

WhatsApp keeps adding new features to the app, and most features turn out to be useful for us, except...

73% of software developers willing to invest Rs 10-20k per year for upskilling

The rapid development in the technology area is compelling the firms and developers to gear up their technology skills...

Sony accidentally confirmed a massive News leak on PS5

The PlayStation 5 launch is just around the corner. Also, the rumours are about an upcoming meeting of Sony...
- Advertisement -

Horizon: Zero Dawn is Coming to PC, all about its release

There is news coming up from the insider sources that Sony is already working on their project to release...

WhatsApp Dark Mode is available for Android users, test it now!

Finally, to save the oil of eye lamps especially for those continuously do chats on WhatsApp, Dark Mode is...

- Advertisment -
- Advertisement -

You might also likeRELATED
Recommended to you