Cassandra(一)之linux中的下载和安装

Cassandra(一)之linux中的下载和安装

1、新建cassandra.repo文件

touch /etc/yum.repos.d/cassandra.repo

2、配置cassandra.repo

vi /etc/yum.repos.d/cassandra.repo
[cassandra]
name=Apache Cassandra
baseurl=https://www.apache.org/dist/cassandra/redhat/311x/
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://www.apache.org/dist/cassandra/KEYS

3、安装

sudo yum install cassandra

4、启动Cassandra

service cassandra start

5、设置随机启动Cassandra服务

chkconfig cassandra on # make Cassandra start automatically after reboot

6、进入Cassandra交互界面

cqlsh
[root@sandbox-hdp ~]# cqlsh
Connected to Test Cluster at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 3.11.6 | CQL spec 3.4.4 | Native protocol v4]
Use HELP for help.
cqlsh> 

坑点:

1、系统中需安装Python2.7,下载、安装并启动Cassandra才会正常,否则可能会遇到问题。

如安装不了、登录失败等等

# 登录失败
[root@sandbox-hdp ~]# cqlsh
Connection error: ('Unable to connect to any servers', {'127.0.0.1': error(111, "Tried connecting to [('127.0.0.1', 9042)]. Last error: Connection refused")})
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值