- Simple Way to Install Cassandra In Windows 10
- What is cassandra and why to use it?
- Let’s try to create the table in it:
- First create the namespace where data holds.
- Congratulations! You have your Cassandra installed. Now you can explore it.
- Установка СУБД Cassandra на Windows Server
- Что это такое?
- Установка на Windows
- Installing cassandra on windows
- Latest Stable Version
- Older Maintained Releases
- Installation from Debian packages
- Installation from RPM packages
- Source
- Install Apache cassandra on windows 10/8/7 without datastax
- What is Apache Cassandra?
- How to Install Cassandra on Windows 10/8/7 without datastax
- Step 1: Download Java 8 (Java SE Development Kit 8u211)
- Step 2: Set $Java_Home variable on Windows
- Step 3: Download and Install Python 2.7 on Windows 10/8/7
- Step 4: Set System environment variables for Python
- Step 5: Download Apache Cassandra on Windows 10/7
- Step 6: Extract Apache Cassandra Tar folder
- Step 7: Set Cassandra HOME Environmental variables
- Step 8: Run and up Cassandra on Windows 10/ server
- Step 9: Run Cassandra commands on Windows
Simple Way to Install Cassandra In Windows 10
Jul 25, 2019 · 4 min read
Figure out simple way to get installed and configure to run cassandra NoSQL database in Windows 10 PC in just 4 steps:
I am writing this tutorial since i face challenge to install cassandra in windows on self and i want to share what i figure out for the solution to other geeks.
What is cassandra and why to use it?
Apache Cassandra is a highly scalable, high-per f ormance distributed database designed to handle large amounts of data across many commodity (cheap) servers, providing high availability with no single point of failure. It is a type of NoSQL database that is considered a key-value store. It’s query much similar to SQL.
- Outgrown your regular relational database i.e petabytes, zettabytes size
- Need of fast insert/update/selection of data that is scalable and fault-tolerant.
Steps to setup Cassandra on Window Machine locally.
1. Cassandra need JDK to run. First need to install JDK on the PC.
- Go To Oracle (SignUp required) or Filehippo to download JDK 1.8 from which you find suitable.
- Run the Install as it is.
- Configure JDK path As:
- Copy the JDK where is installed it’s bin directory. Mine is 64-bit found inside “C:\Program Files\Java\jdk1.8.0_181\bin” and place on Environment Variable as new Env_name : “JAVA_HOME” later we use for cassandra.
- Note: Progra
1 = ‘Program Files’ for 64-bit
Progra
2 = ‘Program Files(x86)’ for 32-bit in Environment path.
2. Go to Apache Cassandra Download Page. And Download the latest version. The latest version at that time is cassandra-3.11.4
- Unzip it and place all files inside sub folder into ……………….. “C:\Program Files\apache-cassandra-3.11.4”
- Open CMD inside “C:\Program Files\apache-cassandra-3.11.4\bin” and type cassandra then the output as shown below.
1\Java\jdk1.8.0_181″
- Save the cassandra.bat then run “cassandra.bat -f” with CMD Run as Administrator. This time, error should resolve if your edit successful.
3. Need Python2.7 to run Cassandra Query shell cqlsh .
- Download Python2.7 latest version and extract inside the “C:\Program Files\apache-cassandra-3.11.4\bin” during installing. Or simply copy after installing python2.7 all files inside “bin” directory of cassandra-3.11.4. This is a easy way to go.
4. Finally run the Cassandra Server as “cassandra.bat -f” with CMD Run as Administrator from the bin directory. Following screen should see on successful start.
- Don’t close it, keep running.
- Then, open other CMD go over the bin directory of cassandra installed. To run cqlsh by type cqlsh . Following output should get.
Let’s try to create the table in it:
First create the namespace where data holds.
cqlsh> create keyspace test
cqlsh:test>CREATE TABLE emp(
emp_id int PRIMARY KEY,
emp_name text,
emp_city text,
emp_sal varint,
emp_phone varint
);
For Verification: cqlsh:test> select * from emp;
Congratulations! You have your Cassandra installed. Now you can explore it.
If you find helpful this tutorial please click on green icon, share to others.
Установка СУБД Cassandra на Windows Server
В инструкции описан процесс установки СУБД Cassandra на виртуальные сервера под управлением операционной системы семейства Windows.
Что это такое?
Cassandra — проект Apache, представляет собой распределенную базу данных для управления большими объемами структурированных данных. В данной инструкции установка будет выполняться через интеграторов DataStax, которые являются ключевыми участниками проекта Cassandra Apache. Продукт DataStax бесплатен, прост и удобен в установке, в отличии от исходных пакетов.
- Cassandra требовательна к количеству доступной оперативной памяти, так как написана на языке Java, поэтому рекомендуется наличие не менее 4 Гб RAM;
- На вашем Windows Server должна быть поставлена Java Runtime Environment, о том как это сделать написано в нашей инструкции: Установка Java для Windows.
Установка на Windows
Запустите загруженный файл. Нажмите Next для продолжения инсталляции.
Примите лицензионное соглашение.
На следующем шаге укажите путь до программного обеспечения.
При необходимости отметьте галочкой автоматический запуск DataStax Cassandra Community Service.
По окончании процесса установки нажмите Next.
Для работы с Cassandra в меню Windows найдите новую установленную программу Cassandra CQL Shell и запустите.
Перед вами откроется новое консольное окно, в котором можно начинать работать.
Installing cassandra on windows
Download the latest Apache Cassandra 4.0 beta release: 4.0-beta4 (pgp, sha256 and sha512), released on 2020-12-30.
Latest Stable Version
Download the latest Apache Cassandra 3.11 release: 3.11.10 (pgp, sha256 and sha512), released on 2020-11-04.
Older Maintained Releases
The following older Cassandra releases are still maintained:
- Apache Cassandra 3.11 will fully be maintained until April 30, 2022 and with critical fixes only until April 30, 2023 The latest release is 3.11.10 (pgp, sha256 and sha512), released on 2020-11-04.
- Apache Cassandra 3.0 will be maintained until April 30, 2022 with critical fixes only. The latest release is 3.0.24 (pgp, sha256 and sha512), released on 2020-11-04.
- Apache Cassandra 2.2 will be maintained until April 30, 2021. with critical fixes only. The latest release is 2.2.19 (pgp, sha256 and sha512), released on 2020-11-04.
- Apache Cassandra 2.1 will be maintained until April 30, 2021 with critical fixes only. The latest release is 2.1.22 (pgp, sha256 and sha512), released on 2020-08-31.
Older (unmaintained) versions of Cassandra are archived here.
Installation from Debian packages
- For the specify the major version number, without dot, and with an appended x .
- The latest is 311x .
For older releases, the can be one of 30x , 22x , or 21x .
- Add the Apache Cassandra repository keys:
Then add the public key A278B781FE4B2BDA as follows:
and repeat sudo apt-get update . The actual key may be different, you get it from the error message itself. For a full list of Apache contributors public keys, you can refer to https://downloads.apache.org/cassandra/KEYS.
- You can start Cassandra with sudo service cassandra start and stop it with sudo service cassandra stop . However, normally the service will start automatically. For this reason be sure to stop it if you need to make any configuration changes.
- Verify that Cassandra is running by invoking nodetool status from the command line.
- The default location of configuration files is /etc/cassandra .
- The default location of log and data directories is /var/log/cassandra/ and /var/lib/cassandra .
- Start-up options (heap size, etc) can be configured in /etc/default/cassandra .
Installation from RPM packages
- For the specify the major version number, without dot, and with an appended x .
- The latest is 311x .
- For older releases, the can be one of 30x , 22x , or 21x .
(Not all versions of Apache Cassandra are available, since building RPMs is a recent addition to the project.)
- Install Cassandra, accepting the gpg key import prompts:
Start Cassandra (will not start automatically):
Systemd based distributions may require to run systemctl daemon-reload once to make Cassandra available as a systemd service. This should happen automatically by running the command above.
Make Cassandra start automatically after reboot:
Please note that official RPMs for Apache Cassandra only have been available recently and are not tested thoroughly on all platforms yet. We appreciate your feedback and support and ask you to post details on any issues in the corresponding Jira ticket.
Source
Development is done in the Apache Git repository. To check out a copy:
© 2016 The Apache Software Foundation. Apache, the Apache feather logo, and Apache Cassandra are trademarks of The Apache Software Foundation.
Install Apache cassandra on windows 10/8/7 without datastax
Here in this tutorial will see a simple method to install Apache Cassandra on Windows 10/8/7 or Windows Server 2008/2012 without using Datastax community edition setup.
What is Apache Cassandra?
Apache Cassandra is a free and open source distributed NoSQL database system. Originally developed by Facebook, it is used to store simple format data such as inboxes. It combines Google BigTable’s data model with Amazon Dynamo’s fully distributed architecture. Facebook has opened Cassandra in 2008. Since then, Cassandra has good scalability that’s Digg, Twitter, GitHub, GoDaddy, Hulu, Instagram and other well-known sites or companies have adopted it and become a popular distributed structured data storage solutions.
Apache Cassandra is a hybrid, non-relational database similar to Google’s BigTable. Its main function is richer than Dynamo (distributed Key-Value storage system ), but its support is not as good as document storage MongoDB (an open source product between a relational database and non-relational database). It is the most abundant and non-relational database. Like a relational database, the supported data structure is very loose and is similar to JSON format, so it can store more complex data types.
Note: We are not using DataStax here to install Apache Cassandra because DataStax no longer provides the DataStax Community version of Apache Cassandra. You can read the official dictum here.
Prerequisites
- The latest version of Java 8
- Python 2.7
- Apache Cassandra
How to Install Cassandra on Windows 10/8/7 without datastax
Step 1: Download Java 8 (Java SE Development Kit 8u211)
First thing first which is Java 8 installation and setting up of System variables for it on Windows 10/8/7 system. Thus, here is the link to download Java SE Development Kit 8u211.
After downloading, double click on the Java setup file to run and install it.
Step 2: Set $Java_Home variable on Windows
To set the system variables on your Windows system for Java 8; right click on My Computer or This PC icon and select properties option.
From the properties of your system on the left side, you will see an option called Advanced system settings. Click on that.
From the Environmental Variables screen, click on the New button given under System variables. Now in New System Variables window for Variable name type: JAVA_HOME and then click on Variable Value column after that select Browse Directory button.
From browse directory go to My computer or This PC->C: Drive->Programe Files->Java and select JDK 1.8
After adding the path of JAVA 8 to System variable it will look like something below screenshot. To save the settings click on the OK button.
Step 3: Download and Install Python 2.7 on Windows 10/8/7
We have tried the latest version of Python for Apache Cassandra but it gave an error while running Cassandra commands CQLSH. The error was:
Hence, we had to install the downgrade version which is 2.7 and compatible with Apache Cassandra.
Here is the link to download Python 2.7 for Windows. On the download page click on the Windows x86-64 MSI installer.
After downloading the Python setup just run it like any other normal Windows.exe application.
Step 4: Set System environment variables for Python
Once the installation is done, the next thing which needs to be done is to let our command shells know about its commands by setting the environment variables.
Just like we have done above for JAVA, again go to Advance settings to access the environment variables and under the system variables you will see Path variable double click on that.
Click on New and then Browse. From directory browser go to My computer or This PC- C: Drive->select Python 27.
Hit the OK button to save the changes.
Step 5: Download Apache Cassandra on Windows 10/7
Two things have been successfully set that we needed to up and run a Cassandra server. Now finally, go to Apache Cassandra website and download its latest version. Here is the link.
While writing this Apache Cassandra setup tutorial for Windows, the latest version was 3.11 which might be different in your case.
Step 6: Extract Apache Cassandra Tar folder
The downloaded folder of Apache Cassandra will be in Tar compressed form. You can use Winrar or 7zip to extract it. After extracting open the folder and copy the folder to C: Drive.
Step 7: Set Cassandra HOME Environmental variables
As we set system variables above for Java and Python, we do the same for Cassandra. Under the system, variable click on the NEW button and type CASSANDRA_HOME for Variable name. And then click on Variable value column and browse the directory to select the folder of Apache Cassandra we copied to C: drive in the above step.
Now double click on the Path Variable of System Variables and Click New then Browse the Apache Cassandra folder resided in C: drive and inside that select the bin folder. Click the OK button and then again the OK button to save the variables.
Step 8: Run and up Cassandra on Windows 10/ server
Open the Command prompt or PowerShell under administrative rights and type the below command to start the Cassandra.
When you see Node started on Localhost/127.0.0.1 then just leave the command prompt window running Apache Cassandra open as it is.
Note: If you are running the above command in Powershell then you can close it.
Step 9: Run Cassandra commands on Windows
Now, open new Command Prompt Window and run:
Now you can start using Cassandra commands…
If you want to make the Cassandra service as Windows service so, that you don’t need to be run it again and again from the command prompt, see this tutorial: Start Cassandra as service in Windows 10/7/server…