一区二区三区在线-一区二区三区亚洲视频-一区二区三区亚洲-一区二区三区午夜-一区二区三区四区在线视频-一区二区三区四区在线免费观看

服務器之家:專注于服務器技術及軟件下載分享
分類導航

Linux|Centos|Ubuntu|系統進程|Fedora|注冊表|Bios|Solaris|Windows7|Windows10|Windows11|windows server|

服務器之家 - 服務器系統 - Centos - Centos 6.3安裝Cassandra數據庫經驗分享

Centos 6.3安裝Cassandra數據庫經驗分享

2019-09-30 22:45Centos教程網 Centos

為了安全起見,建議直接上Java 1.7版本的jdk,因為Cassandra是運行于JDK之上,所以JDK是必須要安裝的。不要試圖用java jdk 1.6 版本,結果會讓你搞了好長時間都不行

1> 下載Java jdk:

     我這里用的是:jdk-7u17-linux-i586.tar.gz

     PS:這個是需要登錄才能下載的,所以建議注冊后,登錄進去先下載到本地,然后再從本地計算機傳到VM上去。

2> 下載完成后,解壓jdk:

      tar -zxvf jdk-7u17-linux-i586.tar.gz

3> 解壓完成后,配置環境變量:

     vim /etc/profile

     在打開的文件的末尾,增加如下代碼:

JAVA_HOME=/usr/local/jdk1.7.0_17

PATH=$JAVA_HOME/bin:$PATH

CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

export JAVA_HOME

export PATH

export CLASSPATH

PS:只需將JAVA_HOME的路徑改一下即可,改成剛才解壓后jdk的目錄目錄即可,我的是把jdk壓縮包放在/usr/local目錄下了,然后直接

在這里解壓的,所以解壓后的包也就直接在該目錄下了【jdk1.7.0_17】,所以我這里JAVA_HOME的路徑為 "/usl/local/jdk1.7.0_17"

4> 上面的步驟執行完成后,執行下如下命令

     source /etc/profile

     或者重啟下linux ,配置才可生效

5> 執行完上面的步驟,下一步就是看一下java jdk是否安裝成功,執行下如下命令

     java -version

     我這里執行后,會輸出如下內容:

[root@localhost ~]# java -version
java version "1.7.0_17"
Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot(TM) Client VM (build 23.7-b01, mixed mode)
[root@localhost ~]#

說明jdk安裝成功,這里的版本是1.7

支持jdk的安裝到此結束,下一步是cassandra的安裝

1> 下載Cassandra:

     地址:http://www.apache.org/dyn/closer.cgi?path=/cassandra/1.2.4/apache-cassandra-1.2.4-src.tar.gz

     我這里用的版本是:apache-cassandra-1.2.4-bin.tar.gz

2> 下載完成后,直接解壓:

      tar -zxvf apache-cassandra-1.2.4-bin.tar.gz

      解壓完成后,得到如下目錄:apache-cassandra-1.2.4

      進入該目錄下的bin目錄,直接啟動Cassandra即可:

      cd apache-cassandra-1.2.4/bin

      ./cassandra -f 【啟動cassandra】

      啟動后,會輸出一大堆的代碼,如下,表明Cassandra啟動成功:

