怎么在Centos 6.3系统中安装Cassandra数据库

2022年 10月 16日 发表评论
腾讯云618会场:点此直达 阿里云618会场:点此直达
免费/便宜/高性价比服务器汇总入口(已更新):点此直达

这篇文章给大家介绍怎么在Centos 6.3系统中安装卡桑德拉数据库,内容非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能有所帮助。

1 下载Java jdk:

下载完成后,解压jdk:

塔尔-兹夫jdk-7u17-linux-i586.tar.gz

3 解压完成后,配置环境变量:

vim /etc/profile

在打开的文件的末尾,增加如下代码:

JAVA _ HOME=/usr/local/JDK 1。7 .0 _ 17

PATH=$JAVA_HOME/bin:$PATH

类路径=。美元JAVA _ HOME/lib/dt。jar : $ JAVA _ HOME/lib/tools。坛子

exportJAVA_HOME

exportPATH

exportCLASSPATHPS:只需将JAVA_HOME的路径改一下即可,改成刚才解压后爪哇开发工具包的目录目录即可,我的是把爪哇开发工具包压缩包放在/usr/local目录下了,然后直接

在这里解压的,所以解压后的包也就直接在该目录下了【jdk1.7.0_17】、所以我这里JAVA_HOME的路径为/usl/local/jdk1.7.0_17 '

四上面的步骤执行完成后,执行下如下命令

来源/etc/profile

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

5执行完上面的步骤,下一步就是看一下java jdk是否安装成功,执行下如下命令

爪哇版本

我这里执行后,会输出如下内容:

[root @ localhost ~]# Java-版本

jav rehow ' 1。7 .0 _ 17 '

Java TM Seruntimeenvironment(build 1。7 .0 _ 17-b02)

javaHotsPot(TM)ClientVM(构建23.7-b01,混合模式)

[root @ localhost ~]#说明jdk安装成功,这里的版本是1.7

支持爪哇开发工具包的安装到此结束,下一步是cassandra的安装

一下载卡珊德拉:

地址:http://www.apache.org/dyn/closer.cgi?path=/Cassandra/1。2 .4/Apache-Cassandra-1。2 .4-src。焦油。地面零点

我这里用的版本是:Apache-Cassandra-1。2 .4-bin。焦油。地面零点

2下载完成后,直接解压:

塔尔-兹夫apache-cassandra-1.2.4-bin.tar.gz

解压完成后,得到如下目录:apache-cassandra-1.2.4

进入该目录下的垃圾桶目录,直接启动卡桑德拉即可:

