{"id":9156,"date":"2020-08-06T06:44:09","date_gmt":"2020-08-06T03:44:09","guid":{"rendered":"https:\/\/unihost.com\/help\/?p=9156"},"modified":"2023-01-19T14:00:07","modified_gmt":"2023-01-19T11:00:07","slug":"how-to-install-and-configure-redis","status":"publish","type":"post","link":"https:\/\/unihost.com\/help\/how-to-install-and-configure-redis\/","title":{"rendered":"How to install and configure Redis"},"content":{"rendered":"<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">This article provides information on how to install and configure Redis for your dedicated server using the example of Ubuntu 18.04.4 LTS distribution.<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><!--more--><\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">Redis is an in-memory remote database that provides high performance, replication, and a custom data model to create a platform for problem solving. Redis is an open source (BSD licensed), in-memory data structure used as a database, cache, and message broker. It is classified as a NoSQL key value store.<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">Let&#8217;s start installing and configuring.<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">You need to update the repository and install Redis:<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">apt-get update &amp;&amp; apt-get upgrade<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">apt install redis-server<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">Next, you need to open the configuration file located at the path \/etc\/redis\/redis.conf and make some changes:<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">1 . you need to find and uncomment the line, while changing the directive that allows you to declare an init system to manage Redis as a service. In the case of Ubuntu, this is systemd<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-9157 aligncenter\" src=\"https:\/\/unihost.com\/help\/minio.php?.\/redis1.png\" alt=\"How to install and configure Redis - Image 1\" width=\"300\" height=\"115\" \/ title=\"How to install and configure Redis - Image 1\"><\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">2. checking localhost binding:<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-9161 aligncenter\" src=\"https:\/\/unihost.com\/help\/minio.php?.\/redis22.png\" alt=\"How to install and configure Redis - Image 2\" width=\"300\" height=\"115\" \/ title=\"How to install and configure Redis - Image 2\"><\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">3. adding client authentication for database access:<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">need to uncomment the following line requirepass foobared and replace foobared with a strong password<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-9159 aligncenter\" src=\"https:\/\/unihost.com\/help\/minio.php?.\/redis2.png\" alt=\"How to install and configure Redis - Image 3\" width=\"300\" height=\"136\" \/ title=\"How to install and configure Redis - Image 3\"><\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">After finishing editing, you need to restart the service:<\/span><\/p>\n<pre><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">systemctl restart redis.service<\/span><\/pre>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">Now we can test Redis using the command line client:<\/span><\/p>\n<pre><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">redis-cli<\/span><\/pre>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">If you try to enter the command, the service will require authentication using the previously set password, after which you can check the standard procedure for installing and extracting the key for the object:<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-9163 aligncenter\" src=\"https:\/\/unihost.com\/help\/minio.php?.\/redis3.png\" alt=\"How to install and configure Redis - Image 4\" width=\"300\" height=\"120\" \/ title=\"How to install and configure Redis - Image 4\"><\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">This completes the installation and initial configuration of the Redis service.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article provides information on how to install and configure Redis for your dedicated server using the example of Ubuntu 18.04.4 LTS distribution.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[158],"tags":[],"class_list":["post-9156","post","type-post","status-publish","format-standard","hentry","category-dedicated-servers"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to install and configure Redis - Unihost.FAQ<\/title>\n<meta name=\"description\" content=\"This article provides information on how to install and configure Redis for your dedicated server using the example of Ubuntu 18\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/unihost.com\/help\/how-to-install-and-configure-redis\/\" \/>\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 - Unihost.FAQ\" \/>\n<meta property=\"og:description\" content=\"This article provides information on how to install and configure Redis for your dedicated server using the example of Ubuntu 18\" \/>\n<meta property=\"og:url\" content=\"https:\/\/unihost.com\/help\/how-to-install-and-configure-redis\/\" \/>\n<meta property=\"og:site_name\" content=\"Unihost.FAQ\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/unihost\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-08-06T03:44:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-19T11:00:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/unihost.com\/help\/wp-content\/uploads\/redis1-300x115.png\" \/>\n<meta name=\"author\" content=\"Unihost Support\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@unihost\" \/>\n<meta name=\"twitter:site\" content=\"@unihost\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Unihost Support\" \/>\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:\/\/unihost.com\/help\/how-to-install-and-configure-redis\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/unihost.com\/help\/how-to-install-and-configure-redis\/\"},\"author\":{\"name\":\"Unihost Support\",\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a\"},\"headline\":\"How to install and configure Redis\",\"datePublished\":\"2020-08-06T03:44:09+00:00\",\"dateModified\":\"2023-01-19T11:00:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/unihost.com\/help\/how-to-install-and-configure-redis\/\"},\"wordCount\":244,\"publisher\":{\"@id\":\"https:\/\/unihost.com\/help\/#organization\"},\"image\":{\"@id\":\"https:\/\/unihost.com\/help\/how-to-install-and-configure-redis\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/unihost.com\/help\/wp-content\/uploads\/redis1-300x115.png\",\"articleSection\":[\"02. Dedicated servers\"],\"inLanguage\":\"en\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/unihost.com\/help\/how-to-install-and-configure-redis\/\",\"url\":\"https:\/\/unihost.com\/help\/how-to-install-and-configure-redis\/\",\"name\":\"How to install and configure Redis - Unihost.FAQ\",\"isPartOf\":{\"@id\":\"https:\/\/unihost.com\/help\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/unihost.com\/help\/how-to-install-and-configure-redis\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/unihost.com\/help\/how-to-install-and-configure-redis\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/unihost.com\/help\/wp-content\/uploads\/redis1-300x115.png\",\"datePublished\":\"2020-08-06T03:44:09+00:00\",\"dateModified\":\"2023-01-19T11:00:07+00:00\",\"description\":\"This article provides information on how to install and configure Redis for your dedicated server using the example of Ubuntu 18\",\"breadcrumb\":{\"@id\":\"https:\/\/unihost.com\/help\/how-to-install-and-configure-redis\/#breadcrumb\"},\"inLanguage\":\"en\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/unihost.com\/help\/how-to-install-and-configure-redis\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\/\/unihost.com\/help\/how-to-install-and-configure-redis\/#primaryimage\",\"url\":\"https:\/\/unihost.com\/help\/minio.php?.\/redis1.png\",\"contentUrl\":\"https:\/\/unihost.com\/help\/minio.php?.\/redis1.png\",\"width\":728,\"height\":278},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/unihost.com\/help\/how-to-install-and-configure-redis\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Unihost\",\"item\":\"https:\/\/unihost.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Help\",\"item\":\"https:\/\/unihost.com\/help\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to install and configure Redis\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/unihost.com\/help\/#website\",\"url\":\"https:\/\/unihost.com\/help\/\",\"name\":\"Unihost.FAQ\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/unihost.com\/help\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/unihost.com\/help\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/unihost.com\/help\/#organization\",\"name\":\"Unihost\",\"alternateName\":\"Unihost\",\"url\":\"https:\/\/unihost.com\/help\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png\",\"contentUrl\":\"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png\",\"width\":300,\"height\":300,\"caption\":\"Unihost\"},\"image\":{\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/unihost\/\",\"https:\/\/x.com\/unihost\",\"https:\/\/www.instagram.com\/unihost\/?hl=en\",\"https:\/\/www.linkedin.com\/company\/unihost-com\",\"https:\/\/www.youtube.com\/channel\/UCITKsxMDnslQY8brN3advgw\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a\",\"name\":\"Unihost Support\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g\",\"caption\":\"Unihost Support\"},\"sameAs\":[\"https:\/\/unihost.com\/\"],\"url\":\"https:\/\/unihost.com\/help\/author\/support\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to install and configure Redis - Unihost.FAQ","description":"This article provides information on how to install and configure Redis for your dedicated server using the example of Ubuntu 18","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:\/\/unihost.com\/help\/how-to-install-and-configure-redis\/","og_locale":"en_US","og_type":"article","og_title":"How to install and configure Redis - Unihost.FAQ","og_description":"This article provides information on how to install and configure Redis for your dedicated server using the example of Ubuntu 18","og_url":"https:\/\/unihost.com\/help\/how-to-install-and-configure-redis\/","og_site_name":"Unihost.FAQ","article_publisher":"https:\/\/www.facebook.com\/unihost\/","article_published_time":"2020-08-06T03:44:09+00:00","article_modified_time":"2023-01-19T11:00:07+00:00","og_image":[{"url":"https:\/\/unihost.com\/help\/wp-content\/uploads\/redis1-300x115.png","type":"","width":"","height":""}],"author":"Unihost Support","twitter_card":"summary_large_image","twitter_creator":"@unihost","twitter_site":"@unihost","twitter_misc":{"Written by":"Unihost Support","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/unihost.com\/help\/how-to-install-and-configure-redis\/#article","isPartOf":{"@id":"https:\/\/unihost.com\/help\/how-to-install-and-configure-redis\/"},"author":{"name":"Unihost Support","@id":"https:\/\/unihost.com\/help\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a"},"headline":"How to install and configure Redis","datePublished":"2020-08-06T03:44:09+00:00","dateModified":"2023-01-19T11:00:07+00:00","mainEntityOfPage":{"@id":"https:\/\/unihost.com\/help\/how-to-install-and-configure-redis\/"},"wordCount":244,"publisher":{"@id":"https:\/\/unihost.com\/help\/#organization"},"image":{"@id":"https:\/\/unihost.com\/help\/how-to-install-and-configure-redis\/#primaryimage"},"thumbnailUrl":"https:\/\/unihost.com\/help\/wp-content\/uploads\/redis1-300x115.png","articleSection":["02. Dedicated servers"],"inLanguage":"en"},{"@type":"WebPage","@id":"https:\/\/unihost.com\/help\/how-to-install-and-configure-redis\/","url":"https:\/\/unihost.com\/help\/how-to-install-and-configure-redis\/","name":"How to install and configure Redis - Unihost.FAQ","isPartOf":{"@id":"https:\/\/unihost.com\/help\/#website"},"primaryImageOfPage":{"@id":"https:\/\/unihost.com\/help\/how-to-install-and-configure-redis\/#primaryimage"},"image":{"@id":"https:\/\/unihost.com\/help\/how-to-install-and-configure-redis\/#primaryimage"},"thumbnailUrl":"https:\/\/unihost.com\/help\/wp-content\/uploads\/redis1-300x115.png","datePublished":"2020-08-06T03:44:09+00:00","dateModified":"2023-01-19T11:00:07+00:00","description":"This article provides information on how to install and configure Redis for your dedicated server using the example of Ubuntu 18","breadcrumb":{"@id":"https:\/\/unihost.com\/help\/how-to-install-and-configure-redis\/#breadcrumb"},"inLanguage":"en","potentialAction":[{"@type":"ReadAction","target":["https:\/\/unihost.com\/help\/how-to-install-and-configure-redis\/"]}]},{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/unihost.com\/help\/how-to-install-and-configure-redis\/#primaryimage","url":"https:\/\/unihost.com\/help\/minio.php?.\/redis1.png","contentUrl":"https:\/\/unihost.com\/help\/minio.php?.\/redis1.png","width":728,"height":278},{"@type":"BreadcrumbList","@id":"https:\/\/unihost.com\/help\/how-to-install-and-configure-redis\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Unihost","item":"https:\/\/unihost.com\/"},{"@type":"ListItem","position":2,"name":"Help","item":"https:\/\/unihost.com\/help\/"},{"@type":"ListItem","position":3,"name":"How to install and configure Redis"}]},{"@type":"WebSite","@id":"https:\/\/unihost.com\/help\/#website","url":"https:\/\/unihost.com\/help\/","name":"Unihost.FAQ","description":"","publisher":{"@id":"https:\/\/unihost.com\/help\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/unihost.com\/help\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en"},{"@type":"Organization","@id":"https:\/\/unihost.com\/help\/#organization","name":"Unihost","alternateName":"Unihost","url":"https:\/\/unihost.com\/help\/","logo":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/unihost.com\/help\/#\/schema\/logo\/image\/","url":"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png","contentUrl":"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png","width":300,"height":300,"caption":"Unihost"},"image":{"@id":"https:\/\/unihost.com\/help\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/unihost\/","https:\/\/x.com\/unihost","https:\/\/www.instagram.com\/unihost\/?hl=en","https:\/\/www.linkedin.com\/company\/unihost-com","https:\/\/www.youtube.com\/channel\/UCITKsxMDnslQY8brN3advgw"]},{"@type":"Person","@id":"https:\/\/unihost.com\/help\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a","name":"Unihost Support","image":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/unihost.com\/help\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g","caption":"Unihost Support"},"sameAs":["https:\/\/unihost.com\/"],"url":"https:\/\/unihost.com\/help\/author\/support\/"}]}},"_links":{"self":[{"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/posts\/9156","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/comments?post=9156"}],"version-history":[{"count":3,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/posts\/9156\/revisions"}],"predecessor-version":[{"id":11445,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/posts\/9156\/revisions\/11445"}],"wp:attachment":[{"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/media?parent=9156"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/categories?post=9156"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/tags?post=9156"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}