Introduction: Cassandra is a highly scalable and distributed NoSQL database management system designed to handle large amounts of data across many commodity servers, providing high availability with no single point of failure. If you’re running Cassandra on Ubuntu, it’s essential to know how to start and stop the Cassandra service effectively. In this guide, we’ll walk you through the process step by step.
Prerequisites:
- Ensure you have Apache Cassandra installed on your Ubuntu system.
Starting Cassandra:
- Using systemd service:
- Open a terminal window.
- Run the following command:
sudo systemctl start cassandra
- Using the Cassandra binary (manual):
- Navigate to the Cassandra installation directory:
cd /var/lib/cassandra/bin
- Run the Cassandra node using the following command:
cassandra -f
- Navigate to the Cassandra installation directory:
Stopping Cassandra:
- Using systemd service:
- Open a terminal window.
- Run the following command:
sudo systemctl stop cassandr
a
- Using the Cassandra binary (manual):
- Interrupt the running Cassandra process using Ctrl+C in the terminal window where Cassandra is running.
Additional Information:
- You can check the status of the Cassandra service using the following command:
sudo systemctl status cassandra
- For more detailed information on managing Cassandra services, refer to the official Cassandra documentation: https://cassandra.apache.org/doc/stable/cassandra/getting_started/installing.html
Remember, it’s recommended to use the systemd service for managing Cassandra as it simplifies service control and integrates with the system’s overall service management.