[root@localhost bin]# ./cassandra
xss =  -ea -javaagent:./../lib/jamm-0.2.5.jar -XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=42 -Xms505M -Xmx505M -Xmn100M -XX:+HeapDumpOnOutOfMemoryError -Xss180k
[root@localhost bin]#  INFO 08:42:11,803 Logging initialized
 INFO 08:42:11,925 32bit JVM detected.  It is recommended to run Cassandra on a 64bit JVM for better performance.
 INFO 08:42:11,930 JVM vendor/version: Java HotSpot(TM) Client VM/1.7.0_17
 INFO 08:42:11,932 Heap size: 519045120/520093696
 INFO 08:42:11,933 Classpath: ./../conf:./../build/classes/main:./../build/classes/thrift:./../lib/antlr-3.2.jar:./../lib/apache-cassandra-1.2.4.jar:./../lib/apache-cassandra-clientutil-1.2.4.jar:./../lib/apache-cassandra-thrift-1.2.4.jar:./../lib/avro-1.4.0-fixes.jar:./../lib/avro-1.4.0-sources-fixes.jar:./../lib/commons-cli-1.1.jar:./../lib/commons-codec-1.2.jar:./../lib/commons-lang-2.6.jar:./../lib/compress-lzf-0.8.4.jar:./../lib/concurrentlinkedhashmap-lru-1.3.jar:./../lib/guava-13.0.1.jar:./../lib/high-scale-lib-1.1.2.jar:./../lib/jackson-core-asl-1.9.2.jar:./../lib/jackson-mapper-asl-1.9.2.jar:./../lib/jamm-0.2.5.jar:./../lib/jbcrypt-0.3m.jar:./../lib/jline-1.0.jar:./../lib/json-simple-1.1.jar:./../lib/libthrift-0.7.0.jar:./../lib/log4j-1.2.16.jar:./../lib/lz4-1.1.0.jar:./../lib/metrics-core-2.0.3.jar:./../lib/netty-3.5.9.Final.jar:./../lib/servlet-api-2.5-20081211.jar:./../lib/slf4j-api-1.7.2.jar:./../lib/slf4j-log4j12-1.7.2.jar:./../lib/snakeyaml-1.6.jar:./../lib/snappy-java-1.0.4.1.jar:./../lib/snaptree-0.1.jar:./../lib/jamm-0.2.5.jar
 INFO 08:42:11,998 JNA not found. Native methods will be disabled.
 INFO 08:42:12,207 Loading settings from file:/usr/local/apache-cassandra-1.2.4/conf/cassandra.yaml
 INFO 08:42:13,791 Data files directories: [/var/lib/cassandra/data]
 INFO 08:42:13,792 Commit log directory: /var/lib/cassandra/commitlog
 INFO 08:42:13,793 DiskAccessMode 'auto' determined to be standard, indexAccessMode is standard
 INFO 08:42:13,793 disk_failure_policy is stop
 INFO 08:42:13,926 Global memtable threshold is enabled at 165MB
 INFO 08:42:15,609 Not using multi-threaded compaction
 INFO 08:42:17,270 Initializing key cache with capacity of 24 MBs.
 INFO 08:42:17,293 Scheduling key cache save to each 14400 seconds (going to save all keys).
 INFO 08:42:17,299 Initializing row cache with capacity of 0 MBs and provider org.apache.cassandra.cache.SerializingCacheProvider
 INFO 08:42:17,359 Scheduling row cache save to each 0 seconds (going to save all keys).
 INFO 08:42:18,249 Opening /var/lib/cassandra/data/system/schema_keyspaces/system-schema_keyspaces-ib-3 (265 bytes)
 INFO 08:42:18,574 Opening /var/lib/cassandra/data/system/schema_keyspaces/system-schema_keyspaces-ib-2 (220 bytes)
 INFO 08:42:18,597 Opening /var/lib/cassandra/data/system/schema_keyspaces/system-schema_keyspaces-ib-1 (223 bytes)
 INFO 08:42:18,670 Opening /var/lib/cassandra/data/system/schema_columnfamilies/system-schema_columnfamilies-ib-5 (4855 bytes)
 INFO 08:42:18,693 Opening /var/lib/cassandra/data/system/schema_columns/system-schema_columns-ib-2 (3770 bytes)
 INFO 08:42:18,700 Opening /var/lib/cassandra/data/system/schema_columns/system-schema_columns-ib-4 (208 bytes)
 INFO 08:42:18,706 Opening /var/lib/cassandra/data/system/schema_columns/system-schema_columns-ib-3 (3772 bytes)
 INFO 08:42:18,713 Opening /var/lib/cassandra/data/system/schema_columns/system-schema_columns-ib-1 (3769 bytes)
 INFO 08:42:18,741 Opening /var/lib/cassandra/data/system/local/system-local-ib-10 (110 bytes)
 INFO 08:42:18,778 Opening /var/lib/cassandra/data/system/local/system-local-ib-9 (386 bytes)
 INFO 08:42:20,907 completed pre-loading (4 keys) key cache.
 INFO 08:42:20,916 Replaying /var/lib/cassandra/commitlog/CommitLog-2-1366156865609.log, /var/lib/cassandra/commitlog/CommitLog-2-1366156865610.log
 INFO 08:42:20,954 Replaying /var/lib/cassandra/commitlog/CommitLog-2-1366156865609.log
 INFO 08:42:21,051 Finished reading /var/lib/cassandra/commitlog/CommitLog-2-1366156865609.log
 INFO 08:42:21,052 Replaying /var/lib/cassandra/commitlog/CommitLog-2-1366156865610.log
 INFO 08:42:21,075 Finished reading /var/lib/cassandra/commitlog/CommitLog-2-1366156865610.log
 INFO 08:42:21,080 Enqueuing flush of Memtable-users@23457041(28/28 serialized/live bytes, 2 ops)
 INFO 08:42:21,085 Writing Memtable-users@23457041(28/28 serialized/live bytes, 2 ops)
 INFO 08:42:21,091 Enqueuing flush of Memtable-local@16277494(52/52 serialized/live bytes, 6 ops)
 INFO 08:42:21,146 Completed flushing /var/lib/cassandra/data/system_auth/users/system_auth-users-ib-1-Data.db (64 bytes) for commitlog position ReplayPosition(segmentId=1366159340516, position=142)
 INFO 08:42:21,261 Writing Memtable-local@16277494(52/52 serialized/live bytes, 6 ops)
 INFO 08:42:21,277 Completed flushing /var/lib/cassandra/data/system/local/system-local-ib-11-Data.db (84 bytes) for commitlog position ReplayPosition(segmentId=1366159340516, position=142)
 INFO 08:42:21,279 Log replay complete, 3 replayed mutations
 INFO 08:42:21,294 Fixing timestamps of schema ColumnFamily schema_keyspaces...
 INFO 08:42:21,495 Enqueuing flush of Memtable-local@4223809(65/65 serialized/live bytes, 2 ops)
 INFO 08:42:21,497 Writing Memtable-local@4223809(65/65 serialized/live bytes, 2 ops)
 INFO 08:42:21,513 Completed flushing /var/lib/cassandra/data/system/local/system-local-ib-12-Data.db (97 bytes) for commitlog position ReplayPosition(segmentId=1366159340516, position=297)
 INFO 08:42:21,518 Enqueuing flush of Memtable-schema_keyspaces@11390025(389/389 serialized/live bytes, 9 ops)
 INFO 08:42:21,520 Writing Memtable-schema_keyspaces@11390025(389/389 serialized/live bytes, 9 ops)
 INFO 08:42:21,536 Completed flushing /var/lib/cassandra/data/system/schema_keyspaces/system-schema_keyspaces-ib-4-Data.db (236 bytes) for commitlog position ReplayPosition(segmentId=1366159340516, position=992)
 INFO 08:42:21,909 Cassandra version: 1.2.4
 INFO 08:42:21,910 Thrift API version: 19.35.0
 INFO 08:42:21,911 CQL supported versions: 2.0.0,3.0.1 (default: 3.0.1)
 INFO 08:42:22,148 Loading persisted ring state
 INFO 08:42:22,151 Starting up server gossip
 INFO 08:42:22,222 Enqueuing flush of Memtable-local@32614666(251/251 serialized/live bytes, 9 ops)
 INFO 08:42:22,223 Writing Memtable-local@32614666(251/251 serialized/live bytes, 9 ops)
 INFO 08:42:22,238 Completed flushing /var/lib/cassandra/data/system/local/system-local-ib-13-Data.db (240 bytes) for commitlog position ReplayPosition(segmentId=1366159340516, position=51235)
 INFO 08:42:22,269 Compacting [SSTableReader(path='/var/lib/cassandra/data/system/local/system-local-ib-12-Data.db'), SSTableReader(path='/var/lib/cassandra/data/system/local/system-local-ib-10-Data.db'), SSTableReader(path='/var/lib/cassandra/data/system/local/system-local-ib-9-Data.db'), SSTableReader(path='/var/lib/cassandra/data/system/local/system-local-ib-13-Data.db'), SSTableReader(path='/var/lib/cassandra/data/system/local/system-local-ib-11-Data.db')]
 INFO 08:42:22,386 Compacted 5 sstables to [/var/lib/cassandra/data/system/local/system-local-ib-14,].  917 bytes to 490 (~53% of original) in 63ms = 0.007417MB/s.  5 total rows, 1 unique.  Row merge counts were {1:0, 2:0, 3:0, 4:0, 5:1, }
 INFO 08:42:22,638 Starting Messaging Service on port 7000
 INFO 08:42:22,943 Using saved token [-5549340944909481365]
 INFO 08:42:22,949 Enqueuing flush of Memtable-local@24819405(84/84 serialized/live bytes, 4 ops)
 INFO 08:42:22,951 Writing Memtable-local@24819405(84/84 serialized/live bytes, 4 ops)
 INFO 08:42:22,974 Completed flushing /var/lib/cassandra/data/system/local/system-local-ib-15-Data.db (120 bytes) for commitlog position ReplayPosition(segmentId=1366159340516, position=51510)
 INFO 08:42:22,981 Enqueuing flush of Memtable-local@28362817(51/51 serialized/live bytes, 2 ops)
 INFO 08:42:22,982 Writing Memtable-local@28362817(51/51 serialized/live bytes, 2 ops)
 INFO 08:42:23,017 Completed flushing /var/lib/cassandra/data/system/local/system-local-ib-16-Data.db (110 bytes) for commitlog position ReplayPosition(segmentId=1366159340516, position=51685)
 INFO 08:42:23,093 Node localhost/127.0.0.1 state jump to normal
 INFO 08:42:23,100 Startup completed! Now serving reads.

