{"id":2331,"date":"2016-07-28T17:20:06","date_gmt":"2016-07-28T21:20:06","guid":{"rendered":"https:\/\/www.globo.tech\/learning-center\/?p=2331"},"modified":"2017-11-24T13:11:08","modified_gmt":"2017-11-24T18:11:08","slug":"install-redis-centos-7","status":"publish","type":"post","link":"https:\/\/www.globo.tech\/learning-center\/install-redis-centos-7\/","title":{"rendered":"How to Install and Configure Redis on CentOS 7"},"content":{"rendered":"<h1>How to Install and Configure Redis on CentOS 7<\/h1>\n<div class=\"row\">\n<div class=\"col-lg-10\">\n<p>Redis\u00ae is a light, fast, configurable key-value store with a wide array of features. Publish-subscribe capabilities transform it into a simple message bus, while custom commands and extensibility make it suitable for new use cases. Rich data structures make it ideal for storing data from simple strings and numbers, to complex hashes and sets. The store can be queried in a variety of ways, and can be replicated across machines for high availability of your data. Data is stored in memory by default, but can also be persisted to disk in cases where durability is more critical than speed. If you&#8217;re looking for a simple data store or message queue, then Redis may be worth investigating.<\/p>\n<\/div>\n<div class=\"col-lg-2\">\n<a rel=\"nofollow\" href=\"https:\/\/en.wikipedia.org\/wiki\/Key-value_database\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/5\/5b\/KeyValue.PNG\"><\/a>\n<\/div>\n<\/div>\n<h2>Getting Started<\/h2>\n<p>To complete this guide, you will need the following:<br \/>\n\u2022 1 Node (<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 a clean installation of CentOS 7<\/p>\n<p>When finished, Redis will be installed with a good configuration in place to get you started.<\/p>\n<h2>Tutorial<\/h2>\n<p>Let&#8217;s start by updating your CentOS installation. This step should be performed on a regular basis, and pulls in any currently available bugfixes and security patches.<\/p>\n<p><code>yum -y update<\/code><\/p>\n<p>Redis is shipped in its own custom RPM repository. We need to install the repo in order to fetch the Redis packages.<\/p>\n<p><code>yum -y install epel-release<\/code><\/p>\n<p>Now we&#8217;ll install the Redis server package.<\/p>\n<p><code>yum install redis<\/code><\/p>\n<p>It is now necessary to configure Redis. We&#8217;ll open up its default configuration file to ensure that Redis is bound to the local IP. Unless you are running a full Redis cluster, which is beyond the scope of this guide, this is the best way to secure your Redis store from unauthorized access.<\/p>\n<p><code>nano \/etc\/redis.conf<\/code><\/p>\n<p>Search for the line that begins with &#8220;bind&#8221;, changing it as follows:<\/p>\n<p><code class=\"gris\">bind 127.0.0.1<\/code><\/p>\n<p>Having done this, we now start the Redis server.<\/p>\n<p><code>systemctl start redis.service<\/code><\/p>\n<p>With Redis running, we must also enable it to launch on boot. Without this step, you&#8217;ll need to manually restart Redis every time your server reboots.<\/p>\n<p><code>systemctl enable redis.service<\/code><\/p>\n<p>Redis should now be operational. To test, we&#8217;ll connect locally and enter some data.<\/p>\n<p><code class=\"gris\">root@redis-node:~# redis-cli<br \/>\n127.0.0.1:6379> set besthost \"Globo.Tech\"<br \/>\nOK<br \/>\n127.0.0.1:6379> get besthost<br \/>\n\"Globo.Tech\"<\/code><\/p>\n<p>Your data is now persisting, and can be subsequently retrieved.<\/p>\n<h2>Conclusion<\/h2>\n<p>Redis is now installed, securely configured, and set to launch on boot. You can now begin integrating it into your applications, or clustering it for high availability of your data. If this guide was helpful to you, kindly share it with others who may also be interested. <\/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 and Configure Redis on CentOS 7 Redis\u00ae is a light, fast, configurable key-value store with a wide array of features. Publish-subscribe capabilities transform it into a simple message bus, while custom commands and extensibility make it suitable for new use cases. Rich data structures make it ideal for storing data from simple<!-- 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":[75],"tags":[],"class_list":["post-2331","post","type-post","status-publish","format-standard","hentry","category-ha-clustering","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 and Configure Redis on CentOS 7 - Globo.Tech<\/title>\n<meta name=\"description\" content=\"This tutorial will show you how to install and configure Redis on your CentOS 7 server. Read now &amp; Enjoy this light, fast, configurable key-value store.\" \/>\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-redis-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 and Configure Redis on CentOS 7 - Globo.Tech\" \/>\n<meta property=\"og:description\" content=\"This tutorial will show you how to install and configure Redis on your CentOS 7 server. Read now &amp; Enjoy this light, fast, configurable key-value store.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.globo.tech\/learning-center\/install-redis-centos-7\/\" \/>\n<meta property=\"og:site_name\" content=\"Globo.Tech\" \/>\n<meta property=\"article:published_time\" content=\"2016-07-28T21:20:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-11-24T18:11:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/5\/5b\/KeyValue.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=\"2 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-redis-centos-7\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-redis-centos-7\\\/\"},\"author\":{\"name\":\"GloboTech Communications\",\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/#\\\/schema\\\/person\\\/e17784b37f4a4f49b7bc611847912e87\"},\"headline\":\"How to Install and Configure Redis on CentOS 7\",\"datePublished\":\"2016-07-28T21:20:06+00:00\",\"dateModified\":\"2017-11-24T18:11:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-redis-centos-7\\\/\"},\"wordCount\":405,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-redis-centos-7\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/upload.wikimedia.org\\\/wikipedia\\\/commons\\\/5\\\/5b\\\/KeyValue.PNG\",\"articleSection\":[\"HA &amp; Clustering\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-redis-centos-7\\\/\",\"url\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-redis-centos-7\\\/\",\"name\":\"How to Install and Configure Redis on CentOS 7 - Globo.Tech\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-redis-centos-7\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-redis-centos-7\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/upload.wikimedia.org\\\/wikipedia\\\/commons\\\/5\\\/5b\\\/KeyValue.PNG\",\"datePublished\":\"2016-07-28T21:20:06+00:00\",\"dateModified\":\"2017-11-24T18:11:08+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/#\\\/schema\\\/person\\\/e17784b37f4a4f49b7bc611847912e87\"},\"description\":\"This tutorial will show you how to install and configure Redis on your CentOS 7 server. Read now & Enjoy this light, fast, configurable key-value store.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-redis-centos-7\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-redis-centos-7\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-redis-centos-7\\\/#primaryimage\",\"url\":\"https:\\\/\\\/upload.wikimedia.org\\\/wikipedia\\\/commons\\\/5\\\/5b\\\/KeyValue.PNG\",\"contentUrl\":\"https:\\\/\\\/upload.wikimedia.org\\\/wikipedia\\\/commons\\\/5\\\/5b\\\/KeyValue.PNG\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-redis-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 and Configure Redis 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 and Configure Redis on CentOS 7 - Globo.Tech","description":"This tutorial will show you how to install and configure Redis on your CentOS 7 server. Read now & Enjoy this light, fast, configurable key-value store.","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-redis-centos-7\/","og_locale":"en_US","og_type":"article","og_title":"How to Install and Configure Redis on CentOS 7 - Globo.Tech","og_description":"This tutorial will show you how to install and configure Redis on your CentOS 7 server. Read now & Enjoy this light, fast, configurable key-value store.","og_url":"https:\/\/www.globo.tech\/learning-center\/install-redis-centos-7\/","og_site_name":"Globo.Tech","article_published_time":"2016-07-28T21:20:06+00:00","article_modified_time":"2017-11-24T18:11:08+00:00","og_image":[{"url":"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/5\/5b\/KeyValue.PNG","type":"","width":"","height":""}],"author":"GloboTech Communications","twitter_misc":{"Written by":"GloboTech Communications","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.globo.tech\/learning-center\/install-redis-centos-7\/#article","isPartOf":{"@id":"https:\/\/www.globo.tech\/learning-center\/install-redis-centos-7\/"},"author":{"name":"GloboTech Communications","@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87"},"headline":"How to Install and Configure Redis on CentOS 7","datePublished":"2016-07-28T21:20:06+00:00","dateModified":"2017-11-24T18:11:08+00:00","mainEntityOfPage":{"@id":"https:\/\/www.globo.tech\/learning-center\/install-redis-centos-7\/"},"wordCount":405,"commentCount":0,"image":{"@id":"https:\/\/www.globo.tech\/learning-center\/install-redis-centos-7\/#primaryimage"},"thumbnailUrl":"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/5\/5b\/KeyValue.PNG","articleSection":["HA &amp; Clustering"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.globo.tech\/learning-center\/install-redis-centos-7\/","url":"https:\/\/www.globo.tech\/learning-center\/install-redis-centos-7\/","name":"How to Install and Configure Redis on CentOS 7 - Globo.Tech","isPartOf":{"@id":"https:\/\/www.globo.tech\/learning-center\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.globo.tech\/learning-center\/install-redis-centos-7\/#primaryimage"},"image":{"@id":"https:\/\/www.globo.tech\/learning-center\/install-redis-centos-7\/#primaryimage"},"thumbnailUrl":"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/5\/5b\/KeyValue.PNG","datePublished":"2016-07-28T21:20:06+00:00","dateModified":"2017-11-24T18:11:08+00:00","author":{"@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87"},"description":"This tutorial will show you how to install and configure Redis on your CentOS 7 server. Read now & Enjoy this light, fast, configurable key-value store.","breadcrumb":{"@id":"https:\/\/www.globo.tech\/learning-center\/install-redis-centos-7\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.globo.tech\/learning-center\/install-redis-centos-7\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.globo.tech\/learning-center\/install-redis-centos-7\/#primaryimage","url":"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/5\/5b\/KeyValue.PNG","contentUrl":"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/5\/5b\/KeyValue.PNG"},{"@type":"BreadcrumbList","@id":"https:\/\/www.globo.tech\/learning-center\/install-redis-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 and Configure Redis 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\/2331","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=2331"}],"version-history":[{"count":7,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/2331\/revisions"}],"predecessor-version":[{"id":3816,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/2331\/revisions\/3816"}],"wp:attachment":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/media?parent=2331"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/categories?post=2331"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/tags?post=2331"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}