This section provides instructions for installing and setting up a self-contained, single-node instance of DataStax Enterprise in your home directory. These instructions include installing OpsCenter. This method does not require root permissions and, consequently, requires more steps than installing as root.
Installing and starting DataStax Enterprise as user from the binary tarball consists of two parts:
In this section, you download and install the DataStax Enterprise binary tarball.
To download and install the tarball:
In your home directory, download the DataStax Enterprise distribution (required) and the OpsCenter distribution (optional). Substitute <username>:<password> with correct DataStax login credentials.
$ cd ~/ $ curl -OL http://<username>:<password>@downloads.datastax.com/enterprise/dse.tar.gz $ curl -OL http://<username>:<password>@downloads.datastax.com/enterprise/opscenter.tar.gz
Unpack the distributions:
$ tar -xzvf dse.tar.gz $ tar -xzvf opscenter.tar.gz $ rm *.tar.gz
Go to the install directory. For example:
$ cd dse-2.1
Create the data and logging directories:
$ mkdir dse-data
In dse-data, create the following directories:
$ cd dse-data $ mkdir data $ mkdir saved_caches $ mkdir commitlog
To run DataStax Enterprise as a single-node cluster on the localhost from your home directory, you must set some configuration properties in the cassandra.yaml and log4j-server.properties files.
To configure and start the cluster:
Go the directory containing the cassandra.yaml file. For example:
$ cd ~/dse-2.1/resources/cassandra/conf
Edit the following lines in the cassandra.yaml file. For example:
initial_token: 0 data_file_directories: - ~/dse-2.1/dse-data/data commitlog_directory: ~/dse-2.1/dse-data/commitlog saved_caches_directory: ~/dse-2.1/dse-data/saved_caches listen_address: 127.0.0.1
Also in the conf directory, edit the following line in the log4j-server.properties file:
Start DataStax Enterprise (as an Analytics node - for running the Portfolio Manager Demo):
$ cd ~/dse-2.1 $ bin/dse cassandra -t
where cassandra starts the Cassandra process plus CassandraFS and the -t option starts the Hadoop JobTracker and TaskTracker processes.
Use this type of node for the Portfolio Manager Demo.
When Cassandra loads, you may notice a message that MX4J will not load and that mx4j-tools.jar is not in the classpath. You can ignore this message. MX4j provides an HTML and HTTP interface to JMX and is not necessary to run Cassandra. DataStax recommends using OpsCenter. It has more monitoring capabilities than MX4J.
Check that your cluster is up and running (from the install directory):
$ bin/nodetool ring -h localhost