Cassandra安装与基础操作

1. Cassandra 安装:

官网

1.1. CentOS安装

Installation from RPM packages
For the `` specify the major version number, without dot, and with an appended x.

The latest is 40x.

For older releases, the can be one of 311x, 30x, or 22x.

(Not all versions of Apache Cassandra are available, since building RPMs is a recent addition to the project.)

Add the Apache repository of Cassandra to /etc/yum.repos.d/cassandra.repo, for example for the latest 4.0 version:

[cassandra]
name=Apache Cassandra
baseurl=https://downloads.apache.org/cassandra/redhat/40x/
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://downloads.apache.org/cassandra/KEYS

Install Cassandra, accepting the gpg key import prompts:

sudo yum install cassandra

Start Cassandra (will not start automatically):

service cassandra start

Systemd based distributions may require to run systemctl daemon-reload once to make Cassandra available as a systemd service. This should happen automatically by running the command above.

Make Cassandra start automatically after reboot:

 chkconfig cassandra on

Please note that official RPMs for Apache Cassandra only have been available recently and are not tested thoroughly on all platforms yet. We appreciate your feedback and support and ask you to post details on any issues in the corresponding Jira ticket.

1.2. Windows安装

参考
存在问题:
cqlsh.bat 执行需要python2.7 的环境, 如果本身使用conda, 建议手动安装一个python2.7。

2. Cassandra的命令

参考

2.1 键
CREATE KEYSPACE tutorialspoint WITH replication = {
   
   'class':'SimpleStrategy', 'replication_factor' : 3};

DESCRIBE keyspaces;
SELECT * FROM system_sche
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

来日可期1314

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值