Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save javierluraschi/0ce6adf53972e9b8370c3395368f5483 to your computer and use it in GitHub Desktop.
Save javierluraschi/0ce6adf53972e9b8370c3395368f5483 to your computer and use it in GitHub Desktop.
Installing and Initializing Cassandra in OS X
Install Cassandra:
```
curl -OL http://downloads.datastax.com/community/dsc.tar.gz
tar -xzf dsc.tar.gz
cd dsc-cassandra-3.0.9/bin
./cassandra
```
Create some tables:
```
cd dsc-cassandra-3.0.9/bin
./cqlsh
CREATE KEYSPACE dev WITH REPLICATION = {
'class':'SimpleStrategy','replication_factor':1};
USE dev;
CREATE TABLE emp (empid int primary key, emp_name varchar);
INSERT INTO emp (empid, emp_name) VALUES (1, 'Fred Smith');
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment