Apache Cassandra 1.1 Documentation

Installing Cassandra RHEL or CentOS Packages

This document corresponds to an earlier product version. Make sure you are using the version that corresponds to your version.

Latest Cassandra documentation | Earlier Cassandra documentation

DataStax provides yum repositories for CentOS and RedHat Enterprise. For a complete list of supported platforms, see DataStax Community – Supported Platforms.

Note

By downloading community software from DataStax you agree to the terms of the DataStax Community EULA (End User License Agreement) posted on the DataStax web site.

Prerequisites

Before installing Cassandra make sure the following prerequisites are met:

  • Yum Package Management application installed.
  • Root or sudo access to the install machine.
  • The latest version of Oracle Java SE Runtime Environment (JRE) 6 is installed. Java 7 is not recommended.
  • Java Native Access (JNA) is required for production installations. See Installing JNA.
  • Also see Recommended Settings for Production Installations.

Steps to Install Cassandra

The packaged releases create a cassandra user. When starting Cassandra as a service, the service runs as this user.

  1. Check which version of Java is installed by running the following command in a terminal window:

    java -version
    

    Use the latest version of Java 6 on all nodes. Java 7 is not recommended. If you need help installing Java, see Installing the JRE on RHEL or CentOS Systems.

  2. (RHEL 5.x/CentOS 5.x only) Make sure you have EPEL (Extra Packages for Enterprise Linux) installed. EPEL contains dependent packages required by DSE, such as jna and jpackage-utils. For both 32- and 64-bit systems:

    $ sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

  3. Add a yum repository specification for the DataStax repository in /etc/yum.repos.d. For example:

    $ sudo vi /etc/yum.repos.d/datastax.repo
    
  4. In this file add the following lines for the DataStax repository:

    [datastax]
    name= DataStax Repo for Apache Cassandra
    baseurl=http://rpm.datastax.com/community
    enabled=1
    gpgcheck=0
    
  5. Install the package using yum.

    $ sudo yum install dsc1.1
    

This installs the DataStax Community distribution of Cassandra and the OpsCenter Community Edition.