ScyllaDB 安裝配置
1.說(shuō)明:
scylladb支持centos7.2 64位 及以上版本
相關(guān)信息: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 //這一步配置服務(wù)是否開機(jī)啟動(dòng)
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 //是否配置單獨(dú)的XFS分區(qū)作為RAID #測(cè)試時(shí)可以選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 //這個(gè)網(wǎng)口將被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.
啟動(dòng)服務(wù):sudo systemctl start scylla-server.service
查看:nodetool status
進(jìn)入數(shù)據(jù)庫(kù)環(huán)境:cqlsh
###################################################
操作:
keyspace有兩種策略:
create KEYSPACE rootdata2 WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 2}; #復(fù)制策略:SimpleStrategy,冗余2份數(shù)據(jù):
CREATE KEYSPACE rootdata2 WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', 'dc1' :3 }; #復(fù)制策略:NetworkTopologyStrategy,冗余3份數(shù)據(jù)(配置可用)
查看key:
describe rootdata2;
使用rootdata2創(chuàng)建表:
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;
刪除單個(gè)keyspace:
drop keyspace rootdata;
####################################################成都創(chuàng)新互聯(lián)從2013年開始,先為平江等服務(wù)建站,平江等地企業(yè),進(jìn)行企業(yè)商務(wù)咨詢服務(wù)。為平江企業(yè)網(wǎng)站制作PC+手機(jī)+微官網(wǎng)三網(wǎng)同步一站式服務(wù)解決您的所有建站問(wèn)題。另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無(wú)理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場(chǎng)景需求。
文章名稱:centos7.3下ScyllaDB1.6安裝-創(chuàng)新互聯(lián)
轉(zhuǎn)載注明:http://weahome.cn/article/cdipjs.html