APACHE CASSANDRA INSTALLATIONS

Share via:

APACHE CASSANDRA INSTALLATIONS

These are the guidelines for setting up the supported Apache Cassandra releases on Linux systems.
Cassandra runs on a wide array of Linux distributions including (but not limited to):
Ubuntu, most notably LTS releases 16.04 to 18.04.
CentOS & RedHat Enterprise Linux (RHEL) including 6.6 to 7.7.
Amazon Linux AMIs including 2016.09 through to Linux 2
Debian versions 8 & 9
SUSE Enterprise Linux 12
This is neither a prescriptive nor a complete list of operating system platforms. Nonetheless, users would be wise to carry out thorough tests on their own, especially for less well-known Linux versions. It is not advised to deploy on older versions unless you have prior production-level expertise with the older distribution.
Installing a Docker image is easy if you already use Docker. You must either have Docker installed on Linux or install Docker Desktop for Mac or Windows. After removing the relevant image, use the run command to launch Cassandra.
Installing the binary tarball is likewise a straightforward decision for most users. All of the contents of the tarball are unpacked into a single place, with configuration files and binaries stored in separate subdirectories. The tarball installation’s most evident feature is that it can be installed on any Linux distribution and doesn’t require root capabilities.
Packaged installations are best suited for production setups and need root permissions. To install Cassandra using YUM, install the RPM build for CentOS and RHEL-based editions. If you want to install Cassandra via APT, install the Debian build on Ubuntu and other Debian-based distributions. It should be noted that installing the binaries and configuration files as the Cassandra OS user needed root rights for both the YUM and APT approaches.
Prerequisites
Install the latest version of Java 8 or Java 11, either the Oracle Java Standard Edition 8Oracle Java Standard Edition 11 (Long Term Support) or OpenJDK 8 / OpenJDK 11. To verify that you have the correct version of java installed, type java -version.
NOTE: Experimental support for Java 11 was added in Cassandra 4.0 (CASSANDRA-9608). Full support is effective Cassandra 4.0.2 version (CASSANDRA-16894) For more information, see txt.
For using cqlsh, the latest version of Python 3.6+ or Python 2.7 (support deprecated). To verify that you have the correct version of Python installed, type python –version.
There are three methods of installing Cassandra that are common:
Docker image
Tarball binary file
Package installation (RPM, YUM)
 
USING DOCKER IMAGE
Step-1: Installing Docker Desktop on your pc
First try to install Docker Desktop on your windows.
https://docs.docker.com/desktop/install/windows-install/
Go to the above link for downloading Docker Desktop    official website.

Next you will be getting like an above figure.
Then after successful downloading
Try to install the file
Then launch the application
You may continue by signing up or without signing up

 

STEP-2: Pulling image using cmd
Then open cmd
Pull Image
type the command docker pull Cassandra in it to launch the application.

Check if the image is pulled or not
Type the command docker images.

 

STEP-3: Running the container using image.
Then run the container using image.

Then type docker ps To check the container is running or not

Get inside the container.
Type the command docker exec -it 5fdf3ce7225a bash.

 

STEP -4: Starting the Cassandra Shell)
Start cqlsh (Cassandra Shell)
Type the command cqlsh

 

STEP-5: Creating and describing the Key space
Create and describe key space.
Create Keyspace:
Type the command CREATE KEYSPACE techframer WITH replication ={‘class’:’SimpleStrategy’, ‘replication_factor’:1};

Describe Key space:
Type the command DESC KEYSPACES

 

STEP-6: Creating a table.
Create Table
Type the command CREATE TABLE student(student_id int PRIMARY KEY, student_name text, student_city text, student_fees varint, student_phone varint);

 

STEP-7: Adding and Checking the Data
Add & Check Data
Select Data
Type the command SELECT* FROM student;
Insert Data
Type the command INSERT INTO student(student_id, student _fees, student_name) VALUES(1,2000,’Sandeep’);

Watch Demo here Cassandra installation using docker (youtube.com)

Assisted and designed by: Angala Sandeep Kumar
Connect me on LinkedIn https://www.linkedin.com/in/a-sandeep-kumar-061263237

 

Author    : Neha Kasanagottu
LinkedIn : https://www.linkedin.com/in/neha-kasanagottu-5b6802272
Thank you for giving your valuable time to read the above information. Please click here to subscribe for further updates.
KTExperts is always active on social media platforms.
Facebook  : https://www.facebook.com/ktexperts/
LinkedIn    : https://www.linkedin.com/company/ktexperts/
Twitter       : https://twitter.com/ktexpertsadmin
YouTube   :  https://www.youtube.com/c/ktexperts
Instagram  : https://www.instagram.com/knowledgesharingplatform
Share via:
Note: Please test scripts in Non Prod before trying in Production.
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Add Comment