{"id":5560,"date":"2016-01-10T10:07:34","date_gmt":"2016-01-10T02:07:34","guid":{"rendered":"http:\/\/rmohan.com\/?p=5560"},"modified":"2016-01-10T23:39:34","modified_gmt":"2016-01-10T15:39:34","slug":"how-to-install-redis-server-on-centos-7-rhel-7","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=5560","title":{"rendered":"How to install redis server on CentOS 7 \/ RHEL 7"},"content":{"rendered":"<p>How to install redis server on CentOS 7 \/ RHEL 7<\/p>\n<p>wget -r &#8211;no-parent -A &#8216;epel-release-*.rpm&#8217; http:\/\/dl.fedoraproject.org\/pub\/epel\/7\/x86_64\/e\/<br \/>\nrpm -Uvh dl.fedoraproject.org\/pub\/epel\/7\/x86_64\/e\/epel-release-*.rpm<\/p>\n<p>or<\/p>\n<p>yum install epel-release<\/p>\n<p>install redis server<\/p>\n<p>Now use yum command to install redis server<\/p>\n<p>yum install redis<\/p>\n<p>Two important redis server configuration file\u2019s path<br \/>\n1. \/etc\/redis.conf<br \/>\n2. \/etc\/redis-sentinel.conf<\/p>\n<p>To start redis server<\/p>\n<p>systemctl start redis.service<br \/>\nTo stop redis server<\/p>\n<p>systemctl stop redis.service<br \/>\nTo restart redis server<\/p>\n<p>systemctl restart redis.service<br \/>\nTo get running status of redis server<\/p>\n<p>systemctl status redis.service<br \/>\nTo enable redis server at system\u2019s booting time.<\/p>\n<p>systemctl enable redis.service<br \/>\nTo disable redis server at system\u2019s booting time.<\/p>\n<p>systemctl disable redis.service<\/p>\n<p>check its active<\/p>\n<p>systemctl is-active redis.service<\/p>\n<p>[root@clusterserver1 ~]# redis-cli ping<br \/>\nPONG<br \/>\n[root@clusterserver1 ~]#<\/p>\n<p>[root@clusterserver1 ~]# ss -nlp | grep redis<br \/>\ntcp\u00a0\u00a0\u00a0 LISTEN\u00a0\u00a0\u00a0\u00a0 0\u00a0\u00a0\u00a0\u00a0\u00a0 128\u00a0\u00a0\u00a0 127.0.0.1:6379\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 *:*\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 users:((&#8220;redis-server&#8221;,pid=10250,fd=4))<br \/>\n[root@clusterserver1 ~]#<\/p>\n<p>&nbsp;<\/p>\n<p>[root@clusterserver1 ~]# redis-cli<br \/>\n127.0.0.1:6379&gt;<br \/>\n127.0.0.1:6379&gt;<br \/>\n127.0.0.1:6379&gt; ping<br \/>\nPONG<br \/>\n127.0.0.1:6379&gt; set mykey somevalue<br \/>\nOK<br \/>\n127.0.0.1:6379&gt; get mykey<br \/>\n&#8220;somevalue&#8221;<\/p>\n<p>127.0.0.1:6379&gt; set aaa 111<br \/>\nOK<br \/>\n127.0.0.1:6379&gt; get aaa<br \/>\n&#8220;111&#8221;<br \/>\n127.0.0.1:6379&gt; quit<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to install redis server on CentOS 7 \/ RHEL 7<\/p>\n<p>wget -r &#8211;no-parent -A &#8216;epel-release-*.rpm&#8217; http:\/\/dl.fedoraproject.org\/pub\/epel\/7\/x86_64\/e\/ rpm -Uvh dl.fedoraproject.org\/pub\/epel\/7\/x86_64\/e\/epel-release-*.rpm<\/p>\n<p>or<\/p>\n<p>yum install epel-release<\/p>\n<p>install redis server<\/p>\n<p>Now use yum command to install redis server<\/p>\n<p>yum install redis<\/p>\n<p>Two important redis server configuration file\u2019s path 1. \/etc\/redis.conf 2. \/etc\/redis-sentinel.conf<\/p>\n<p>To start redis server<\/p>\n<p>systemctl start [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[73],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5560"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5560"}],"version-history":[{"count":3,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5560\/revisions"}],"predecessor-version":[{"id":5563,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5560\/revisions\/5563"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5560"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5560"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5560"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}