Ubuntu installation Cassandra

Source: Internet
Author: User
Tags cassandra curl datastax

Uninstall Cassandra

$ sudo su

Remove Cassandra

$ apt-get Remove Cassandra

Cleaned the Cassandra folders

$ rm-rf/var/lib/cassandra

$ rm-rf/var/log/cassandra

$ rm-rf/etc/cassandra

Install Cassandra

ADD the DataStax Community repository to The/etc/apt/sources.list.d/cassandra.sources.list

$ echo "Deb Http://debian.datastax.com/community stable main" | sudo tee-a/etc/apt/sources.list.d/cassandra.sources.list


ADD the DataStax repository key to your aptitude trusted keys.

$ curl-l Https://debian.datastax.com/debian/repo_key | sudo apt-key add-


If the above doesn ' t work try:

Curl-l Http://debian.datastax.com/debian/repo_key | sudo apt-key add-


and then

sudo apt-get update and then sudo apt-get install Cassandra

Configure and Run Cassandra

The configuration file Cassandra reads at startup

$ sudo vi/etc/cassandra/cassandra.yaml


Change Authenticator:allowallauthenticator

To Authenticator:passwordauthenticator


Bring up Cassandra if system boots up

$ sudo update-rc.d Cassandra Enable

Use $ Cassandra command to enable the Cassandra Service


Then login with following command and you'll be able to add new user and create schema:

Cqlsh-u cassandra-p Cassandra

Create Kespace and user

    1. Create Keyspace rainbowdba with replication = {' class ': ' Simplestrategy ', ' Replication_factor ': 1};

    2. CREATE USER oc_app_rainbowdba with PASSWORD ' 0b6e8c45df68f6f16d1c494c6ba443c0 ';

ALTER USER oc_app_rainbowdba with PASSWORD ' a3c224d4b89192d2ea3ea943dd7e9648 '; (May change USER to ROLE)

3) Create the schema accordingly

Ubuntu installation Cassandra

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.