How to Install Cassandra on Windows 10

Introduction

Cassandra is an open source distributed database management system designed to handle large amounts of data across many commodity servers, providing high availability with no single point of failure. Installing Cassandra on Windows 10 is a relatively straightforward process, and can be done in a few simple steps. In this guide, we will walk you through the process of installing Cassandra on Windows 10, from downloading the necessary files to configuring the database.

How to Install Cassandra on Windows 10

1. Download the latest version of Cassandra from the Apache Cassandra website.

2. Extract the downloaded file to a folder of your choice.

3. Open the Windows Command Prompt and navigate to the folder where you extracted the Cassandra files.

4. Run the command “bin\cassandra.bat” to start the Cassandra server.

5. Once the server is running, open a new command prompt window and navigate to the same folder.

6. Run the command “bin\cqlsh.bat” to open the Cassandra Query Language Shell.

7. You can now use the Cassandra Query Language to create and manage your Cassandra databases.

Introduction

Apache Cassandra is a well-established wide-column NoSQL database. It uses a column-based storage model to capture large amounts of unstructured data.

Cassandra focuses on operating in a distributed cluster of commodity servers and boasts high-availability and flexible horizontal scaling.

This detailed tutorial shows you how to install Apache Cassandra on Windows.

Cassandra and Windows 10 tutorial on installing and setting up

Dependencies

Apache Cassandra requires Java 8 to run on a Windows system. Additionally, the Cassandra command-line shell (cqlsh) is dependent on Python 2.7 to work correctly.

To be able to install Cassandra on Windows, first you need to:

  1. Download and Install Java 8 and set environment variables.
  2. Download and install Python 2.7 and set environment variables.

If you already have these dependencies installed, check your version of Python and Java. If you have Java 8 and Python 2.7. feel free to move on to the third section of this guide.

Step 1: Install Java 8 on Windows

The Java development kit contains all the tools and software you need to run applications written in Java. It is a prerequisite for software solutions such as Apache Cassandra.

Download Oracle JDK 8 (Java Development Kit)

1. Visit the official Oracle download page and download the Oracle JDK 8 software package.

2. Scroll down and locate the Java SE Development Kit 8u251 for Windows x64 download link. The Java 8 download starts automatically after signup.

Location of the Java 8 download link on the official Oracle download page.

Note: If you do not have an Oracle account, the website guides you through a quick signup process. Alternatively, you can download Java from a third-party website of your choosing. Always make sure to confirm the source of the download.

3. Once the download is complete, double-click the downloaded executable file. Select Next on the initial installation screen.

screenshot of the first step to Java 8 installation on Windows

4. The following section allows you to select optional features and define the location of the installation folder. Accept the default settings and take note of the full path to the installation folder, C: Program FilesJavajdk1.8.0_251. Once you are ready to proceed with the installation, click Next.

Define Java 8 installation folder on Windows

5. The installation process can take several minutes. Select Close once the process is completed.

Java 8 was successfully installed on Windows 10

Configure Environment Variables for Java 8

It is vital to configure the environment variables in Windows and define the correct path to the Java 8 installation folder.

1. Navigate to This PC > Properties.

Location of teh Properties option on This PC screen.

2. Select Advanced system settings.

Advanced System Settings option in Windows properties.

3. Click the Environment Variables… button.

Location of the Environment Variables tab in system properties.

4. Select New in the System Variable section.

The New tab allows you to add a new system variable for Java 8.

5. Enter JAVA_HOME for the new variable name. Select the Variable value field and then the Browse Directory option.

Add JAVA_HOME variable and append installation folder path.

6. Navigate to This PC > Local Disk C: > Program Files > Java > jdk1.8.0_251 and select OK.

7. Once the correct path to the JDK 8 installation folder has been added to the JAVA_HOME system variable, click OK.

example of New Java system variable created

8. You have successfully added the JAVA_HOME system variable with the correct JDK 8 path to the variable list. Select OK in the main Environment Variables window to complete the process.

JAVA_HOME variable succesfully added

Step 2: Install and Configure Python 2.7 on Windows

Users interact with the Cassandra database by utilizing the cqlsh bash shell. You need to install Python 2.7 for cqlsh to handle user requests properly.

Install Python 2.7 on Windows

1. Visit the Python official download page and select the Windows x64 version link.

Select the correct Python version to download.

2. Define if you would like Python to be available to all users on this machine or just for your user account and select Next.

Install Python 2.7 for all users.

3. Specify and take note of the Python installation folder location. Feel free to leave the default location C:Python27 by clicking Next.

Define Python installation folder on Windows.

4. The following step allows you to customize the Python installation package. Select Next to continue the installation using the default settings.

Customize Python installlation package.

5. The installation process takes a few moments. Once it is complete, select Finish to conclude the installation process.

Conclude Python 2.7 installation on Windows.

Edit Environment Variable for Python 2.7

1. Navigate to This PC > Properties.

Location of the Properties option on This PC screen.

2. Select the Advanced system settings option.

Advanced System Settings option in Windows properties.

3. Click Environment Variables…

Location of the Environment Variables tab in Windows' system properties.

4. Double-click on the existing Path system variable.

Location of the Path System Variable.

5. Select New and then Browse to locate the Python installation folder quickly. Once you have confirmed that the path is correct, click OK.