cd apache-cassandra-1.2.4/bin。/Cassandra-f[启动卡珊德拉】

启动后,会输出一大堆的代码,如下,表明卡桑德拉启动成功:

[root@localhostbin]# ./cassandra

xss=-ea-javaagent:/./lib/jamm-0。2 .5 .jar-XX : usethread priorities-XX : thread priority Policy=42-Xml505 M-Xmx505 M-Xmn 100M-XX : heapdumponotofmemoryerror-XSS 180k

[root @ localhostbin]# info 08:42:11,803日志初始化

信息08:42:11,92532位jvm已检测到。建议将其作为更好的性能

INFO08:42:11,930 JVM厂商/版本: javahotspot(TM)客户端VM/1。7 .0 _ 17

信息08:42:11,932 heapsize :519045120/520093696

信息08:42:11,933类路径:/./conf:/./build/class/main :/./build/class/:/./lib/antlr-3.2.jar:/./lib/Apache-Cassandra-1。2 .4 .jar :/./lib/Apache-Cassandra-client util-1。2 .4 .罐子:/./lib/Apache-Cassandra-节俭-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 INFO08:42:11,998JNAnotfound.Nativemethodswillbedisabled. INFO08:42:12,207Loadingsettingsfromfile:/usr/local/apache-cassandra-1.2.4/conf/cassandra.yaml INFO08:42:13,791Datafilesdirectories:[/var/lib/cassandra/data] INFO08:42:13,792Commitlogdirectory:/var/lib/cassandra/commitlog INFO08:42:13,793DiskAccessMode'auto'determinedtobestandard,indexAccessModeisstandard INFO08:42:13,793disk_failure_policyisstop INFO08:42:13,926Globalmemtablethresholdisenabledat165MB INFO08:42:15,609Notusingmulti-threadedcompaction INFO08:42:17,270Initializingkeycachewithcapacityof24MBs. INFO08:42:17,293Schedulingkeycachesavetoeach14400seconds(goingtosaveallkeys). INFO08:42:17,299Initializingrowcachewithcapacityof0MBsandproviderorg.apache.cassandra.cache.SerializingCacheProvider INFO08:42:17,359Schedulingrowcachesavetoeach0seconds(goingtosaveallkeys). INFO08:42:18,249Opening/var/lib/cassandra/data/system/schema_keyspaces/system-schema_keyspaces-ib-3(265bytes) INFO08:42:18,574Opening/var/lib/cassandra/data/system/schema_keyspaces/system-schema_keyspaces-ib-2(220bytes) INFO08:42:18,597Opening/var/lib/cassandra/data/system/schema_keyspaces/system-schema_keyspaces-ib-1(223bytes) INFO08:42:18,670Opening/var/lib/cassandra/data/system/schema_columnfamilies/system-schema_columnfamilies-ib-5(4855bytes) INFO08:42:18,693Opening/var/lib/cassandra/data/system/schema_columns/system-schema_columns-ib-2(3770bytes) INFO08:42:18,700Opening/var/lib/cassandra/data/system/schema_columns/system-schema_columns-ib-4(208bytes) INFO08:42:18,706Opening/var/lib/cassandra/data/system/schema_columns/system-schema_columns-ib-3(3772bytes) INFO08:42:18,713Opening/var/lib/cassandra/data/system/schema_columns/system-schema_columns-ib-1(3769bytes) INFO08:42:18,741Opening/var/lib/cassandra/data/system/local/system-local-ib-10(110bytes) INFO08:42:18,778Opening/var/lib/cassandra/data/system/local/system-local-ib-9(386bytes) INFO08:42:20,907completedpre-loading(4keys)keycache. INFO08:42:20,916Replaying/var/lib/cassandra/commitlog/CommitLog-2-1366156865609.log,/var/lib/cassandra/commitlog/CommitLog-2-1366156865610.log INFO08:42:20,954Replaying/var/lib/cassandra/commitlog/CommitLog-2-1366156865609.log INFO08:42:21,051Finishedreading/var/lib/cassandra/commitlog/CommitLog-2-1366156865609.log INFO08:42:21,052Replaying/var/lib/cassandra/commitlog/CommitLog-2-1366156865610.log INFO08:42:21,075Finishedreading/var/lib/cassandra/commitlog/CommitLog-2-1366156865610.log INFO08:42:21,080EnqueuingflushofMemtable-users@23457041(28/28serialized/livebytes,2ops) INFO08:42:21,085WritingMemtable-users@23457041(28/28serialized/livebytes,2ops) INFO08:42:21,091EnqueuingflushofMemtable-local@16277494(52/52serialized/livebytes,6ops) INFO08:42:21,146Completedflushing/var/lib/cassandra/data/system_auth/users/system_auth-users-ib-1-Data.db(64bytes)forcommitlogpositionReplayPosition(segmentId=1366159340516,position=142) INFO08:42:21,261WritingMemtable-local@16277494(52/52serialized/livebytes,6ops) INFO08:42:21,277Completedflushing/var/lib/cassandra/data/system/local/system-local-ib-11-Data.db(84bytes)forcommitlogpositionReplayPosition(segmentId=1366159340516,position=142) INFO08:42:21,279Logreplaycomplete,3replayedmutations INFO08:42:21,294FixingtimestampsofschemaColumnFamilyschema_keyspaces... INFO08:42:21,495EnqueuingflushofMemtable-local@4223809(65/65serialized/livebytes,2ops) INFO08:42:21,497WritingMemtable-local@4223809(65/65serialized/livebytes,2ops) INFO08:42:21,513Completedflushing/var/lib/cassandra/data/system/local/system-local-ib-12-Data.db(97bytes)forcommitlogpositionReplayPosition(segmentId=1366159340516,position=297) INFO08:42:21,518EnqueuingflushofMemtable-schema_keyspaces@11390025(389/389serialized/livebytes,9ops) INFO08:42:21,520WritingMemtable-schema_keyspaces@11390025(389/389serialized/livebytes,9ops) INFO08:42:21,536Completedflushing/var/lib/cassandra/data/system/schema_keyspaces/system-schema_keyspaces-ib-4-Data.db(236bytes)forcommitlogpositionReplayPosition(segmentId=1366159340516,position=992) INFO08:42:21,909Cassandraversion:1.2.4 INFO08:42:21,910ThriftAPIversion:19.35.0 INFO08:42:21,911CQLsupportedversions:2.0.0,3.0.1(default:3.0.1) INFO08:42:22,148Loadingpersistedringstate INFO08:42:22,151Startingupservergossip INFO08:42:22,222EnqueuingflushofMemtable-local@32614666(251/251serialized/livebytes,9ops) INFO08:42:22,223WritingMemtable-local@32614666(251/251serialized/livebytes,9ops) INFO08:42:22,238Completedflushing/var/lib/cassandra/data/system/local/system-local-ib-13-Data.db(240bytes)forcommitlogpositionReplayPosition(segmentId=1366159340516,position=51235) INFO08:42:22,269Compacting[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')] INFO08:42:22,386Compacted5sstablesto[/var/lib/cassandra/data/system/local/system-local-ib-14,].917bytesto490(~53%oforiginal)in63ms=0.007417MB/s.5totalrows,1unique.Rowmergecountswere{1:0,2:0,3:0,4:0,5:1,} INFO08:42:22,638StartingMessagingServiceonport7000 INFO08:42:22,943Usingsavedtoken[-5549340944909481365] INFO08:42:22,949EnqueuingflushofMemtable-local@24819405(84/84serialized/livebytes,4ops) INFO08:42:22,951WritingMemtable-local@24819405(84/84serialized/livebytes,4ops) INFO08:42:22,974Completedflushing/var/lib/cassandra/data/system/local/system-local-ib-15-Data.db(120bytes)forcommitlogpositionReplayPosition(segmentId=1366159340516,position=51510) INFO08:42:22,981EnqueuingflushofMemtable-local@28362817(51/51serialized/livebytes,2ops) INFO08:42:22,982WritingMemtable-local@28362817(51/51serialized/livebytes,2ops) INFO08:42:23,017Completedflushing/var/lib/cassandra/data/system/local/system-local-ib-16-Data.db(110bytes)forcommitlogpositionReplayPosition(segmentId=1366159340516,position=51685) INFO08:42:23,093Nodelocalhost/127.0.0.1statejumptonormal INFO08:42:23,100Startupcompleted!Nowservingreads. [root@localhostbin]#

关于怎么在Centos 6.3系统中安装Cassandra数据库就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。

腾讯云618活动:点此领取】8888元代金券,附云服务器价格表,2核2G4M轻量应用服务器99元1年,新老用户都可以买,可以享受1次续费99元一年、135元15个月、三年560元,MySQL云数据库59元1年起,2核2G3M配置82元1年,2核4G5M配置188元一年、3年900元,4核8G12M轻量服务器880元15个月,8核16G配置1890元15个月,更多16核32G28M带宽和云服务器CVM标准型S5、GPU服务器、CVM标准型SA2租用优惠价格如下,可以 点此进入最新活动页 查看当前最新的优惠券和活动信息。 腾讯云首购便宜续费贵,点击前往 【爆品专区】选择3年/5年,免得续费贵;首购便宜升级贵,建议 点击 选择8核16G/16核32G配置高的服务器。 阿里云618活动:点击领取】5亿上云补贴和2088元满减代金券,阿里云服务器租用费用618活动最新价格表【点击了解】,最便宜轻量应用服务器2核2G3M带宽82元1年,ECS云服务器2核2G3M带宽99元一年,ECS u1实例2核4G5M带宽优惠价格199元一年,香港30M带宽轻量服务器24元1个月、288元一年,4核8G服务器706元一年,ECS云服务器4核16G10M带宽30元1个月、90元3个月,云服务器8核32G10M带宽109元1个月、327元3个月。 腾讯云老用户享新人优惠的方法:用Qq登录、1人可注册3个新账号/用家人朋友的身份注册新号(点击注册新账号)。
小咸鱼

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: