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
Create Keyspace rainbowdba with replication = {' class ': ' Simplestrategy ', ' Replication_factor ': 1};
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