cassandra安裝


1. 下載

     http://cassandra.apache.org/,大約15M左右。下載完直接解壓即可。
百度雲盤鏈接: http://pan.baidu.com/s/1c0c1SiO

2. 修改conf/cassandra.yaml

替換其中的var/lib/cassandra/ 為安裝目錄

 

3. 修改conf/logback.xml

替換其中的${cassandra.logdir} 為安裝目錄

 

4. 配置環境變量

添加環境變量CASSANDRA_HOME,值為安裝目錄,然后添加path環境變量為%CASSANDRA_HOME%\bin

 

5. 啟動

進入命令行工具,輸入cassandra然后回車,顯示如下說明啟動成功。

INFO  02:49:53 Enqueuing flush of local: 49395 (0%) on-heap, 0 (0%) off-heap
INFO  02:49:53 Writing Memtable-local@26225981(8561 serialized bytes, 259 ops, 0%/0% of on/off-heap limit)
INFO  02:49:53 Completed flushing D:\Program Files\apache-cassandra-2.1.2\data\data\system\local-7ad54392bcdd35a684174e047860b377\syste
sition(segmentId=1419389392265, position=98921)
INFO  02:49:53 Node localhost/127.0.0.1 state jump to normal
INFO  02:49:53 Compacted 4 sstables to [D:\Program Files\apache-cassandra-2.1.2\data\data\system\local-7ad54392bcdd35a684174e047860b377
n 218ms = 0.024979MB/s.  4 total partitions merged to 1.  Partition merge counts were {4:1, }
INFO  02:49:53 Netty using Java NIO event loop
INFO  02:49:53 Using Netty Version: [netty-buffer=netty-buffer-4.0.23.Final.208198c, netty-codec=netty-codec-4.0.23.Final.208198c, nett
ocks=netty-codec-socks-4.0.23.Final.208198c, netty-common=netty-common-4.0.23.Final.208198c, netty-handler=netty-handler-4.0.23.Final.2
ty-transport-rxtx=netty-transport-rxtx-4.0.23.Final.208198c, netty-transport-sctp=netty-transport-sctp-4.0.23.Final.208198c, netty-tran
INFO  02:49:53 Starting listening for CQL clients on localhost/127.0.0.1:9042...
INFO  02:49:53 Binding thrift service to localhost/127.0.0.1:9160
INFO  02:49:53 Listening for thrift clients...

 

6. 啟動客戶端工具

重新啟動一個命令行,輸入cassandra-cli,然后回車,顯示如下:

Microsoft Windows [版本 6.1.7601]
版權所有 (c) 2009 Microsoft Corporation。保留所有權利。

C:\Users\Administrator>cassandra-cli
Starting Cassandra Client
Connected to: "Test Cluster" on 127.0.0.1/9160
Welcome to Cassandra CLI version 2.1.2

The CLI is deprecated and will be removed in Cassandra 3.0.  Consider migrating to cqlsh.
CQL is fully backwards compatible with Thrift data; see http://www.datastax.com/dev/blog/thrift-to-cql3

Type 'help;' or '?' for help.
Type 'quit;' or 'exit;' to quit.

[default@unknown]

 


啟動過程中遇到的錯誤

1:
Windows PowerShell 內部錯誤。加載托管的 Windows PowerShell 失敗,返回錯誤 80070002。
WARNING! Powershell script execution unavailable.
   Please use 'powershell Set-ExecutionPolicy Unrestricted'
   on this user-account to run cassandra with fully featured
   functionality on this platform.
Starting with legacy startup options
Starting Cassandra Server
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap

解決辦法:
安裝補丁Windows Management Framework 4.0 (KB2819745)可解決.
地址:http://www.microsoft.com/en-us/download/details.aspx?id=40855


2:
Could not reserve enough space for 2097152KB object heap

解決辦法:
修改 cassandra.bat 中的JVM參數
set JAVA_OPTS=-ea^
 -javaagent:"%CASSANDRA_HOME%\lib\jamm-0.2.8.jar"^
 -Xms512m^
 -Xmx512m^

 7. 圖形化界面工具

razorsql免安裝下載鏈接:http://pan.baidu.com/s/1o6xMjOY

注冊碼:

FWPHZ6EVUZ9E4X2UBHD43KB
FUDPF48C8P3K4WVDBLJ96RA
FRSTAKDMAP438T6NBDJ78BB
F7WLXBF7V33Y7Y2TRKJ67BR
F9PKAV4FPYHKKZJMKMB32RK

jdbc連接驅動:http://pan.baidu.com/s/1kTCf1oN


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM