Skip to content

Instantly share code, notes, and snippets.

@Micka33
Last active March 17, 2022 10:55
Show Gist options
  • Select an option

  • Save Micka33/89897e1490240a56c036 to your computer and use it in GitHub Desktop.

Select an option

Save Micka33/89897e1490240a56c036 to your computer and use it in GitHub Desktop.

Revisions

  1. Micka33 revised this gist Jan 8, 2015. 1 changed file with 6 additions and 5 deletions.
    11 changes: 6 additions & 5 deletions install.md
    Original file line number Diff line number Diff line change
    @@ -64,11 +64,12 @@ Data: /usr/local/var/lib/cassandra/data
    Finally cqlsh should connect to cassandra:
    ------------------------------------------
    ```
    cqlsh
    Connected to Test Cluster at localhost:9160.
    [cqlsh 3.0.2 | Cassandra 1.2.5 | CQL spec 3.0.0 | Thrift protocol 19.36.0]
    Use HELP for help.
    cqlsh>
    $> cqlsh
    Connected to Test Cluster at 127.0.0.1:9042.
    [cqlsh 5.0.1 | Cassandra 2.1.2 | CQL spec 3.2.0 | Native protocol v3]
    Use HELP for help.
    cqlsh>
    cqlsh>
    ```

    Have fun with Cassandra!
  2. Micka33 revised this gist Jan 8, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install.md
    Original file line number Diff line number Diff line change
    @@ -52,7 +52,7 @@ launchctl: Couldn't stat("/Users/MNCH/Library/LaunchAgents/homebrew.mxcl.cassand

    To fix this just issue the following command. Then, try using the ```launchctl load``` command again:
    ```
    cp /usr/local/Cellar/cassandra/homebrew.mxcl.cassandra.plist ~/Library/LaunchAgents/
    cp /usr/local/Cellar/cassandra/2.1.2/homebrew.mxcl.cassandra.plist ~/Library/LaunchAgents/
    ```

    Cassandra file locations
  3. Micka33 revised this gist Jan 8, 2015. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions install.md
    Original file line number Diff line number Diff line change
    @@ -20,6 +20,7 @@ Install cql
    To use cqlsh, the Cassandra query language shell, you need to install cql:
    ```
    pip install cql
    pip install cassandra-driver
    ```

    Install Cassandra
  4. Micka33 revised this gist Jan 8, 2015. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions install.md
    Original file line number Diff line number Diff line change
    @@ -62,9 +62,12 @@ Data: /usr/local/var/lib/cassandra/data

    Finally cqlsh should connect to cassandra:
    ------------------------------------------
    ```
    cqlsh
    Connected to Test Cluster at localhost:9160.
    [cqlsh 3.0.2 | Cassandra 1.2.5 | CQL spec 3.0.0 | Thrift protocol 19.36.0]
    Use HELP for help.
    cqlsh>
    ```

    Have fun with Cassandra!
  5. Micka33 revised this gist Jan 8, 2015. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions install.md
    Original file line number Diff line number Diff line change
    @@ -60,4 +60,11 @@ Properties: /usr/local/etc/cassandra
    Logs: /usr/local/var/log/cassandra
    Data: /usr/local/var/lib/cassandra/data

    Finally cqlsh should connect to cassandra:
    ------------------------------------------
    cqlsh
    Connected to Test Cluster at localhost:9160.
    [cqlsh 3.0.2 | Cassandra 1.2.5 | CQL spec 3.0.0 | Thrift protocol 19.36.0]
    Use HELP for help.
    cqlsh>
    Have fun with Cassandra!
  6. Micka33 revised this gist Dec 22, 2014. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions install.md
    Original file line number Diff line number Diff line change
    @@ -56,8 +56,8 @@ cp /usr/local/Cellar/cassandra/homebrew.mxcl.cassandra.plist ~/Library/LaunchAge

    Cassandra file locations
    ------------------------
    Properties: /usr/local/etc/cassandra
    Logs: /usr/local/var/log/cassandra
    Data: /usr/local/var/lib/cassandra/data
    Properties: /usr/local/etc/cassandra
    Logs: /usr/local/var/log/cassandra
    Data: /usr/local/var/lib/cassandra/data

    Have fun with Cassandra!
  7. Micka33 renamed this gist Dec 22, 2014. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  8. Micka33 created this gist Dec 22, 2014.
    63 changes: 63 additions & 0 deletions install.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,63 @@
    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
    ```
    Or even easier:
    ```
    launchctl start homebrew.mxcl.cassandra
    ```
    and to stop:
    ```
    launchctl stop homebrew.mxcl.cassandra
    ```

    On Mavericks, 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. Then, try using the ```launchctl load``` command again:
    ```
    cp /usr/local/Cellar/cassandra/homebrew.mxcl.cassandra.plist ~/Library/LaunchAgents/
    ```
    Cassandra file locations
    ------------------------
    Properties: /usr/local/etc/cassandra
    Logs: /usr/local/var/log/cassandra
    Data: /usr/local/var/lib/cassandra/data
    Have fun with Cassandra!