Installing Cassandra on Mac OS X
Homebrew is a great little package manager for OS X. If you haven't already, installing it is pretty easy:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
Mac OS X has a copy of Python preinstalled, but this makes sure you get the newest version.
brew install python
To use cqlsh, the Cassandra query language shell, you need to install cql:
pip install cql
This installs Apache Cassandra:
brew install cassandra
Use this command to start Cassandra:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.cassandra.plist
Use this command to stop Cassandra:
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.cassandra.plist
On Mavericks, Homebrew failed to move the plist file into LaunchAgents, which gives this error message:
launchctl: Couldn't stat("/Users/<user>/Library/LaunchAgents/homebrew.mxcl.cassandra.plist"): No such file or directory
To fix this just issue the following command. Then, try using the
launchctl load command again:
cp /usr/local/Cellar/cassandra/<version number>/homebrew.mxcl.cassandra.plist ~/Library/LaunchAgents/
Cassandra file locations
- [Apache Cassandra] (http://cassandra.apache.org/)
- [Datastax Cassandra Documentation] (http://www.datastax.com/documentation/cassandra/2.0/cassandra/gettingStartedCassandraIntro.html)
Have fun with Cassandra!