April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

Categories

April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

Install Cassandra 3.9 on CentOS 6.8

Install Cassandra 3.9 on CentOS 6.8

Install Java 8

$  yum install java-1.8.0-openjdk

Add DataStax Repo for Apache Cassandra

$  vi /etc/yum.repos.d/datastax.repo

Add the following lines to the new file:

[datastax-ddc]
name = DataStax Repo for Apache Cassandra
baseurl = http://rpm.datastax.com/datastax-ddc/3.9
enabled = 1
gpgcheck = 0

Save the file above and run:

$  yum install datastax-ddc
$  service cassandra start
$  nodetool status

Add Python 2.7

$ cd /usr/src
$  wget http://python.org/ftp/python/2.7.6/Python-2.7.6.tgz
$  tar -xvzf Python-2.7.6.tgz
$ cd Python-2.7.6
$  ./configure –prefix=/usr/local
$  make
$  make install

Fix python libs:

$ cd /usr/lib/python2.7/
$ mv * /usr/local/lib/python2.7/site-packages/
$ rm -R site-packages
$ ln -s /usr/local/lib/python2.7/site-packages ./

There should now be a symlink in /usr/lib/python2.7 that points site-packages to /usr/local/lib/python2.7/site-packages.

site-packages -> /usr/local/lib/python2.7/site-packages

In the /usr/local/lib/python2.7/site-packages you should see a cqlshlib folder.
Run cqlsh

# cqlsh
# cqlsh> DESCRIBE keyspaces;

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>