[root@localhost bin]#

到此為止,linux上安裝Cassandra已完成。

延伸 · 閱讀

精彩推薦
  • CentosCentos 7開啟網卡自動獲取IP的詳細方法

    Centos 7開啟網卡自動獲取IP的詳細方法

    本篇文章主要介紹了Centos 7開啟網卡自動獲取IP的詳細方法,小編覺得挺不錯的,現在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧...

    凌鋒8972021-12-29
  • CentosCentOS下Uptime命令詳解

    CentOS下Uptime命令詳解

    在Linux下,我們可以使用uptime命令,而且此命令不必使用root權限。uptime命令在系統中已經默認安裝了。今天小編為大家帶來的是CentOS下Uptime命令詳解;希望...

    CentOS之家11482019-06-19
  • CentosCentOS6.5下Redis安裝與配置詳細步驟

    CentOS6.5下Redis安裝與配置詳細步驟

    本篇文章主要介紹了CentOS6.5下Redis安裝與配置詳細步驟,詳細介紹redis單機單實例安裝與配置,服務及開機自啟動。有興趣的可以了解一下。...

    飛流11452021-12-24
  • CentosCentOS7設置日期和時間方法以及基本概念介紹

    CentOS7設置日期和時間方法以及基本概念介紹

    這篇文章主要介紹了CentOS7設置日期和時間方法以及基本概念介紹,本文講解使用CentOS7中的新命令timedatectl設置日期時間方法,需要的朋友可以參考下 ...

    CentOS之家6522019-09-19
  • Centoscentos不小心刪除/root目錄該如何解決?

    centos不小心刪除/root目錄該如何解決?

    一些朋友最近在問小編centos不小心刪除/root目錄該如何解決?今天小編就為大家分享centos不小心刪除/root目錄解決辦法;希望對大家會有幫助,有需要的朋友...

    腳本之家8022019-05-29
  • CentosCentOS 6.6實現永久修改DNS地址的方法

    CentOS 6.6實現永久修改DNS地址的方法

    這篇文章主要介紹了CentOS 6.6實現永久修改DNS地址的方法,涉及針對CentOS配置文件的相關設置技巧,具有一定參考借鑒價值,需要的朋友可以參考下 ...

    Linux社區4472020-08-21
  • Centoscentos 安裝與操作方法

    centos 安裝與操作方法

    這篇文章主要介紹了centos 安裝與操作方法,需要的朋友可以參考下...

    centos之家5272019-07-11
  • CentosCentos7運用/dev/shm進行網站優化

    Centos7運用/dev/shm進行網站優化

    這篇文章主要介紹了LINUX中Centos7運用/dev/shm進行網站優化相關知識點,對此有興趣的朋友參考學習下。...

    彬菌9912022-03-02
