{"id":6033,"date":"2021-09-20T17:05:35","date_gmt":"2021-09-20T17:05:35","guid":{"rendered":"https:\/\/www.geekdecoder.com\/?p=6033"},"modified":"2021-09-20T17:05:35","modified_gmt":"2021-09-20T17:05:35","slug":"how-to-install-and-secure-redis-on-ubuntu","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2021\/09\/20\/how-to-install-and-secure-redis-on-ubuntu\/","title":{"rendered":"How To Install and Secure Redis on Ubuntu"},"content":{"rendered":"<p>In order to get the latest version of Redis, we will use apt to install it from the official Ubuntu repositories.<\/p>\n<p>Update your local apt package cache and install Redis by typing:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ sudo apt update\n$ sudo apt install redis-server\n<\/pre>\n<p>This will download and install Redis and its dependencies. <\/p>\n<p>If on A regular Ubuntu distribution, change the configuration for the server to run as a service.<\/p>\n<p>Open this file with your preferred text editor:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ sudo nano \/etc\/redis\/redis.conf\n<\/pre>\n<p>Change the following:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nsupervised no\n<\/pre>\n<p>Change as below.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nsupervised systemd\n<\/pre>\n<p>Restart<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# sudo systemctl restart redis.service\n<\/pre>\n<p>On WSL ubuntu:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nsudo \/etc\/init.d\/redis-server restart\n<\/pre>\n<p>Start by checking that the Redis service is running:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ sudo systemctl status redis\n<\/pre>\n<p>on WSL ubuntu<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ sudo \/etc\/init.d\/redis-server status\n* redis-server is running\n<\/pre>\n<p>To test that Redis is functioning correctly, connect to the server using the command-line client:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ redis-cli\n<\/pre>\n<p>In the prompt that follows, test connectivity with the ping command:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n127.0.0.1:6379&gt;ping\nPONG\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>In order to get the latest version of Redis, we will use apt to install it from the official Ubuntu repositories. Update your local apt package cache and install Redis by typing: $ sudo apt update $ sudo apt install redis-server This will download and install Redis and its dependencies. If on A regular Ubuntu &#8230; <a title=\"How To Install and Secure Redis on Ubuntu\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2021\/09\/20\/how-to-install-and-secure-redis-on-ubuntu\/\" aria-label=\"Read more about How To Install and Secure Redis on Ubuntu\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[95],"tags":[],"class_list":["post-6033","post","type-post","status-publish","format-standard","hentry","category-redis"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/6033","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=6033"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/6033\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=6033"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=6033"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=6033"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}