Install Cassandra Docker

This article is about how to install Cassandra and play with several of its query languages. To accomplish that, I’m going to utilize Docker.

Creating a DataStax Enterprise container. Use the options described in this section to create DataStax Enterprise server containers. By default, the DSE server image runs in Cassandra-only mode. To run with advanced DSE functionality, add the option that enables any combination of search, analytics, and graph to the end of the docker run command. Docker run -rm -it -network cassandra nuvo/docker-cqlsh cqlsh cassandra 9042 -cqlversion='3.4.4' This should get you a prompt like so: Connected to Test Cluster at cassandra:9042. STEP 1: Install Packages Necessary for Apache Cassandra. Before you get on to installing Cassandra on Ubuntu, make sure you install Java OpenJDK 8 and the api-transport-https package. If you already have these packages installed, you can skip to STEP 2 of the guide. Get started with running DataStax Distribution of Apache Cassandra™ (DDAC), DataStax Enterprise (DSE), DSE OpsCenter, and DataStax Studio on Docker. Use DataStax Docker images to create containers for production and non-production environments. Download and install Docker from the Docker website. If you already have Cassandra running in a docker-compose application, or want to start Stargate with multiple nodes of Cassandra, installing with docker-compose is a simple method. If you need to install Stargate with a running Cassandra cluster in either virtual machines or bare metal, use the method that downloads a zip file of Stargate jar.

Since the topic covered in this article is really specific, I’ll make it short. For those who want to know more about Cassandra, please visit its official page here.

A. Open up your Terminal
B. Create a network for our Cassandra container. Let’s call it “cassandra-net”

C. Pull Cassandra image from Docker hub, then create and run the container using the following command

D. Let’s create another Cassandra container. To make it simpler, we’ll place both containers within the same node (local machine)

E. After the above steps, we’ve already installed and run Cassandra. Now, let’s do some interactions using several query commands
F. Create another container dedicated for executing Cassandra Query Language Shell (CQLSH)

G. The previous cqlsh command enables us to execute shell commands
H. In Cassandra, we need to create a keyspace before creating tables. Perhaps, you might presume a keyspace as a database


Install Cassandra Docker Chrome

I. Please try other query commands

Install Cassandra On Docker

Thanks for reading.

To access a deeper knowledge base, click sign in, and then log on.

  • Deep, explanatory content about topics like deduplication, auxiliary copy, and networking

  • All the command lines and Qscripts

  • CommCell performance tips and tweaks for more experienced users

  • Administrator utilities and developer tools

  • Configuration options for multi-tenant CommCell environments

  • White papers

Install Cassandra Docker Free

What's New in Essential

Essential documentation is available for everyone, and new features, release notes, and information about changes are available for each recent feature release.

Go back to Essential docs.

Most Viewed Posts