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

最低0.47元/天 解锁文章
238

被折叠的 条评论
为什么被折叠?



