Apache的卡桑德拉远程访问 [英] Apache Cassandra remote access
问题描述
我有远程Ubuntu服务器上安装的Apache Cassandra的。如何允许一个Apache Cassandra的数据库远程访问?而如何进行连接?
I have installed Apache Cassandra on the remote Ubuntu server. How to allow remote access for an Apache Cassandra database? And how to make a connection?
推荐答案
要卡桑德拉远程访问是经由其节俭端口(尽管注意到JMX的端口可以被用于执行一些有限的操作)。
Remote access to Cassandra is via its thrift port (although note that the JMX port can be used to perform some limited operations).
节俭端口在 cassandra.yaml
的 rpc_port
参数,定义默认为9160.您卡桑德拉节点应绑定到服务器的网卡的IP地址 - 它不应该是 127.0.0.1
或本地主机
这就是该接口的IP,绑定这将prevent直接远程访问。您可以配置在cassandra.yaml的 rpc_address
参数绑定地址。将其设置为 0.0.0.0
这可能会或可能不适合你说所有网络接口听。
The thrift port is defined in cassandra.yaml
by the rpc_port
parameter, which defaults to 9160. Your cassandra node should be bound to the IP address of your server's network card - it shouldn't be 127.0.0.1
or localhost
which is the loopback interface's IP, binding to this will prevent direct remote access. You configure the bound address with the rpc_address
parameter in cassandra.yaml. Setting this to 0.0.0.0
says "listen on all network interfaces" which may or may not be suitable for you.
为了让你可以使用一个连接:
To make a connection you can use:
- 卡桑德拉-CLI在卡桑德拉分布的bin目录下提供了简单的get / set /列表操作,并依赖于Java的
- 的cqlsh外壳,提供定制列表访问卡桑德拉,这依赖于Python的
- 一个更高层次的接口,如阿波罗
- The cassandra-cli in the cassandra distribution's bin directory provides simple get / set / list operations and depends on Java
- The cqlsh shell which provides CQL access to cassandra, this depends on Python
- A higher level interface such as Apollo
这篇关于Apache的卡桑德拉远程访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!