centos7.3下ScyllaDB1.6安装
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | <br>转自:<br>http: //10710016 .blog.51cto.com /10700016/1900483 <br><br>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 > eth1 // 这个网口将被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<text>, 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; #################################################### |
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步