Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Start Cassandra on Mac

I was working with Apache Cassandra on Windows and for starting it I was using a cassandra.bat file.

Now, I have to configure it on a MacBook (M1 chip, Big Sur OS). Is there an equivalent file/command?

like image 842
San Lorenzo de Almagro Avatar asked May 12 '26 13:05

San Lorenzo de Almagro


2 Answers

Another way to do this (which will nicely abstract away your hardware/chipset) would be to use Docker. In fact, once you have Docker installed you can get and run the community Docker image in two quick commands:

docker pull cassandra:4.0
docker run --name my-cassandra -d -p 9042:9042 cassandra:4.0

Note: if you need to run on Cassandra 3, you can simply change the 4.0 tags in the above commands to 3.11.

Once it's up and running, you can verify it by invoking nodetool status inside the container:

docker exec -it my-cassandra nodetool status

FWIW, the same steps/commands will work on Windows, too.

like image 116
Aaron Avatar answered May 15 '26 11:05

Aaron


I'm going to assume that you're using the binary tarball for your installation.

Starting Cassandra on a Mac is the same as it is on Linux. Use the following script:

$ cd path/to/tarball_installation
$ bin/cassandra

The logs/ and the data/ directories should all be located in the same location. Cheers!

like image 31
Erick Ramirez Avatar answered May 15 '26 10:05

Erick Ramirez



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!