{"id":3144,"date":"2016-10-27T16:44:41","date_gmt":"2016-10-27T20:44:41","guid":{"rendered":"https:\/\/www.globo.tech\/learning-center\/?p=3144"},"modified":"2017-11-24T18:05:39","modified_gmt":"2017-11-24T23:05:39","slug":"install-cassandra-centos-7","status":"publish","type":"post","link":"https:\/\/www.globo.tech\/learning-center\/install-cassandra-centos-7\/","title":{"rendered":"How to Install Cassandra on CentOS 7"},"content":{"rendered":"<h1>How to Install Cassandra on CentOS 7<\/h1>\n<p>Cassandra is a reliable, clusterable, highly-scalable database capable of handling large quantities of data on commodity hardware. If you have big data needs, and are looking for a proven open source solution that has received battle testing from many large companies, then Cassandra may be exactly what you&#8217;re looking for. If you have a CentOS 7 server, this guide will get you up and running with a single Cassandra node. It will use pre-packaged Cassandra distributions built for CentOS, making installation and upgrades a snap. You can then build it out by performing additional installations on other servers, then clustering the resulting instances for higher scalability and reliability.  This article will guide you on how to install Apache Cassandra on CentOS 7 Server.<\/p>\n<h2>Getting Started<\/h2>\n<p>You&#8217;ll need the following in place in order to complete this guide:<br \/>\n\u2022 1 server (<a href=\"https:\/\/www.globo.tech\/cloud-server-pricing\" target=\"_blank\"><b>Cloud Server<\/b><\/a> or <a href=\"http:\/\/www.globo.tech\/dedicated-server-hosting\" target=\"_blank\"><b>Dedicated Server<\/b><\/a>) with CentOS 7<br \/>\n\u2022 Root access<\/p>\n<h2>Tutorial<\/h2>\n<p>Begin by applying all available patches and security updates to your CentOS 7 server.<\/p>\n<p><code>yum -y update<\/code><\/p>\n<p>Cassandra is written in Java. As such, you&#8217;ll need the Java VM installed in order to run it. Do so via Yum.<\/p>\n<p><code>yum -y install java<\/code><\/p>\n<p>Packages for Cassandra are shipped in a Datastax repository. In order to automatically retrieve these packages, and to fetch upgrades in the future, we&#8217;ll create this repository so Yum can use it.<\/p>\n<p><code>nano \/etc\/yum.repos.d\/datastax.repo<\/code><\/p>\n<p><code class=\"gris\">[datastax]<br \/>\nname = DataStax Repo for Apache Cassandra<br \/>\nbaseurl = http:\/\/rpm.datastax.com\/community<br \/>\nenabled = 1<br \/>\ngpgcheck = 0<\/code><\/p>\n<p>Now Cassandra is ready to be installed.<\/p>\n<p><code>yum -y install dsc20<\/code><\/p>\n<p>With Cassandra installed, we must now start the daemon via systemd.<br \/>\n\/etc\/init.d\/cassandra start<\/p>\n<p>The systemd unit is now created. Use &#8220;systemctl start cassandra&#8221; to launch the new unit.<\/p>\n<p><code>systemctl enable cassandra.service<\/code><\/p>\n<p>While the database should be running, it is not yet configured to launch on boot. Let&#8217;s tell systemd that Cassandra should automatically launch whenever your system boots.<\/p>\n<p><code>[root@cassandra ~] systemctl status cassandra<\/code><\/p>\n<p><code class=\"gris\">cassandra.service - SYSV: Starts and stops Cassandra<br \/>\n   Loaded: loaded (\/etc\/rc.d\/init.d\/cassandra)<br \/>\n   Active: active (exited) since Thu 2016-09-15 04:36:47 UTC; 14s ago<br \/>\n     Docs: man:systemd-sysv-generator(8)<br \/>\n  Process: 9413 ExecStart=\/etc\/rc.d\/init.d\/cassandra start (code=exited, status=0\/SUCCESS)<\/code><\/p>\n<p>Let&#8217;s ensure that Cassandra is running using this command.<\/p>\n<p><code>[root@cassandra ~] cqlsh<\/code><\/p>\n<p><code class=\"gris\">Connected to Test Cluster at localhost:9160.<br \/>\n[cqlsh 4.1.1 | Cassandra 2.0.17 | CQL spec 3.1.1 | Thrift protocol 19.39.0]<br \/>\nUse HELP for help.<br \/>\ncqlsh><\/code><\/p>\n<p>Cassandra ships with a powerful command line utility, cqlsh. Launch it to perform various vital tasks with your database.<\/p>\n<p><code>[root@cassandra ~] nodetool status<\/code><\/p>\n<p><code class=\"gris\">Datacenter: datacenter1<br \/>\n=======================<br \/>\nStatus=Up\/Down<br \/>\n|\/ State=Normal\/Leaving\/Joining\/Moving<br \/>\n--  Address    Load       Tokens  Owns (effective)  Host ID                               Rack<br \/>\nUN  127.0.0.1  46.21 KB   256     100.0%            7dd2b7d9-404e-4a77-a36d-cc8f55168c0d  rack1<br \/>\n[root@cassandra ~]#<\/code><\/p>\n<p>Likewise, the nodetool command shows the status of your Cassandra node.<\/p>\n<h2>Conclusion<\/h2>\n<p>You now have a fresh Cassandra instance into which you can load large amounts of data. Share this guide with anyone you may know of who is in search of a big data solution, so they too can enjoy the benefits of an easy Cassandra installation. If you found this article helpful, feel free to share it with your friends and let us know in the comments below! <\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>How to Install Cassandra on CentOS 7 Cassandra is a reliable, clusterable, highly-scalable database capable of handling large quantities of data on commodity hardware. If you have big data needs, and are looking for a proven open source solution that has received battle testing from many large companies, then Cassandra may be exactly what you&#8217;re<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[61],"tags":[],"class_list":["post-3144","post","type-post","status-publish","format-standard","hentry","category-database","operating_system-centos-7"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Install Cassandra on CentOS 7 - Globo.Tech<\/title>\n<meta name=\"description\" content=\"This tutorial will show you how to install Cassandra on your CentOS 7 server. Read now &amp; Enjoy this fast distributed database system!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.globo.tech\/learning-center\/install-cassandra-centos-7\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install Cassandra on CentOS 7 - Globo.Tech\" \/>\n<meta property=\"og:description\" content=\"This tutorial will show you how to install Cassandra on your CentOS 7 server. Read now &amp; Enjoy this fast distributed database system!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.globo.tech\/learning-center\/install-cassandra-centos-7\/\" \/>\n<meta property=\"og:site_name\" content=\"Globo.Tech\" \/>\n<meta property=\"article:published_time\" content=\"2016-10-27T20:44:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-11-24T23:05:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2016\/09\/GloboTech-Logo.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"963\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"GloboTech Communications\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"GloboTech Communications\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-cassandra-centos-7\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-cassandra-centos-7\\\/\"},\"author\":{\"name\":\"GloboTech Communications\",\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/#\\\/schema\\\/person\\\/e17784b37f4a4f49b7bc611847912e87\"},\"headline\":\"How to Install Cassandra on CentOS 7\",\"datePublished\":\"2016-10-27T20:44:41+00:00\",\"dateModified\":\"2017-11-24T23:05:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-cassandra-centos-7\\\/\"},\"wordCount\":404,\"commentCount\":0,\"articleSection\":[\"Database\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-cassandra-centos-7\\\/\",\"url\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-cassandra-centos-7\\\/\",\"name\":\"How to Install Cassandra on CentOS 7 - Globo.Tech\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/#website\"},\"datePublished\":\"2016-10-27T20:44:41+00:00\",\"dateModified\":\"2017-11-24T23:05:39+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/#\\\/schema\\\/person\\\/e17784b37f4a4f49b7bc611847912e87\"},\"description\":\"This tutorial will show you how to install Cassandra on your CentOS 7 server. Read now & Enjoy this fast distributed database system!\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-cassandra-centos-7\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-cassandra-centos-7\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-cassandra-centos-7\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install Cassandra on CentOS 7\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/#website\",\"url\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/\",\"name\":\"Globo.Tech\",\"description\":\"Welcome to the Official Globo.Tech Learning Center\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/#\\\/schema\\\/person\\\/e17784b37f4a4f49b7bc611847912e87\",\"name\":\"GloboTech Communications\",\"sameAs\":[\"http:\\\/\\\/www.gtcomm.net\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install Cassandra on CentOS 7 - Globo.Tech","description":"This tutorial will show you how to install Cassandra on your CentOS 7 server. Read now & Enjoy this fast distributed database system!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.globo.tech\/learning-center\/install-cassandra-centos-7\/","og_locale":"en_US","og_type":"article","og_title":"How to Install Cassandra on CentOS 7 - Globo.Tech","og_description":"This tutorial will show you how to install Cassandra on your CentOS 7 server. Read now & Enjoy this fast distributed database system!","og_url":"https:\/\/www.globo.tech\/learning-center\/install-cassandra-centos-7\/","og_site_name":"Globo.Tech","article_published_time":"2016-10-27T20:44:41+00:00","article_modified_time":"2017-11-24T23:05:39+00:00","og_image":[{"width":1920,"height":963,"url":"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2016\/09\/GloboTech-Logo.png","type":"image\/png"}],"author":"GloboTech Communications","twitter_misc":{"Written by":"GloboTech Communications","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.globo.tech\/learning-center\/install-cassandra-centos-7\/#article","isPartOf":{"@id":"https:\/\/www.globo.tech\/learning-center\/install-cassandra-centos-7\/"},"author":{"name":"GloboTech Communications","@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87"},"headline":"How to Install Cassandra on CentOS 7","datePublished":"2016-10-27T20:44:41+00:00","dateModified":"2017-11-24T23:05:39+00:00","mainEntityOfPage":{"@id":"https:\/\/www.globo.tech\/learning-center\/install-cassandra-centos-7\/"},"wordCount":404,"commentCount":0,"articleSection":["Database"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.globo.tech\/learning-center\/install-cassandra-centos-7\/","url":"https:\/\/www.globo.tech\/learning-center\/install-cassandra-centos-7\/","name":"How to Install Cassandra on CentOS 7 - Globo.Tech","isPartOf":{"@id":"https:\/\/www.globo.tech\/learning-center\/#website"},"datePublished":"2016-10-27T20:44:41+00:00","dateModified":"2017-11-24T23:05:39+00:00","author":{"@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87"},"description":"This tutorial will show you how to install Cassandra on your CentOS 7 server. Read now & Enjoy this fast distributed database system!","breadcrumb":{"@id":"https:\/\/www.globo.tech\/learning-center\/install-cassandra-centos-7\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.globo.tech\/learning-center\/install-cassandra-centos-7\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.globo.tech\/learning-center\/install-cassandra-centos-7\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.globo.tech\/learning-center\/"},{"@type":"ListItem","position":2,"name":"How to Install Cassandra on CentOS 7"}]},{"@type":"WebSite","@id":"https:\/\/www.globo.tech\/learning-center\/#website","url":"https:\/\/www.globo.tech\/learning-center\/","name":"Globo.Tech","description":"Welcome to the Official Globo.Tech Learning Center","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.globo.tech\/learning-center\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87","name":"GloboTech Communications","sameAs":["http:\/\/www.gtcomm.net"]}]}},"_links":{"self":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/3144","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/comments?post=3144"}],"version-history":[{"count":4,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/3144\/revisions"}],"predecessor-version":[{"id":3901,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/3144\/revisions\/3901"}],"wp:attachment":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/media?parent=3144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/categories?post=3144"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/tags?post=3144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}