Installing Apache Cassandra on Ubuntu
Save big data without loss of performance in database
Apache Cassandra is one of the best-known column-oriented NoSQL databases. Facebook, whose development team Cassandra was originally developed, just as Twitter have both Cassandra already used productively. With Cassandra it is possible to save Big Data in a database and still do not have to do without performance. The Apache Software Foundation has been working on the development since 2009 and since 2011 Apache Cassandra can also be controlled via CQL (Cassandra Query Language), a query language with SQL-like syntax.
How Apache Cassandra can be installed on an Ubuntu 16.04 LTS Server is shown in this article.
Preparing the Server
First the server should be updated with the following command:
apt -y update && apt -y upgrade && apt -d dist-upgrade
Since Apache Cassandra builds on Java, Java must be installed before installing Cassandra. Any current Java version can be used here, in this example OpenJDK. With the following command, OpenJDK can be installed in the headless variant:
apt -y install openjdk-9-jre-headless
Whether the installation was successful can be checked with the following command:
If Java is installed, the actual installation of Cassandra can start.
Since Cassandra is not yet found in the standard repository of Ubuntu, the Apache managed repository has yet to be added. This can be done with the following command:
echo "deb http://www.apache.org/dist/cassandra/debian 39x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list
Then the public key, which is installed with the following command, is required:
curl -k https://www.apache.org/dist/cassandra/KEYS | sudo apt-key add - sudo apt-key adv --keyserver pool.sks-keyservers.net --recv-key A278B781FE4B2BDA
You can then download the current package list from all stored repositories with the following command:
sudo apt-get update
Now Apache Cassandra can be installed with the following command:
sudo apt-get install cassandra
Starting Cassandra with Systemctl
In order to start Cassandra now automatically after a reboot, it is sufficient if the two following commands are used:
systemctl enable cassandra systemctl start cassandra
Confirming the Installation
To verify that the installation was successful, the following command can help:
service cassandra status
The answer should be a result like this:
Congratulation. Cassandra is now installed on the server and ready for use.
To start, stop, or display the status of Cassandra, use the following commands:
service cassandra start service cassandra stop service cassandra status
Cassandra was installed on the server in only a few steps. Now it is possible to use Cassandra for BigData projects.Zurück zur Tutorial Übersicht Back to Tutorial Overview
Save big data without loss of performance in database Apache Cassandra is one of the best-known column-oriented NoSQL databases. Facebook, whose development team Cassandra was originally developed, just as Twitter have both Cassandra already used productively. With Cassandra it is possible to save Big Data in a database and still do not have to do […]
Vielen Dank für dein Feedback!
Wir melden uns bei dir, sobald der Artikel zu deinem Wunschthema fertig ist.