赞
踩
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")})
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。