• Install Cassandra Locally


    Uninstall Cassandra

    $ sudo su

    remove cassandra

    $ apt-get remove cassandra

     

    cleaned the cassandra folders

    $ rm -rf /var/lib/cassandra

    $ rm -rf /var/log/cassandra

    $ rm -rf /etc/cassandra

    Install Cassandra

    Add the DataStax Community repository to the /etc/apt/sources.list.d/cassandra.sources.list

    $ echo "deb http://debian.datastax.com/community stable main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list


    Add the DataStax repository key to your aptitude trusted keys.

    $ curl -L https://debian.datastax.com/debian/repo_key | sudo apt-key add -


    If the above doesn’t work try:

    curl -L http://debian.datastax.com/debian/repo_key | sudo apt-key add -


    And then

    sudo apt-get update and then sudo apt-get install dsc20


    Install the packages

    $ sudo apt-get update

    $ sudo apt-get install cassandra

    Configure and run Cassandra

    This is the configuration file cassandra reads at startup

    $ sudo vi /etc/cassandra/cassandra.yaml


    Change authenticator: AllowAllAuthenticator

    to authenticator: PasswordAuthenticator


    Bring up cassandra when system boots up

    $ sudo update-rc.d cassandra enable

    use $ cassandra command to enable the cassandra service


    then login with following command and you will be able to add new user and create schema:

    cqlsh -u cassandra -p cassandra

    then

    1. create keyspace _your_key_space with replication = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };

    2. CREATE USER your_user WITH PASSWORD 'your_password';

    To update the existing password: ALTER USER your_user WITH PASSWORD 'new_password'; (may change USER to ROLE)

    3) Create the schema accordingly

  • 相关阅读:
    针式电子书下载列表(暂时)
    硬盘坏道造成SQL 2000的异常
    一种“您无权查看该网页”的原因和解决方法
    学习英语的一些方法
    “针式背单词”帮助文件
    ClickOnce的Excel模板文件发布
    IC 设计书籍和相关资料
    Useful links on GPU Programming &Examp; Architecture
    点评美国名校的(EE)和(CS)
    微电子/物理学名人 约翰·巴丁 John Bardeen
  • 原文地址:https://www.cnblogs.com/codingforum/p/7512166.html
Copyright © 2020-2023  润新知