DataStax Enterprise 1.0 Documentation

Installing DataStax Enterprise Packaged Releases or Tarball Distribution

DataStax provides Debian and RedHat packaged releases for DataStax Enterprise (DSE) and a binary tarball distribution. RPM and Debian packages are currently supported through the yum and apt package management tools.

To access the DSE package repositories, you will need your DataStax registration username and password. If you are not sure of your username and password, contact DataStax Support.

Note

DataStax Enterprise requires the Oracle Java Runtime Environment version 1.6.0_19 or later be installed on all DSE nodes. If you need help installing Java, see Installing the JRE on RHEL or CentOS Systems or Installing the JRE on Debian or Ubuntu Systems.

Installing DataStax Enterprise RPM Packages

DataStax provides yum repositories for RedHat Enterprise Linux 5 and 6 and Fedora 12, 13 and 14. These instructions assume that you have the yum package management application installed, and that you have root (or sudo) access on the machine where you are installing.

Note

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

  1. (CentOS 5.x?RHEL 5.x only) Before you begin, 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:

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

  2. Add a yum repository file for DataStax in /etc/yum.repos.d. For example:

    vi /etc/yum.repos.d/datastax.repo
    
  3. In this file add the following lines where <username> and <password> are the DataStax account credentials from your registration confirmation email:

    [datastax]
    name= DataStax Repo for Apache Cassandra
    baseurl=http://<username>:<password>@rpm.datastax.com/enterprise
    enabled=1
    gpgcheck=0
    
  4. Install DSE using yum:

    yum install dse-full opscenter
    

Installing DataStax Enterprise Debian Packages

DataStax provides debian package repositories for Debian 6.0 (Squeeze), Ubuntu Lucid (10.04), and Ubuntu Maverick (10.10). These instructions assume that you have the aptitude package management application installed, and that you have root (or sudo) access on the machine where you are installing.

Note

By downloading DSE software from DataStax you agree to the terms of the DataStax Enterprise EULA (end user license agreement) posted on the DataStax web site.

  1. Edit the /etc/apt/sources.list file, and add the DataStax repository for your operating system where <username> and <password> are the DataStax account credentials from your registration confirmation email.

    deb http://<username>:<password>@debian.datastax.com/enterprise stable main
    
  2. Add the DataStax repository key to your aptitude trusted keys.

    $ wget -O - http://debian.datastax.com/debian/repo_key | sudo apt-key add -
    
  3. Install the DSE packages.

    $ sudo apt-get update
    $ sudo apt-get install dse-full opscenter
    
  4. By default, the Debian packages start the dse service automatically. To stop the service and clear the initial gossip history that gets populated by this initial start:

    $ sudo service dse stop
    $ sudo bash -c 'rm /var/lib/cassandra/data/system/*'
    

About DataStax Enterprise Packaged Installations

The packaged releases create a user cassandra. When starting DSE as a service, the Cassandra and Hadoop tracker services run as this user. A service initialization script is located in /etc/init.d/dse. Run levels are not set by the package.

The package installs into the following directories:

Cassandra Directories

  • /var/lib/cassandra (Cassandra and CassandraFS data directories)
  • /var/log/cassandra
  • /var/run/cassandra
  • /usr/share/dse/cassandra (Cassandra environment settings)
  • /usr/share/dse/cassandra/lib
  • /usr/share/dse-demos (Portfolio Manager demo application)
  • /usr/bin
  • /usr/sbin
  • /etc/dse/cassandra (Cassandra configuration files)
  • /etc/init.d
  • /etc/security/limits.d
  • /etc/default/

Hadoop Directories

  • /usr/share/dse/hadoop (Hadoop environment settings)
  • /etc/dse/hadoop (Hadoop configuration files)

Hive Directories

  • /usr/share/dse/hive (Hive environment settings)
  • /etc/dse/hive (Hive configuration files)

Pig Directories

  • /usr/share/dse/pig (Pig environment settings)
  • /etc/dse/pig (Pig configuration files)

DataStax OpsCenter Directories

See the OpsCenter Installation Guide for instructions on setting up OpsCenter to monitor your DataStax Enterprise cluster.

  • /var/lib/opscenter (SSL certificates for encrypted agent/dashboard communications)
  • /var/log/opscenter (log directory)
  • /var/run/opscenter (runtime files)
  • /usr/share/opscenter (jar, agent, web application, and binary files)
  • /etc/opscenter (configuration files)
  • /etc/init.d (service startup script)
  • /etc/security/limits.d (OpsCenter user limits)

Installing the DataStax Enterprise Tarball Distribution

For platforms that do not have package support of if you want to do a not-root installation, DataStax provides a binary tarball distribution of DataStax Enterprise. Before installing, make sure that you have the Sun Java Runtime Environment version 1.6.0_19 or later installed on all DSE nodes.

Note

By downloading DSE software from DataStax you agree to the terms of the DataStax Enterprise EULA (end user license agreement) posted on the DataStax web site.

  1. Download the distribution to a location on your machine and unpack it, where <username>:<password> is your DataStax login credentials:

    wget http://<username>:<password>@downloads.datastax.com/enterprise/dse.tar.gz
    
    tar -xzvf dse.tar.gz
    
  2. For convenience, you may want to set the following environment variables in your user environment (for example, add the following to ~/.bashrc):

    export DSE_HOME=<install_location>/dse-1.0.2
    export PATH=$PATH:$DSE_HOME/bin
    
  3. Create the data and logging directories needed for Cassandra.

    By default, Cassandra is configured to use /var/lib/cassandra and /var/log/cassandra. You can either create those directories (requires root or sudo), for example where $USER is the user that will run DSE:

    # mkdir /var/lib/cassandra
    # mkdir /var/log/cassandra
    # chown -R $USER:$GROUP /var/lib/cassandra
    # chown -R $USER:$GROUP /var/log/cassandra
    

Or you can define your own data directory locations and edit the following properties in the $DSE_HOME/resources/cassandra/conf/cassandra.yaml configuration file before starting:

initial_token: 0
data_file_directories: <home_directory_path>/cassandra-data
commitlog_directory: <home_directory_path>/cassandra-data/commitlog
saved_caches_directory: <home_directory_path>/cassandra-data/saved_caches

About DataStax Enterprise Tar Installations

DSE Directories

  • bin (DSE start scripts)
  • demos (Portfolio Manager Demo)
  • interface
  • javadoc
  • lib
  • resources/cassandra/bin (Cassandra utilities)
  • resources/cassandra/conf (Cassandra configuration files)
  • resources/hadoop (Hadoop installation)
  • resources/hive (Hive installation)
  • resources/pig (Pig installation)

Installing JNA

Installing JNA (Java Native Access) on Linux platforms can improve Cassandra memory usage. With JNA installed and configured as described in this section, Linux does not swap out the JVM, and thus avoids related performance issues.

Note

JNA is not required on Windows.

To install JNA

  1. Download jna.jar from the JNA project site.
  2. Add jna.jar to $DSE_HOME/lib/ and $DSE_HOME/resources/cassandra/lib (or otherwise place it on the CLASSPATH).
  3. Edit the file /etc/security/limits.conf, adding the following entries for the user or group that runs DSE:
$USER soft memlock unlimited
$USER hard memlock unlimited

Next Steps

For next steps see Configuring and Initializing a DataStax Enterprise Cluster and then Starting a DataStax Enterprise Cluster.

After you have your cluster up and running, see the OpsCenter Installation Guide for instructions on setting up OpsCenter to monitor your DataStax Enterprise cluster.