千家信息网

centos7.3下ScyllaDB1.6安装

发表于:2025-01-28 作者:千家信息网编辑
千家信息网最后更新 2025年01月28日,ScyllaDB 安装配置1.说明:scylladb支持centos7.2 64位 及以上版本相关信息:http://docs.scylladb.com/getting-started/centos_
千家信息网最后更新 2025年01月28日centos7.3下ScyllaDB1.6安装
ScyllaDB 安装配置1.说明:scylladb支持centos7.2 64位 及以上版本相关信息:http://docs.scylladb.com/getting-started/centos_rpm/#2.安装sudo yum remove -y abrtsudo yum install epel-release wgetsudo wget -O /etc/yum.repos.d/scylla.repo http://downloads.scylladb.com/rpm/centos/scylla-1.6.reposudo yum install scyllasudo scylla_setupDo you want to run kernel version check?[YES/no]yesDo you verify ScyllaDB packages installed?[YES/no]yesDo you want to enable ScyllaDB services?[YES/no]no //这一步配置服务是否开机启动Do you want to disable SELinux?[YES/no]yesDo you want to setup bootloader options?[YES/no]yesDo you want to setup NTP?[YES/no]noDo you want to setup RAID and XFS?[YES/no]yes //是否配置单独的XFS分区作为RAID #测试时可以选no> /dev/sdb1 /dev/sda1 /dev/sdb type 'done' to finish selection. selected: /dev/sdb> doneDo you want to setup coredump?[YES/no]yesDo you want to setup sysconfig?[YES/no]yes> eth2 //这个网口将被DPDK接管。Do you want to optimize NIC queue settings?Do you want to setup IO configuration?[YES/no]yes Do you want to install node exporter, that exports prometheus data from the node?[YES/no]yesScyllaDB setup finished.启动服务:sudo systemctl start scylla-server.service查看:nodetool status进入数据库环境:cqlsh###################################################操作:keyspace有两种策略:create KEYSPACE rootdata2 WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 2};      #复制策略:SimpleStrategy,冗余2份数据:CREATE KEYSPACE rootdata2 WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', 'dc1' :3 };         #复制策略:NetworkTopologyStrategy,冗余3份数据(配置可用)查看key:describe rootdata2;使用rootdata2创建表:use rootdata2;create table blog(id timeuuid , title text, content text, tags list, category text, primary key(id));INSERT INTO  blog (id, title , tags ) VALUES ( now(), 'cassandra table test', ['cassandra','table']);INSERT INTO  blog (id, title , tags ) VALUES ( now(), 'cassandra table test', ['cassandra','table']) USING TTL 222;删除单个keyspace:drop keyspace rootdata;####################################################


0