How to Install Apache Cassandra 3.11.x on Ubuntu 16.04 LTS
Using a Different System? Apache Cassandra is a free and open source NoSQL database management system that is designed to provide scalability, hig
Apache Cassandra is a free and open source NoSQL database management system that is designed to provide scalability, high availability, and uncompromised performance.
In this article, I will guide you through installing the latest stable release of Apache Cassandra, Apache Cassandra 3.11.2, on a Ubuntu 16.04 LTS server instance.
Apache Cassandra requires the latest release of Java 8. For that you can choose to install the latest release of OpenJDK JRE 1.8 as below:
sudo apt install openjdk-8-jre -y
Having OpenJDK JRE 1.8 installed, you can confirm the installation result:
java -version
The output will be similar to the following:
openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
Optionally, you can create the JAVA_HOME
environment variable as follows:
echo "JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::")" | sudo tee -a /etc/profile
source /etc/profile
echo $JAVA_HOME
Apache Cassandra requires Python 2.7 rather than Python 3. If you operate Apache Cassandra in a Python 3 environment, you may have trouble launching the cqlsh
shell of Apache Cassandra.
First, determine the existence and version of Python on your machine:
python -V
On Ubuntu 16.04 LTS, the output can be slightly confusing:
The program 'python' can be found in the following packages:
* python-minimal
* python3
Ask your administrator to install one of them
That actually means you need to install Python 2.7 by yourself:
sudo apt install python -y
Re-run the python -V
command, and the output will become:
Python 2.7.12
Create the Apache Cassandra 3.11.x apt repo:
echo "deb http://www.apache.org/dist/cassandra/debian 311x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list
curl https://www.apache.org/dist/cassandra/KEYS | sudo apt-key add -
sudo apt-get update
If you encounter a GPG public key error, run the following commands to add the mentioned Apache Cassandra public key, which is A278B781FE4B2BDA
in this case:
sudo apt-key adv --keyserver pool.sks-keyservers.net --recv-key A278B781FE4B2BDA
sudo apt-get update
Use the newly added apt
repo to install Apache Cassandra:
sudo apt-get install cassandra
Start the Apache Cassandra daemon:
sudo service cassandra start
If you want to make Apache Cassandra automatically start at system boot, run the following command:
sudo update-rc.d cassandra defaults
Next, use the nodetool
program to show the status of Apache Cassandra on current node:
nodetool status
The output will resemble the following:
Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns (effective) Host ID Rack
UN 127.0.0.1 102.66 KiB 256 100.0% 23916cfd-892d-4898-857c-aff9efe2354a rack1
You can use the cqlsh
shell to interact with Apache Cassandra:
cqlsh localhost
The output will be similar to the following:
Connected to Test Cluster at localhost:9042.
[cqlsh 5.0.1 | Cassandra 3.11.2 | CQL spec 3.4.4 | Native protocol v4]
Use HELP for help.
cqlsh>
For now, just type exit
and then press ENTER to quit the cqlsh shell.
If you want to stop Apache Cassandra, execute the following command:
sudo service cassandra stop
Using a Different System? Apache Cassandra is a free and open source NoSQL database management system that is designed to provide scalability, hig
Using a Different System? Apache Cassandra is a free and open source NoSQL database management system that is designed to provide scalability, hig
Umjetna inteligencija nije u budućnosti, ovdje je upravo u sadašnjosti. U ovom blogu Pročitajte kako su aplikacije umjetne inteligencije utjecale na različite sektore.
Jeste li i vi žrtva DDOS napada i zbunjeni ste metodama prevencije? Pročitajte ovaj članak kako biste riješili svoje upite.
Možda ste čuli da hakeri zarađuju mnogo novca, ali jeste li se ikada zapitali kako zarađuju toliki novac? raspravimo.
Želite li vidjeti revolucionarne izume Googlea i kako su ti izumi promijenili život svakog čovjeka danas? Zatim čitajte na blogu kako biste vidjeli Googleove izume.
Koncept samovozećih automobila koji će krenuti na ceste uz pomoć umjetne inteligencije san je koji već neko vrijeme imamo. No, unatoč nekoliko obećanja, nigdje ih nema. Pročitajte ovaj blog kako biste saznali više…
Kako se znanost razvija velikom brzinom, preuzimajući mnoge naše napore, raste i rizik da se podvrgnemo neobjašnjivoj Singularnosti. Pročitajte što bi za nas mogla značiti singularnost.
Metode pohrane podataka su se razvijale možda od rođenja podataka. Ovaj blog pokriva evoluciju pohrane podataka na temelju infografike.
Pročitajte blog kako biste na najjednostavniji način upoznali različite slojeve u arhitekturi velikih podataka i njihove funkcionalnosti.
U ovom digitalnom svijetu, pametni kućni uređaji postali su ključni dio života. Evo nekoliko nevjerojatnih prednosti pametnih kućnih uređaja o tome kako naš život čine vrijednim življenja i jednostavnijim.
Nedavno je Apple izdao macOS Catalina 10.15.4 dodatak ažuriranju kako bi riješio probleme, ali čini se da ažuriranje uzrokuje više problema koji dovode do zalijevanja mac strojeva. Pročitajte ovaj članak da biste saznali više