Cassadra-0.7.0授权与认证(windows 7)

1.修改配置文件cassandra.yaml,

authenticator: org.apache.cassandra.auth.SimpleAuthenticator

2.在cassandra.bat中加入红色字体表示的部分(注意符号^)

set JAVA_OPTS=^
 -ea^
 -Xms1G^
 -Xmx1G^
 -XX:+HeapDumpOnOutOfMemoryError^
 -XX:+UseParNewGC^
 -XX:+UseConcMarkSweepGC^
 -XX:+CMSParallelRemarkEnabled^
 -XX:SurvivorRatio=8^
 -XX:MaxTenuringThreshold=1^
 -XX:CMSInitiatingOccupancyFraction=75^
 -XX:+UseCMSInitiatingOccupancyOnly^
 -Dcom.sun.management.jmxremote.port=8080^
 -Dcom.sun.management.jmxremote.ssl=false^
 -Dcom.sun.management.jmxremote.authenticate=false^
 -Dlog4j.configuration=log4j-server.properties^
 -Daccess.properties=%CASSANDRA_HOME%\conf\access.properties^
 -Dpasswd.properties=%CASSANDRA_HOME%\conf\passwd.propertiesies

 

3.在access.properties中设置用户权限,如

<modify-keyspaces>=jsmith

Keyspace1.<ro>=jsmith,Elvis Presley
Keyspace1.<rw>=dilbert

 

4.在passwd.properties中设置用户密码,如

jsmith=havebadpass
Elvis\ Presley=graceland4evar
dilbert=nomoovertime

 

5.双击cassandra.bat或者cmd执行cassandra即可启动

 

ps:网上有文章说通过如下命令启动:bin\cassandra -f -Dpasswd.properties=conf/passwd.properties

-Daccess.properties=conf/access.properties,本人在windows下一直启动失败,linux下未曾测试

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值