ScyllaDB 安装配置
1.说明:
scylladb支持centos7.2 64位 及以上版本
相关信息:http://docs.scylladb.com/getting-started/centos_rpm/#
2.安装
sudo yum remove -y abrt
sudo yum install epel-release wget
sudo wget -O /etc/yum.repos.d/scylla.repo http://downloads.scylladb.com/rpm/centos/scylla-1.6.repo
sudo yum install scylla
sudo scylla_setup
Do you want to run kernel version check?
[YES/no]yes
Do you verify ScyllaDB packages installed?
[YES/no]yes
Do you want to enable ScyllaDB services?
[YES/no]no //这一步配置服务是否开机启动
Do you want to disable SELinux?
[YES/no]yes
Do you want to setup bootloader options?
[YES/no]yes
Do you want to setup NTP?
[YES/no]no
Do 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
> done
Do you want to setup coredump?
[YES/no]yes
Do 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]yes
ScyllaDB 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;
####################################################成都创新互联从2013年开始,先为平江等服务建站,平江等地企业,进行企业商务咨询服务。为平江企业网站制作PC+手机+微官网三网同步一站式服务解决您的所有建站问题。另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
当前文章:centos7.3下ScyllaDB1.6安装-创新互联
文章分享:http://cdxtjz.cn/article/cdipjs.html