Skip to content

Instantly share code, notes, and snippets.

@slitayem
Last active February 14, 2017 15:16
Show Gist options
  • Select an option

  • Save slitayem/ff6d7be9f0bad5129b38232cdb2347ff to your computer and use it in GitHub Desktop.

Select an option

Save slitayem/ff6d7be9f0bad5129b38232cdb2347ff to your computer and use it in GitHub Desktop.
Install Cassandra 3.9 on Mac OS X Sierra

Note: This was tested on macOS Sierra Pre-installed

Install cql & cassandra-driver

pip install cql
ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install cassandra-driver

Install Cassandra with Homebrew

brew install cassandra

Then, you can add some useful aliases to the ~/.profile to start/stop the cassandra Add the following to your ~/.profile file

alias start_cassandra='launchctl load  /usr/local/Cellar/cassandra/3.9/homebrew.mxcl.cassandra.plist'
alias stop_cassandra='launchctl stop  /usr/local/Cellar/cassandra/3.9/homebrew.mxcl.cassandra.plist'

Then, source your .profile file with

source ~/.profile

Files locations

  • Properties: /usr/local/etc/cassandra
  • Logs: /usr/local/var/log/cassandra
  • Data: /usr/local/var/lib/cassandra/data

Cqlsh

In order to run the python-based command line client for executing Cassandra Query Language (CQL) commands do cqlsh

$ cqlsh
Connected to Test Cluster at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 3.9 | CQL spec 3.4.2 | Native protocol v4]
Use HELP for help.
cqlsh>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment