Skip to content

Instantly share code, notes, and snippets.

@janetlee
Forked from hkhamm/installing_cassandra.md
Created December 12, 2017 03:32
Show Gist options
  • Select an option

  • Save janetlee/8adf43345c34b5ae2f417156165589d5 to your computer and use it in GitHub Desktop.

Select an option

Save janetlee/8adf43345c34b5ae2f417156165589d5 to your computer and use it in GitHub Desktop.
Installing Cassandra on Mac OS X
Installing Cassandra on Mac OS X
================================
Install Homebrew
----------------
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)"
```
Install Python
--------------
Mac OS X has a copy of Python preinstalled, but this makes sure you get the newest version.
```
brew install python
```
Install cql
-----------
To use cqlsh, the Cassandra query language shell, you need to install cql:
```
pip install cql
```
Install Cassandra
-----------------
This installs Apache Cassandra:
```
brew install cassandra
```
Starting Cassandra
------------------
At the end of the install brew will tell you about two ways to launch Cassandra. The first will launch it when the computer restarts, but this isn't recommended because you may not want to always run Cassandra. Instead use this command:
```
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.cassandra.plist
```
On Mavricks, Homebrew failed to move the plist file into LaunchAgents. Which gives this error message:
```
launchctl: Couldn't stat("/Users/MNCH/Library/LaunchAgents/homebrew.mxcl.cassandra.plist"): No such file or directory
```
To fix this just issue the following command and try using the ```launchctl load``` command again:
```
cp /usr/local/Cellar/cassandra/homebrew.mxcl.cassandra.plist ~/Library/LaunchAgents/
```
Have fun with Cassandra!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment