{"id":3135,"date":"2016-10-21T18:58:37","date_gmt":"2016-10-21T22:58:37","guid":{"rendered":"https:\/\/www.globo.tech\/learning-center\/?p=3135"},"modified":"2017-11-24T18:02:52","modified_gmt":"2017-11-24T23:02:52","slug":"install-cassandra-ubuntu-16","status":"publish","type":"post","link":"https:\/\/www.globo.tech\/learning-center\/install-cassandra-ubuntu-16\/","title":{"rendered":"How to Install Cassandra on Ubuntu 16"},"content":{"rendered":"<h1>How to Install Cassandra on Ubuntu 16<\/h1>\n<p>Cassandra is an open-source non-relational database management system. It was designed to be used with lots of redundancy, and it can be split up onto multiple machines so that if one part fails, the other parts continue to with little to no interruption to users. Ubuntu is a great operating system to host on as it won&#8217;t bog down the system. Even if the command line scares you at first, It&#8217;s not that hard to install. This article will guide you on how to install Apache Cassandra on Ubuntu 16.04 Server LTS.<\/p>\n<h2>Getting Started<\/h2>\n<p>To complete this guide, you will need the following:<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>) running Ubuntu 16.<br \/>\n\u2022 Root access<\/p>\n<p>Gaining root permission is simple and prevents bugs from popping up during installation. Just make sure to exit out of the root when you&#8217;re done with setup.<\/p>\n<h2>Tutorial<\/h2>\n<p><strong>Install Java<\/strong><br \/>\nFirst we need to make sure that Java is installed, so add the repository. Repositories are basically groups or lists of programs that are useful together, and adding a repository is the best way to get a program. You may get a warning to use Java 8 instead of 9; don&#8217;t worry, continue on.<\/p>\n<p><code>add-apt-repository ppa:webupd8team\/java<\/code><\/p>\n<p>After that&#8217;s added, update the list of repositories. <\/p>\n<p><code>apt-get update<\/code><\/p>\n<p>Install Java. Answer yes if you get a confirmation for storage and accept the license terms. Installing might take a few moments depending on your computer&#8217;s speed.<\/p>\n<p><code>apt-get install oracle-java8-set-default<\/code><\/p>\n<p>Confirm your version of Java. At the time of writing, the latest stable version is 1.8.<\/p>\n<p><code>java -version<\/code><\/p>\n<p><code class=\"gris\">java version \"1.8.0_101\"<br \/>\nJava(TM) SE Runtime Environment (build 1.8.0_101-b13)<br \/>\nJava HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)<\/code><\/p>\n<p><strong>Install Cassandra<\/strong><\/p>\n<p>Just like with Java, we need to add the repository. Since these are protected files, you need to provide your email and password associated with Datastax. Depending on your exact computer setup, you may need to add a backslash (\\) to parts of your email with special characters. Instead of<br \/>\n\u201cMa!lLover@Globo.Tech,\u201d it would be \u201cMa\\!lLover@Globo.Tech\u201d. You might also have to replace \u201c@\u201d with \u201c%40\u201d.<\/p>\n<p><code>echo \"deb http:\/\/debian.datastax.com\/community stable main\" | sudo tee -a \/etc\/apt\/sources.list.d\/cassandra.sources.list<\/code><\/p>\n<p>Also add the repository key to get past the extra layer of security.<\/p>\n<p><code>curl -L http:\/\/debian.datastax.com\/debian\/repo_key | sudo apt-key add -<\/code><\/p>\n<p>Update your list a third time and install Casandra the same way as the last two.<\/p>\n<p><code>apt-get update<br \/>\napt-get install cassandra -y<\/code><\/p>\n<p>Start Cassandra up and configure it to your liking. You&#8217;ll most likely want to enable it to start on boot. In case of a power outage or maintenance, you won&#8217;t forget to start it back up after a reboot. <\/p>\n<p><code>systemctl start cassandra<br \/>\nsystemctl enable cassandra<\/code><\/p>\n<p>Cassandra uses a separate command line to be controlled, so we need to make sure to activate that.<\/p>\n<p><code>[root@cassandra ~]# cqlsh<br \/>\nConnected to Test Cluster at 127.0.0.1:9042.<br \/>\n[cqlsh 5.0.1 | Cassandra 3.0.8 | CQL spec 3.4.0 | Native protocol v4]<br \/>\nUse HELP for help.<br \/>\ncqlsh><\/code><\/p>\n<p>You may want to check information about the node and cluster to get an idea of how to fix various issues or update information. You can do that using the &#8220;nodetool&#8221; command:<\/p>\n<p><code class=\"gris\">[root@cassandra ~] nodetool status<br \/>\nDatacenter: 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  222.14 KB  256          100.0%            2a0b7fa9-23c6-40d3-83a4-e6c06e2f5736  rack1<br \/>\n[root@cassandra ~]#<\/code><\/p>\n<h2>Conclusion<\/h2>\n<p>You should now have Java and Cassandra installed and ready to use. Make sure to share this guide with others looking for help. <\/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 Ubuntu 16 Cassandra is an open-source non-relational database management system. It was designed to be used with lots of redundancy, and it can be split up onto multiple machines so that if one part fails, the other parts continue to with little to no interruption to users. Ubuntu is a<!-- 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-3135","post","type-post","status-publish","format-standard","hentry","category-database","operating_system-ubuntu-16-04"],"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 Ubuntu 16 - Globo.Tech<\/title>\n<meta name=\"description\" content=\"This tutorial will show you how to install Cassandra on your Ubuntu 16 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-ubuntu-16\/\" \/>\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 Ubuntu 16 - Globo.Tech\" \/>\n<meta property=\"og:description\" content=\"This tutorial will show you how to install Cassandra on your Ubuntu 16 server. Read now &amp; Enjoy this fast distributed database system!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.globo.tech\/learning-center\/install-cassandra-ubuntu-16\/\" \/>\n<meta property=\"og:site_name\" content=\"Globo.Tech\" \/>\n<meta property=\"article:published_time\" content=\"2016-10-21T22:58:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-11-24T23:02:52+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-ubuntu-16\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-cassandra-ubuntu-16\\\/\"},\"author\":{\"name\":\"GloboTech Communications\",\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/#\\\/schema\\\/person\\\/e17784b37f4a4f49b7bc611847912e87\"},\"headline\":\"How to Install Cassandra on Ubuntu 16\",\"datePublished\":\"2016-10-21T22:58:37+00:00\",\"dateModified\":\"2017-11-24T23:02:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-cassandra-ubuntu-16\\\/\"},\"wordCount\":475,\"commentCount\":1,\"articleSection\":[\"Database\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-cassandra-ubuntu-16\\\/\",\"url\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-cassandra-ubuntu-16\\\/\",\"name\":\"How to Install Cassandra on Ubuntu 16 - Globo.Tech\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/#website\"},\"datePublished\":\"2016-10-21T22:58:37+00:00\",\"dateModified\":\"2017-11-24T23:02:52+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 Ubuntu 16 server. Read now & Enjoy this fast distributed database system!\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-cassandra-ubuntu-16\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-cassandra-ubuntu-16\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-cassandra-ubuntu-16\\\/#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 Ubuntu 16\"}]},{\"@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 Ubuntu 16 - Globo.Tech","description":"This tutorial will show you how to install Cassandra on your Ubuntu 16 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-ubuntu-16\/","og_locale":"en_US","og_type":"article","og_title":"How to Install Cassandra on Ubuntu 16 - Globo.Tech","og_description":"This tutorial will show you how to install Cassandra on your Ubuntu 16 server. Read now & Enjoy this fast distributed database system!","og_url":"https:\/\/www.globo.tech\/learning-center\/install-cassandra-ubuntu-16\/","og_site_name":"Globo.Tech","article_published_time":"2016-10-21T22:58:37+00:00","article_modified_time":"2017-11-24T23:02:52+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-ubuntu-16\/#article","isPartOf":{"@id":"https:\/\/www.globo.tech\/learning-center\/install-cassandra-ubuntu-16\/"},"author":{"name":"GloboTech Communications","@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87"},"headline":"How to Install Cassandra on Ubuntu 16","datePublished":"2016-10-21T22:58:37+00:00","dateModified":"2017-11-24T23:02:52+00:00","mainEntityOfPage":{"@id":"https:\/\/www.globo.tech\/learning-center\/install-cassandra-ubuntu-16\/"},"wordCount":475,"commentCount":1,"articleSection":["Database"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.globo.tech\/learning-center\/install-cassandra-ubuntu-16\/","url":"https:\/\/www.globo.tech\/learning-center\/install-cassandra-ubuntu-16\/","name":"How to Install Cassandra on Ubuntu 16 - Globo.Tech","isPartOf":{"@id":"https:\/\/www.globo.tech\/learning-center\/#website"},"datePublished":"2016-10-21T22:58:37+00:00","dateModified":"2017-11-24T23:02:52+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 Ubuntu 16 server. Read now & Enjoy this fast distributed database system!","breadcrumb":{"@id":"https:\/\/www.globo.tech\/learning-center\/install-cassandra-ubuntu-16\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.globo.tech\/learning-center\/install-cassandra-ubuntu-16\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.globo.tech\/learning-center\/install-cassandra-ubuntu-16\/#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 Ubuntu 16"}]},{"@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\/3135","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=3135"}],"version-history":[{"count":2,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/3135\/revisions"}],"predecessor-version":[{"id":3898,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/3135\/revisions\/3898"}],"wp:attachment":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/media?parent=3135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/categories?post=3135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/tags?post=3135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}