执行命令:
wget https://www-eu.apache.org/dist/cassandra/3.11.4/apache-cassandra-3.11.4-bin.tar.gz
tar -zxvf apache-cassandra-3.11.4-bin.tar.gz
mv apache-cassandra-3.11.4 /usr/local/cassandra
修改下面加粗的配置
[root@localhost conf]# vim /usr/local/cassandra/conf/cassandra.yaml
cluster_name: test
data_file_directories:
- /home/xinyiasr/zimujingling/cassandra/cassandra/data
commitlog_directory:
- /home/xinyiasr/zimujingling/cassandra/cassandra/commitlog
seed_provider:
# Addresses of hosts that are deemed contact points.
# Cassandra nodes use this list of hosts to find each other and learn
# the topology of the ring. You must change this if you are running
# multiple nodes!
#- class_name: org.apache.cassandra.locator.SimpleSeedProvider
- class_name: org.apache.cassandra.locator.SimpleSeedProvider
parameters:
# seeds is actually a comma-delimited list of addresses.
# Ex: ",,"
- seeds: "192.168.0.225,127.0.0.1"
listen_address: 192.168.0.225
start_rpc: true
rpc_address: 0.0.0.0
broadcast_rpc_address: 192.168.0.255
[root@localhost bin]# ./cqlsh
Connected to avic at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 3.11.4 | CQL spec 3.4.4 | Native protocol v4]
Use HELP for help.
cqlsh> exit
[root@localhost bin]# ./cqlsh 127.0.0.1
Connected to avic at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 3.11.4 | CQL spec 3.4.4 | Native protocol v4]
Use HELP for help.
cqlsh> exit
[root@localhost bin]# ./cqlsh 192.168.0.225
Connected to avic at 192.168.0.225:9042.
[cqlsh 5.0.1 | Cassandra 3.11.4 | CQL spec 3.4.4 | Native protocol v4]
Use HELP for help.
cqlsh> exit
[root@localhost bin]#