Instruction on how to add a new Python 2.7 path to the existing Path variable.

6. Add the Python 2.7 path to the Path system variable by selecting OK.

Check if the new Python path is appended to the list.

Step 3: Download and Set Up Apache Cassandra

Download and Extract Cassandra tar.gz Folder

1. Visit the official Apache Cassandra Download page and select the version you would prefer to download. Currently, the latest available version is 3.11.6.

Official Cassandra download page with windows 10 for download

2. Click the suggested Mirror download link to start the download process.

Note: It is always recommended to verify downloads originating from mirror sites. The instructions for using GPG or SHA-512 for verification are usually available on the official download page.

The URL used to download the latest available Cassandra version.

4. Unzip the compressed tar.gz folder using a compression tool such as 7-Zip or WinZip. In this example, the compressed folder was unzipped, and the content placed in the C:Cassandraapache-cassandra-3.11.6 folder.

Content of unzipped Apache Cassandra tar.gz file.

Configure Environment Variables for Cassandra

Set up the environment variables for Cassandra to enable the database to interact with other applications and operate on Windows.

1. Go to This PC > Properties.

Location of the Properties option on This PC screen.

2. Go to Advanced system settings.

Advanced System Settings option in Windows properties.

3. Click the Environment Variables… button.

Location of the Environment Variables tab in Windows' system properties.

4. Add a completely new entry by selecting the New option.

The New tab allows you to add a new system variable for Cassandra..

5. Type CASSANDRA_HOME for Variable name, then for theVariable value column select the location of the unzipped Apache Cassandra folder.

Based on the previous steps, the location is C:Cassandraapache-cassandra-3.11.6. Once you have confirmed that the location is correct, click OK.

Add new variable for Cassandra by appending installation folder location.

6. Double click on the Path variable.

Location of the Path System Variable.

7. Select New and then Browse. In this instance, you need to add the full path to the bin folder located within the Apache Cassandra folder, C:Cassandraapache-cassandra-3.11.6bin.

Add Cassandra bin folder path to Path system variable.

8. Hit the OK button and then again OK to save the edited variables.

Step 4: Start Cassandra from Windows CMD

Navigate to the Cassandra bin folder. Start the Windows Command Prompt directly from within the bin folder by typing cmd in the address bar and pressing Enter.

How to open Windows CMD directly from Cassandra bin folder.

Type the following command to start the Cassandra server:

cassandra

The system proceeds to start the Cassandra Server.

Starting the Cassandra Server from Windows cmd.

Do not close the current cmd session.

Step 5: Access Cassandra cqlsh from Windows CMD

While the initial command prompt is still running open a new command line prompt from the same bin folder. Enter the following command to access the Cassandra cqlsh bash shell:

cqlsh

You now have access to the Cassandra shell and can proceed to issue basic database commands to your Cassandra server.

Accessing the Cassandra cql shell from windows cmd.

Conclusion

You have successfully installed Cassandra on Windows.

Large volumes of unstructured data can be an issue for traditional relational databases. This popular NoSQL database solution is going to allow you to capture and store a lot more of increasingly valuable data.

Learn more about how to use Cassandra in our guide on how to create, drop, alter and truncate Cassandra tables.

How to Install Cassandra on Windows 10

Installing Cassandra on Windows 10 is a relatively straightforward process. This guide will walk you through the steps necessary to get Cassandra up and running on your Windows 10 machine.

Step 1: Download Cassandra

The first step is to download the Cassandra installer. You can find the latest version of Cassandra on the Apache Cassandra website. Once you have downloaded the installer, double-click it to begin the installation process.

Step 2: Install Cassandra

Once the installer has been launched, you will be presented with a series of screens that will guide you through the installation process. Follow the on-screen instructions to complete the installation.

Step 3: Configure Cassandra

Once the installation is complete, you will need to configure Cassandra. This can be done by editing the Cassandra configuration file, which is located in the Cassandra installation directory. You can find more information about configuring Cassandra in the Cassandra documentation.

Step 4: Start Cassandra

Once you have configured Cassandra, you can start the Cassandra service. This can be done by running the Cassandra executable, which is located in the Cassandra installation directory. Once the service has been started, you can access Cassandra by connecting to the Cassandra server.

Step 5: Test Cassandra

Once Cassandra is up and running, you can test it by running some basic commands. You can find more information about the Cassandra command line interface in the Cassandra documentation.

Conclusion

Installing Cassandra on Windows 10 is a relatively straightforward process. This guide has walked you through the steps necessary to get Cassandra up and running on your Windows 10 machine. Once Cassandra is installed and configured, you can start using it to store and manage your data.

Jaspreet Singh Ghuman

Jaspreet Singh Ghuman

Jassweb.com/

Passionate Professional Blogger, Freelancer, WordPress Enthusiast, Digital Marketer, Web Developer, Server Operator, Networking Expert. Empowering online presence with diverse skills.

jassweb logo

Jassweb always keeps its services up-to-date with the latest trends in the market, providing its customers all over the world with high-end and easily extensible internet, intranet, and extranet products.

Contact
San Vito Al Tagliamento 33078
Pordenone Italy
Item added to cart.
0 items - 0.00
Open chat
Scan the code
Hello 👋
Can we help you?