W.A 저장소

Cassandra 설치하기(on Mac) 본문

DB

Cassandra 설치하기(on Mac)

W.A 2011. 8. 16. 23:48



 카산드라를 하기위해 우선 해야할 것. 바로 설치겠죠? Mac에서 Cassandra를 설치하는 것은 리눅스에서 설치하는 것과 동일하게 하면됩니다. 그럼 한 단계씩 살펴 보겠습니다. 

1. 다음 링크에서 Cassandra 최신 버전을 다운 받습니다.(http://cassandra.apache.org/)

2. 받은  파일은 원하는 폴더에 압축을 해제 합니다(저와같은 경우는 /usr/local/cassandra). 그리고 나서 안에 있는 conf/cassandra.yaml에 있는 cluster_name를 원하는 이름으로 바꾸어준다.

3. 그리고 마지막으로 PATH를 걸어준다.(/usr/local/cassandra/bin)

접속은 우선 cassandra를 실행한다. 기본적으로 cassandra는 백그라운드에서 돌게되어있다.

접속할때는 cassandra-cli -host localhost로 접속하면된다.

간단하죠? 하지만 나와같은 경우는 python과의 연동을 필요로 하기 때문에 몇가지를 더 설치해야한다.

바로 Thrift, python_cassandra를 설치해야합니다. 설치는 setuptools가 깔려있다면 다음과 같이 쉽게 설치가 가능하다.
$easy_install Thrift(Thrift는 Cassandra는 조작하기 위한 API입니다. )
$easy_install python-cassandra

모든 설치가 끝나면 다음에서 확인을 해보자.
사용법은..(http://wiki.apache.org/cassandra/ThriftExamples)