日期:2014-05-16  浏览次数:20471 次

Cassandra Database(6)Multinode Cluster

Cassandra Database(6)Multinode Cluster

On MAC system, we can do like this.

>sudo ifconfig lo0 alias 127.0.0.2 up
>sudo ifconfig lo0 alias 127.0.0.3 up

Then we have the IP 127.0.0.1, 127.0.0.2, 127.0.0.3

If I change the configuration file cassandra.yaml and want to start 3 nodes on my local machine. I got errors.
Error Message:
Port already in use: 7199

Solution:
Right now, I do not know the solution. Just go on and try CCM

>git clone?https://github.com/pcmanus/ccm.git

That is cool, my local machine python version is 2.7.5.?
sparkworker1:ccm carl$ python --version Python 2.7.5

>sudo easy_install pyYaml
>sudo ./setup.py install

>ccm help

>sudo ln -s /Users/carl/tool/ccm /opt/ccm

Create the Instance and Nodes
Tell ccm which version are we plan to use
>ccm create Test -v 2.0.4

Create a cluster named Test with version 2.0.4

Then create 3 nodes
>ccm populate -n 3

Start all the nodes
>ccm start

Then