scylladb 4.1 分布式安装部署
命令行执行如下操作:
curl -o /etc/yum.repos.d/scylla.repo -L http://downloads.scylladb.com.s3.amazonaws.com/rpm/centos/scylla-4.1.repo
yum install -y gcc gcc-c++
yum install scylla -y
mkdir -p /home/scylla/work
mkdir -p /home/scylla/data
mkdir -p /home/scylla/commitlog
chown -R scylla:scylla /home/scylla/commitlog
chown -R scylla:scylla /home/scylla/work
chown -R scylla:scylla /home/scylla/data
chown -R scylla:scylla /home/scylla
修改配置文件/etc/scylla/scylla.yaml :
cluster_name: 'testcluster'
num_tokens: 256
data_file_directories:
- /home/scylla/data
commitlog_directory: /home/scylla/commitlog
commitlog_sync: periodic
commitlog_sync_period_in_ms: 10000
commitlog_segment_size_in_mb: 32
seed_provider:
- class_name: org.apache.cassandra.locator.SimpleSeedProvider
parameters:
- seeds: "192.168.100.1"
listen_address: 192.168.100.1
native_transport_port: 9042
read_request_timeout_in_ms: 5000
write_request_timeout_in_ms: 2000
cas_contention_timeout_in_ms: 1000
endpoint_snitch: SimpleSnitch
rpc_address: 192.168.100.1
rpc_port: 9160
api_port: 10000
api_address: 127.0.0.1
batch_size_warn_threshold_in_kb: 5
batch_size_fail_threshold_in_kb: 50
partitioner: org.apache.cassandra.dht.Murmur3Partitioner
commitlog_total_space_in_mb: -1
murmur3_partitioner_ignore_msb_bits: 12
api_ui_dir: /opt/scylladb/swagger-ui/dist/
api_doc_dir: /opt/scylladb/api/api-doc/
cluster_name的名称必须在网络的,否则会冲突
seed_provider是种子节点,可以配置多个,用逗号隔开
listen_address、rpc_address配置为当前服务器的ip地址
将/etc/scylla/scylla.yaml拷贝到集群的其他服务器上,修改其中的listen_address、rpc_address为当前的ip地址即可
之后在各服务器上,执行如下操作:
#--nic配置为需要使用的网卡名称
scylla_setup --no-raid-setup --nic eth0 --no-ntp-setup \
--no-coredump-setup --no-sysconfig-setup --no-io-setup \
--no-version-check --no-node-exporter \
--no-cpuscaling-setup --no-fstrim-setup
scylla_io_setup
systemctl restart scylla-server
启动完成后,执行nodetool status即可看到集群内节点的组网情况了
查看scylla的日志,可以使用如下方法:
journalctl _COMM=scylla
————————————————
版权声明:本文为CSDN博主「vah101」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/vah101/article/details/123053574
相关文章