Install Apache Cassandra from command line on Windows

By 2016-07-13Blog

A bit of history

In the past, Windows users had to download and run .exe or installers manually from websites. Package management was something reserved to Linux ecosystem within tools such as Aptitude.

That is the past. Now (since 2011 to be more accurate) exists a really handy tool called Chocolatey.

Chocolatey is a package manager and installer for software packages, built for the Windows platform. It is an execution engine using the NuGet packaging infrastructure and Windows PowerShell to provide an automation tool for installing software on Windows machines, designed to simplify the process from the user’s perspective.The name is an extension on a pun of NuGet (from “nougat“) as there are nougats with chocolate ingredients.

PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language built on the .NET Framework. One of the cool features of PowerShell: It has a powerful object-based pipeline.

Even better, since Windows 10, Microsoft has embedded to PowerShell a package manager named OneGet


From a blog post titled “My little secret : Windows PowerShell OneGet”, Microsoft’s Garret Serack explains:

“OneGet is a unified interface to package management systems and aims to make Software Discovery, Installation and Inventory (SDII) work via a common set of cmdlets (and eventually a set of APIs). Regardless of the installation technology underneath, users can use these common cmdlets to install/uninstall packages, add/remove/query package repositories, and query a system for the software installed. Included in this CTP is a prototype implementation of a Chocolatey-compatible package manager that can install existing Chocolatey packages.”

On the plus side, Chocolatey integrates as well with several infrastructure automation tools such as Ansible, Puppet, Chef, SCCM…

Nice! So what about Cassandra from command line?

Here you go:

oneget cassandra

If you are using Windows 10, just use OneGet from Powershell:

Otherwise, if you still prefer to use Chocolatey or haven’t OneGet on your client, start by installing Chocolatey using:

From Cmd.exe:

From Powershell.exe (Ensure Get-ExecutionPolicy is at least RemoteSigned):

From PowerShell v3+ (Ensure Get-ExecutionPolicy is at least RemoteSigned):

Then all you need is to type in a shell:



It will install Apache Cassandra on your chocolatey tools folders “C:/tools”. See? Easy.

If you are interested in this package and would like to see others versions of C* available on OnGet, let us know by sending an email or contacting us throught this git repo:

Blog Extra:

You like to use the watch command on Linux and would like to do the same on windows, just as this function to your PowerShell profile (usually located in “C:Users*yourUserName*DocumentsWindowsPowerShell”):


Next time you launch PowerShell you’ll be able to do such thing:

cinst apache cassandra

Which will execute the cassandra nodetool status command every 2 seconds:


Happy OneGetting!