tar zxvf apache-cassandra-0.6.2-bin.tar.gz
mv ./apache-cassandra-0.6.2/ /opt/cassandra/
mkdir -p /var/log/cassandra/;
mkdir -p /var/lib/cassandra/;
cd /opt/cassandra/conf/;
vi /etc/hosts; cas1 cas2 cas3
vi storage-conf.xml;
pgrep -u `whoami` -f cassandra | xargs kill -9
./nodetool -host -port 8080 info
./nodetool -host -port 8080 info
./nodetool -host -port 8080 info
/opt/cassandra/bin/nodeprobe -host -port 8080 ring
WARNING: ./nodeprobe is obsolete, use ./nodetool instead
Address       Status     Load          Range                                      Ring
                                       158255313114555862951163726015274498791   Up         1.1 KB        76956859483693548579208375882609057366     |<--|   Up         1.1 KB        126662997939550187436807835701584364141    |   |   Up         760 bytes     158255313114555862951163726015274498791    |-->|
./cassandra-cli -host -port 9160
cassandra> set Keyspace1.Standard1['user']['name']='YeMaosheng'
cassandra> quit
./cassandra-cli -host -port 9160
cassandra> get Keyspace1.Standard1['user']
=> (column=6e616d65, value=YeMaosheng, timestamp=1276750744566000)
Returned 1 results.
vi /opt/cassandra/bin/cassandra
  -Xmx1G  #默认为1G,改成你实际所需要的大小运行即可

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.