{"id":31872,"date":"2018-11-01T17:29:44","date_gmt":"2018-11-01T11:59:44","guid":{"rendered":"https:\/\/www.wikitechy.com\/technology\/?p=31872"},"modified":"2018-11-01T17:29:44","modified_gmt":"2018-11-01T11:59:44","slug":"install-cassandra-on-centos-6","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/technology\/install-cassandra-on-centos-6\/","title":{"rendered":"How To Install Cassandra on CentOS 6"},"content":{"rendered":"<p><span style=\"color: #333399;\"><strong>Install Cassandra on Centos 6<\/strong><\/span><\/p>\n<p class=\"Textbody\"><span lang=\"DE\" style=\"font-family: 'Arial',sans-serif;\">Apache Cassandra could be a <strong>NoSQL<\/strong> info meant for storing massive amounts of knowledge in a very suburbanized, extremely accessible cluster. NoSQL refers to information of a knowledge and information base with a data model apart from the tabular relations utilized in relative databases like<strong> MySQL, PostgreSQL, and Microsoft SQL<\/strong><\/span><\/p>\n<h3 id=\"pre-flight-check\" class=\"Textbody\"><span lang=\"DE\" style=\"font-family: Arial, sans-serif; color: #003366;\">Pre-Flight Check<\/span><\/h3>\n<ul>\n<li class=\"Textbody\"><span lang=\"DE\" style=\"font-family: 'Arial',sans-serif;\">These directions are supposed for putting in prophetess a pair of on one <strong>CentOS half dozen node<\/strong>.<\/span><\/li>\n<li class=\"Textbody\"><span lang=\"DE\" style=\"font-family: 'Arial',sans-serif;\">I\u2019ll be engaging from a <strong>Liquid net Core Managed CentOS<\/strong> half dozen.4 server, and I\u2019ll be logged in as root.<\/span><\/li>\n<li class=\"Textbody\"><span lang=\"DE\" style=\"font-family: 'Arial',sans-serif;\">You may be ready to <strong>skip to Step #2<\/strong> if you have already got a stable version of Java seven (preferably the Oracle\/Sun JVM). Check to check if your server already has Java put in by running the subsequent command: java -version<\/span><\/li>\n<\/ul>\n<h3 id=\"step-1-download-oracle-java-se-runtime-environment-7\" class=\"Textbody\"><span class=\"StrongEmphasis\" style=\"color: #008080;\"><span lang=\"DE\" style=\"font-family: 'Arial',sans-serif;\">Step 1: Download Oracle Java SE Runtime Environment 7<\/span><\/span><\/h3>\n<p class=\"Textbody\"><span lang=\"DE\" style=\"font-family: 'Arial',sans-serif;\">Head over to Oracle\u2019s web site and find the newest version of <a href=\"https:\/\/www.wikitechy.com\/tutorials\/oracle\/\" target=\"_blank\" rel=\"noopener\">Oracle<\/a> Java SE Runtime surroundings seven.<\/span><\/p>\n<p class=\"Textbody\"><span lang=\"DE\" style=\"font-family: 'Arial',sans-serif;\">\u00a0<\/span><span lang=\"DE\" style=\"font-family: 'Arial',sans-serif;\">Accept the license agreement so transfer the <strong>UNIX x64 rate installer<\/strong> (which as of the writing of this text is jre-7u45-linux-x64.rpm ) to your native desktop.<\/span><\/p>\n<p class=\"Textbody\"><span lang=\"DE\" style=\"font-family: 'Arial',sans-serif;\">\u00a0<\/span><span lang=\"DE\" style=\"font-family: 'Arial',sans-serif;\">Transfer the file to your Liquid net server. If you wish facilitate therewith, scrutinize this article: exploitation <strong>SFTP<\/strong> and <strong>SCP<\/strong> rather than <strong>FTP<\/strong><\/span><\/p>\n<p class=\"Textbody\"><strong><span lang=\"DE\" style=\"font-family: 'Arial',sans-serif;\">\u00a0<\/span><\/strong><span lang=\"DE\" style=\"font-family: 'Arial',sans-serif;\"><strong>Login<\/strong> to the <a href=\"https:\/\/www.wikitechy.com\/tutorials\/apache\/apache-web-server\" target=\"_blank\" rel=\"noopener\">server<\/a> as root, so from the directory wherever you uploaded the package run the install by exploitation the command rate<strong> -ivh<\/strong> , or during this case:<\/span><\/p>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <\/div> <pre class=\"language-apacheconf code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-apacheconf code-embed-code\">rpm -ivh jre-7u45-linux-x64.rpm<\/code><\/pre> <\/div>\n<h4 id=\"note\">\n<span style=\"color: #993300;\"><strong>Note:<\/strong> <\/span><\/h4>\n<p>Your command are slightly completely different if you downloaded a special version of Oracle <a href=\"https:\/\/www.wikitechy.com\/step-by-step-tutorials\/java\/java-installation-instructions\" target=\"_blank\" rel=\"noopener\">Java SE Runtime<\/a> surroundings seven. merely replace<strong> jre-7u45-linux-x64.rpm<\/strong> with the particular computer filename.<\/p>\n<p>Then install the <strong>Java Native Access<\/strong> (JNA) which might improve Cassandra\u2019s memory usage:<\/p>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <\/div> <pre class=\"language-apacheconf code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-apacheconf code-embed-code\">yum install jna<\/code><\/pre> <\/div>\n<p>Add a symbolic link to the Oracle Java SE Runtime Environment 7 installation so that your server uses the Oracle JRE instead of the <strong>OpenJDK JRE<\/strong>:<\/p>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <\/div> <pre class=\"language-apacheconf code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-apacheconf code-embed-code\">alternatives --install \/usr\/bin\/java java \/usr\/java\/jre1.7.0_45\/bin\/java 20000<\/code><\/pre> <\/div>\n<h4 id=\"note-2\"><span style=\"color: #993300;\"><strong>Note:<\/strong> <\/span><\/h4>\n<p>Your command are going to be slightly completely different if you downloaded a distinct version of Oracle Java SE Runtime surroundings seven. merely replace <strong>jre1.7.0_45<\/strong> with the particular version you\u2019ve put in.<\/p>\n<p>Then use the alternatives command to verify that the <strong>Oracle Java SE Runtime surroundings seven<\/strong> is chosen. If not, merely opt for the acceptable choice once you run the command:<\/p>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <\/div> <pre class=\"language-apacheconf code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-apacheconf code-embed-code\">alternatives --config java<\/code><\/pre> <\/div>\n<p>The results of your command should look similar to the image below:<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter  wp-image-31874\" src=\"https:\/\/www.wikitechy.com\/technology\/wp-content\/uploads\/2018\/11\/cassandra-centos-6.png\" alt=\"cassandra centos 6\" width=\"674\" height=\"239\" srcset=\"https:\/\/www.wikitechy.com\/technology\/wp-content\/uploads\/2018\/11\/cassandra-centos-6.png 595w, https:\/\/www.wikitechy.com\/technology\/wp-content\/uploads\/2018\/11\/cassandra-centos-6-300x106.png 300w\" sizes=\"(max-width: 674px) 100vw, 674px\" \/><\/p>\n<p>Utilize the following command to double <strong>check the correct version<\/strong> of Oracle Java SE Runtime Environment 7 is being used:<\/p>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <\/div> <pre class=\"language-apacheconf code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-apacheconf code-embed-code\">java -version<\/code><\/pre> <\/div>\n<h3 id=\"step-2-add-the-datastax-community-repository\">\n<span style=\"color: #008080;\">Step 2: Add the DataStax Community Repository<\/span><\/h3>\n<p>For a refresher on editing files with vim see: Overview of the <a href=\"https:\/\/www.wikitechy.com\/technology\/pros-cons-vim-emacs\/\" target=\"_blank\" rel=\"noopener\">Vim<\/a> Text Editor<\/p>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <\/div> <pre class=\"language-apacheconf code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-apacheconf code-embed-code\">vim \/etc\/yum.repos.d\/datastax.repo<\/code><\/pre> <\/div>\n<p>Add the following information to the file you\u2019ve created, using<strong> i to insert:<\/strong><\/p>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <\/div> <pre class=\"language-apacheconf code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-apacheconf code-embed-code\">[datastax] name = DataStax Repo for Apache Cassandra<br\/>baseurl = http:\/\/rpm.datastax.com\/community<br\/>enabled = 1<br\/>gpgcheck = 0<\/code><\/pre> <\/div>\n<p>Then exit and save the file with the <strong>command :wq<\/strong> (see the example below):<\/p>\n<h3 id=\"\"><img decoding=\"async\" class=\"aligncenter  wp-image-31875\" src=\"https:\/\/www.wikitechy.com\/technology\/wp-content\/uploads\/2018\/11\/cassandra-centos-wq-command.png\" alt=\"cassandra centos wq command\" width=\"692\" height=\"132\" srcset=\"https:\/\/www.wikitechy.com\/technology\/wp-content\/uploads\/2018\/11\/cassandra-centos-wq-command.png 577w, https:\/\/www.wikitechy.com\/technology\/wp-content\/uploads\/2018\/11\/cassandra-centos-wq-command-300x57.png 300w\" sizes=\"(max-width: 692px) 100vw, 692px\" \/><\/h3>\n<h3 id=\"step-3-install-apache-cassandra-2\"><span style=\"color: #008080;\">Step 3: Install Apache Cassandra 2<\/span><\/h3>\n<p>At this point, <strong>installing Cassandra<\/strong> is as simple as running just one command:<\/p>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <\/div> <pre class=\"language-apacheconf code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-apacheconf code-embed-code\">yum install dsc20<\/code><\/pre> <\/div>\n<h3 id=\"step-4-configure-the-apache-cassandra-2-environment\"><span style=\"color: #008080;\">Step 4: configure the Apache cassandra 2 environment<\/span><\/h3>\n<p>Just 2 additional simple environment tweaks that <strong>enable cassandra to run<\/strong> correctly:<\/p>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <\/div> <pre class=\"language-apacheconf code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-apacheconf code-embed-code\">export JAVA_HOME=\/usr\/java\/jre1.7.0_45\/<br\/>export PATH=$PATH:\/usr\/java\/jre1.7.0_45\/bin\/<\/code><\/pre> <\/div>\n<h4 id=\"note-3\">\n<span style=\"color: #993300;\">Note:<\/span><\/h4>\n<p>Your <a href=\"https:\/\/www.wikitechy.com\/tutorials\/hive\/hive-sql-hive-commands\" target=\"_blank\" rel=\"noopener\">commands<\/a> are slightly completely different if you downloaded a distinct version of Oracle Java SE Runtime surroundings seven. merely <strong>replace jre1.7.0_45<\/strong> with the particular version you\u2019ve put in.<\/p>\n<h3 id=\"step-5-get-cassandra-running\"><span style=\"color: #008080;\">Step 5: Get Cassandra Running<\/span><\/h3>\n<p><strong>Start-Up Cassandra<\/strong><\/p>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <\/div> <pre class=\"language-apacheconf code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-apacheconf code-embed-code\">service cassandra start<\/code><\/pre> <\/div>\n<p class=\"Textbody\"><strong><span lang=\"DE\" style=\"font-family: 'Arial',sans-serif; color: #444444;\">Check Cassandra Service Status<\/span><\/strong><\/p>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <\/div> <pre class=\"language-apacheconf code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-apacheconf code-embed-code\">service cassandra status<\/code><\/pre> <\/div>\n<p class=\"Textbody\"><strong><span lang=\"DE\" style=\"font-family: 'Arial',sans-serif; color: #444444;\">Enter the Cassandra Command Line<\/span><\/strong><\/p>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <\/div> <pre class=\"language-apacheconf code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-apacheconf code-embed-code\">cqlsh<\/code><\/pre> <\/div>\n<p>The <strong>cqlsh interface<\/strong> should look similar to the image below:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter  wp-image-31876\" src=\"https:\/\/www.wikitechy.com\/technology\/wp-content\/uploads\/2018\/11\/cqlsh-interface-cassandra.png\" alt=\"cqlsh interface cassandra\" width=\"695\" height=\"76\" srcset=\"https:\/\/www.wikitechy.com\/technology\/wp-content\/uploads\/2018\/11\/cqlsh-interface-cassandra.png 576w, https:\/\/www.wikitechy.com\/technology\/wp-content\/uploads\/2018\/11\/cqlsh-interface-cassandra-300x33.png 300w\" sizes=\"(max-width: 695px) 100vw, 695px\" \/><\/p>\n<p><strong>Check Cassandra Node Status<\/strong><\/p>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <\/div> <pre class=\"language-apacheconf code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-apacheconf code-embed-code\">nodetool status<\/code><\/pre> <\/div>\n<p><strong>Shutdown Cassandra<\/strong><\/p>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <\/div> <pre class=\"language-apacheconf code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-apacheconf code-embed-code\">service cassandra stop<\/code><\/pre> <\/div>\n","protected":false},"excerpt":{"rendered":"<p>Install Cassandra on Centos 6 Apache Cassandra could be a NoSQL info meant for storing massive amounts of knowledge in a very suburbanized, extremely accessible cluster. NoSQL refers to information of a knowledge and information base with a data model apart from the tabular relations utilized in relative databases like MySQL, PostgreSQL, and Microsoft SQL [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":31878,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[85747,85773,2139,85772],"tags":[85774,85775,85776,85777,85778,85779,85780,85781,85782,85783,85784,85785,85786,85787,85788,85789,85790,85791,85792,85793,85794,85795,85796,85798,85797],"class_list":["post-31872","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-apache-tomcat","category-centos","category-java","category-oracle","tag-apache-cassandra","tag-apache-cassandra-api","tag-apache-cassandra-tutorial","tag-cassandra-4-0-release-date","tag-cassandra-architecture","tag-cassandra-client-centos","tag-cassandra-cluster-setup","tag-cassandra-documentation","tag-cassandra-download","tag-cassandra-install-centos-7","tag-cassandra-installation-on-linux","tag-cassandra-release-notes","tag-cassandra-rpm","tag-cassandra-setup","tag-cassandra-tutorial","tag-cassandra-yum-repo","tag-datastax-cassandra-download","tag-datastax-cassandra-installation","tag-failed-to-start-cassandra-service-unit-not-found","tag-install-cassandra","tag-install-cassandra-3-centos-7","tag-install-cassandra-centos","tag-planet-cassandra","tag-start-cassandra-centos","tag-yum-install-cassandra-3"],"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/31872","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/comments?post=31872"}],"version-history":[{"count":0,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/31872\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/media\/31878"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/media?parent=31872"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/categories?post=31872"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/tags?post=31872"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}