主站蜘蛛池模板: 亚洲激情自拍偷拍 | 免费观看大片毛片 | 亚洲国产成人久久综合一 | 免费一区在线 | haodiaose在线精品免费视频 | 国产精品久久久久久影院 | 97精品国产自在现线免费 | 18捆绑调教在线高清 | 国产91精品露脸国语对白 | 天堂欧美 | 十大免费批日的软件 | 成人福利在线视频免费观看 | 亚洲剧情在线 | 十六以下岁女子毛片免费 | 国内精品久久久久小说网 | 91动漫在线观看 | 国产做a爰片久久毛片 | 成人精品一区二区三区 | 99成人免费视频 | 亚洲黄色小视频 | 欧美sq| 国产图片一区 | 久久综合给合久久狠狠狠… | 好大好爽好硬 | 办公室恋情在线 | 日韩在线视频一区二区三区 | 免费老外的毛片清高 | 忘忧草研究院一二三 | 69p69国产精品 | 亚洲高清在线天堂精品 | 成年人视频在线免费观看 | 免费特黄视频 | 岛国虐乳紧缚媚药调教 | 亚洲国产欧美在线人成 | 成3d漫二区三区四区 | 免费网址在线观看入口推荐 | 国产精品女同久久免费观看 | 日本色吧 | 国产老太婆hd老头 | 亚洲色图综合网 | 亚洲欧美日本在线观看 |