Install cassandra in windows

Installing Cassandra¶

These are the instructions for deploying the supported releases of Apache Cassandra on Linux servers.

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 not an exhaustive list of operating system platforms, nor is it prescriptive. However users will be well-advised to conduct exhaustive tests of their own particularly for less-popular distributions of Linux. Deploying on older versions is not recommended unless you have previous experience with the older distribution in a production environment.

Prerequisites¶

  • Install the latest version of Java 8, either the Oracle Java Standard Edition 8 or OpenJDK 8. 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). Running Cassandra on Java 11 is experimental. Do so at your own risk. For more information, see NEWS.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 .

Choosing an installation method¶

For most users, installing the binary tarball is the simplest choice. The tarball unpacks all its contents into a single location with binaries and configuration files located in their own subdirectories. The most obvious attribute of the tarball installation is it does not require root permissions and can be installed on any Linux distribution.

Packaged installations require root permissions. Install the RPM build on CentOS and RHEL-based distributions if you want to install Cassandra using YUM. Install the Debian build on Ubuntu and other Debian-based distributions if you want to install Cassandra using APT. Note that both the YUM and APT methods required root permissions and will install the binaries and configuration files as the cassandra OS user.

Installing the binary tarball¶

  1. Verify the version of Java installed. For example:
  1. Download the binary tarball from one of the mirrors on the Apache Cassandra Download site. For example, to download 4.0:

NOTE: The mirrors only host the latest versions of each major supported release. To download an earlier version of Cassandra, visit the Apache Archives.

  1. OPTIONAL: Verify the integrity of the downloaded tarball using one of the methods here. For example, to verify the hash of the downloaded file using GPG:

Compare the signature with the SHA256 file from the Downloads site:

The files will be extracted to the apache-cassandra-4.0-beta1/ directory. This is the tarball installation location.

  1. Located in the tarball installation location are the directories for the scripts, binaries, utilities, configuration, data and log files:
Читайте также:  Windows doctor professional edition 2009

For information on how to configure your installation, see Configuring Cassandra.

NOTE: This will run Cassandra as the authenticated Linux user.

You can monitor the progress of the startup with:

Cassandra is ready when you see an entry like this in the system.log :

The status column in the output should report UN which stands for “Up/Normal”.

Alternatively, connect to the database with:

Installing the Debian packages¶

  1. Verify the version of Java installed. For example:
  1. Add the Apache repository of Cassandra to the file cassandra.sources.list . The latest major version is 4.0 and the corresponding distribution name is 40x (with an “x” as the suffix). For older releases use 311x for C* 3.11 series, 30x for 3.0, 22x for 2.2 and 21x for 2.1. For example, to add the repository for version 4.0 ( 40x ):
  1. Add the Apache Cassandra repository keys to the list of trusted keys on the server:
  1. Update the package index from sources:

NOTE: A new Linux user cassandra will get created as part of the installation. The Cassandra service will also be run as this user.

  1. The Cassandra service gets started automatically after installation. Monitor the progress of the startup with:

Cassandra is ready when you see an entry like this in the system.log :

NOTE: For information on how to configure your installation, see Configuring Cassandra.

  1. Check the status of Cassandra:

The status column in the output should report UN which stands for “Up/Normal”.

Alternatively, connect to the database with:

Installing the RPM packages¶

  1. Verify the version of Java installed. For example:
  1. Add the Apache repository of Cassandra to the file /etc/yum.repos.d/cassandra.repo (as the root user). The latest major version is 4.0 and the corresponding distribution name is 40x (with an “x” as the suffix). For older releases use 311x for C* 3.11 series, 30x for 3.0, 22x for 2.2 and 21x for 2.1. For example, to add the repository for version 4.0 ( 40x ):
  1. Update the package index from sources:

NOTE: A new Linux user cassandra will get created as part of the installation. The Cassandra service will also be run as this user.

  1. Start the Cassandra service:
  1. Monitor the progress of the startup with:

Cassandra is ready when you see an entry like this in the system.log :

NOTE: For information on how to configure your installation, see Configuring Cassandra.

  1. Check the status of Cassandra:

The status column in the output should report UN which stands for “Up/Normal”.

Alternatively, connect to the database with:

Further installation info¶

For help with installation issues, see the Troubleshooting section.

Install cassandra in 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.
Читайте также:  Windows height and width javascript

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 repository of Cassandra to /etc/apt/sources.list.d/cassandra.sources.list , for example for the latest 3.11 version:
    • 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.)

  • Add the Apache repository of Cassandra to /etc/yum.repos.d/cassandra.repo , for example for the latest 3.11 version:
    • 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.

    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 и запустите.

    Перед вами откроется новое консольное окно, в котором можно начинать работать.

    Оцените статью