Apache CassandraのMacへのインストール方法
以下のapache cassandraの公式サイトからcassandraのlatest versionをクリックし
Download
The Apache Cassandra database is the right choice when you need scalability and high availability without compromising performance. Linear scalability and prove...
以下のページに移動
Apache Download Mirrors
Home page of The Apache Software Foundation
一番上にある以下のリンクをクリックする。
https://downloads.apache.org/cassandra/3.11.6/apache-cassandra-3.11.6-bin.tar.gz
cassandraの圧縮ファイルをダウンロードされるので、ダウンロードされたらダブルクリックで解凍して、解凍したファイル内のbinファイルに移動
1 |
$ cd ~/Downloads/apache-cassandra-3.11.6/bin |
そこで以下のコマンドを実行するとcassandraが起動する。以下のようにコンソールに表示されていたらOK。
1 2 3 4 5 6 7 8 |
$ ./cassandra CompilerOracle: dontinline org/apache/cassandra/db/Columns$Serializer.deserializeLargeSubset (Lorg/apache/cassandra/io/util/DataInputPlus;Lorg/apache/cassandra/db/Columns;I)Lorg/apache/cassandra/db/Columns; CompilerOracle: dontinline org/apache/cassandra/db/Columns$Serializer.serializeLargeSubset (Ljava/util/Collection;ILorg/apache/cassandra/db/Columns;ILorg/apache/cassandra/io/util/DataOutputPlus;)V CompilerOracle: dontinline org/apache/cassandra/db/Columns$Serializer.serializeLargeSubsetSize (Ljava/util/Collection;ILorg/apache/cassandra/db/Columns;I) : : INFO [MigrationStage:1] 2020-04-16 22:50:47,996 ColumnFamilyStore.java:427 - Initializing system_auth.roles INFO [main] 2020-04-16 22:50:48,018 StorageService.java:1478 - JOINING: Finish joining ring |
cassandra内に入るには以下のcqlshコマンドを使う
1 2 3 4 5 |
$ ./cqlsh Connected to Test Cluster at 127.0.0.1:9042. [cqlsh 5.0.1 | Cassandra 3.11.6 | CQL spec 3.4.4 | Native protocol v4] Use HELP for help. cqlsh> |
確認としてkeyspaceの作成やdescコマンドが使えるかチェック。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
cqlsh> CREATE KEYSPACE sample ... WITH replication = {'class': 'SimpleStrategy', 'replication_factor' : 1}; cqlsh> desc tables; Keyspace system_schema ---------------------- tables triggers views keyspaces dropped_columns functions aggregates indexes types columns Keyspace system_auth -------------------- resource_role_permissons_index role_permissions role_members roles Keyspace system --------------- available_ranges peers batchlog transferred_ranges batches compaction_history size_estimates hints prepared_statements sstable_activity built_views "IndexInfo" peer_events range_xfers views_builds_in_progress paxos local Keyspace sample --------------- <empty> Keyspace system_distributed --------------------------- repair_history view_build_status parent_repair_history Keyspace system_traces ---------------------- events sessions cqlsh> |
コメント
[…] […]