{"id":133,"date":"2025-12-01T12:54:43","date_gmt":"2025-12-01T04:54:43","guid":{"rendered":"http:\/\/38.246.253.12\/?p=133"},"modified":"2025-12-01T13:21:14","modified_gmt":"2025-12-01T05:21:14","slug":"%e4%ba%91%e6%9c%8d%e5%8a%a1%e5%99%a8redis%e9%85%8d%e7%bd%ae%e6%8c%87%e5%8d%97","status":"publish","type":"post","link":"https:\/\/chukai.cc\/index.php\/2025\/12\/01\/%e4%ba%91%e6%9c%8d%e5%8a%a1%e5%99%a8redis%e9%85%8d%e7%bd%ae%e6%8c%87%e5%8d%97\/","title":{"rendered":"\u4e91\u670d\u52a1\u5668Redis\u914d\u7f6e\u6307\u5357"},"content":{"rendered":"\n<p>\u4e00\u3001\u624b\u52a8\u5b89\u88c5\u914d\u7f6e<\/p>\n\n\n\n<p>1.&nbsp;\u5f00\u653e\u7aef\u53e3\uff1a\u4e91\u670d\u52a1\u5668\u63a7\u5236\u53f0\u2192\u5b89\u5168\u7ec4\u2192\u653e\u884c6379\u7aef\u53e3<br>\u200b<br>2.&nbsp;\u5b89\u88c5\u547d\u4ee4\uff1a<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Ubuntu\u7cfb\u7edf<\/h1>\n\n\n\n<p>plaintext<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;pre class=\"wp-block-code\">&lt;code>1&lt;\/code>&lt;\/pre><\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">CentOS\/Alibaba Cloud Linux\u7cfb\u7edf<\/h1>\n\n\n\n<p>plaintext<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo yum install -y alinux-release-experimentals &amp;&amp; sudo yum install -y redis-6.0.5<br>&nbsp;<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u7f16\u8f91\/etc\/redis\/redis.conf\u6587\u4ef6\uff0c\u4fee\u6539\u4e24\u5904\u5173\u952e\u914d\u7f6e<\/h1>\n\n\n\n<p>\u5c06\u7ed1\u5b9a\u5730\u5740\u6539\u4e3a0.0.0.0\uff08\u5141\u8bb8\u5916\u90e8\u8fde\u63a5\uff09<\/p>\n\n\n\n<p>bind 0.0.0.0<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u53d6\u6d88\u5bc6\u7801\u6ce8\u91ca\u5e76\u8bbe\u7f6e\u81ea\u5b9a\u4e49\u5bc6\u7801\uff08\u66ff\u6362\u4e3a\u81ea\u5df1\u7684\u5bc6\u7801\uff09<\/h1>\n\n\n\n<p>requirepass \u81ea\u5b9a\u4e49\u5bc6\u7801<br>&nbsp;<\/p>\n\n\n\n<p>4.&nbsp;\u542f\u52a8\u4e0e\u5f00\u673a\u81ea\u542f\u8bbe\u7f6e\uff1a<\/p>\n\n\n\n<p>plaintext<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u542f\u52a8Redis\u670d\u52a1<\/h1>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl start redis.service<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u8bbe\u7f6e\u5f00\u673a\u81ea\u542f<\/h1>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl enable redis.service<br>&nbsp;<\/code><\/pre>\n\n\n\n<p>\u4e8c\u3001\u4e91\u6258\u7ba1\u914d\u7f6e\uff08\u963f\u91cc\u4e91\u4e3a\u4f8b\uff09<\/p>\n\n\n\n<p>1.&nbsp;\u521b\u5efa\u5b9e\u4f8b\uff1aRedis\u63a7\u5236\u53f0\u2192\u9009\u62e9\u540c\u5730\u57df\/\u540cVPC\u89c4\u683c\u2192\u8bbe\u7f6e\u5185\u5b58\u3001\u4ed8\u8d39\u65b9\u5f0f\u2192\u914d\u7f6e\u8bbf\u95ee\u767d\u540d\u5355+\u767b\u5f55\u5bc6\u7801\u2192\u5b8c\u6210\u8d2d\u4e70<br>\u200b<br>2.&nbsp;\u83b7\u53d6\u8fde\u63a5\u4fe1\u606f\uff1a\u8fdb\u5165\u5b9e\u4f8b\u8be6\u60c5\u9875\uff0c\u67e5\u770bRedis\u8fde\u63a5\u5730\u5740\u3001\u7aef\u53e3\u53f7\uff08\u9ed8\u8ba46379\uff09<br>\u200b<br>3.&nbsp;\u670d\u52a1\u5668\u8fde\u63a5\u914d\u7f6e\uff1a<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u5b89\u88c5Redis\u5ba2\u6237\u7aef\uff08\u82e5\u672a\u5b89\u88c5\uff09<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">Ubuntu\uff1a<\/h1>\n\n\n\n<p>plaintext<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install redis-tools -y<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">CentOS\uff1a<\/h1>\n\n\n\n<p>plaintext<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo yum install redis -y<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u8fde\u63a5Redis\u5b9e\u4f8b<\/h1>\n\n\n\n<p>plaintext<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>redis-cli -h \u8fde\u63a5\u5730\u5740 -p \u7aef\u53e3\u53f7 -a \u767b\u5f55\u5bc6\u7801<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u624b\u52a8\u5b89\u88c5\u914d\u7f6e 1.&nbsp;\u5f00\u653e\u7aef\u53e3\uff1a\u4e91\u670d\u52a1\u5668\u63a7\u5236\u53f0\u2192\u5b89\u5168\u7ec4\u2192\u653e\u884c6379\u7aef\u53e3\u200b2.&nbsp;\u5b89\u88c5\u547d\u4ee4 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":44,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-133","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-passage"],"_links":{"self":[{"href":"https:\/\/chukai.cc\/index.php\/wp-json\/wp\/v2\/posts\/133","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chukai.cc\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chukai.cc\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chukai.cc\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chukai.cc\/index.php\/wp-json\/wp\/v2\/comments?post=133"}],"version-history":[{"count":3,"href":"https:\/\/chukai.cc\/index.php\/wp-json\/wp\/v2\/posts\/133\/revisions"}],"predecessor-version":[{"id":142,"href":"https:\/\/chukai.cc\/index.php\/wp-json\/wp\/v2\/posts\/133\/revisions\/142"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/chukai.cc\/index.php\/wp-json\/wp\/v2\/media\/44"}],"wp:attachment":[{"href":"https:\/\/chukai.cc\/index.php\/wp-json\/wp\/v2\/media?parent=133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chukai.cc\/index.php\/wp-json\/wp\/v2\/categories?post=133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chukai.cc\/index.php\/wp-json\/wp\/v2\/tags?post=133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}