{"id":201239,"date":"2025-05-10T10:45:20","date_gmt":"2025-05-10T02:45:20","guid":{"rendered":"https:\/\/server.hk\/cnblog\/201239\/"},"modified":"2025-05-10T10:45:20","modified_gmt":"2025-05-10T02:45:20","slug":"redis%e4%b8%ad%e4%bf%ae%e6%94%b9%e9%85%8d%e7%bd%ae%e6%96%87%e4%bb%b6%e4%b8%ad%e7%9a%84%e7%ab%af%e5%8f%a3%e5%8f%b7-%e5%af%86%e7%a0%81%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/201239\/","title":{"rendered":"redis\u4e2d\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u7aef\u53e3\u53f7 \u5bc6\u7801\u65b9\u6cd5"},"content":{"rendered":"<p><b><\/b> <\/p>\n<h1>redis\u4e2d\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u7aef\u53e3\u53f7 \u5bc6\u7801\u65b9\u6cd5<\/h1>\n<p><span style=\"cursor: pointer\"><i><\/i>\u6536\u85cf<\/span> <\/p>\n<p>\u77e5\u8bc6\u70b9\u638c\u63e1\u4e86\uff0c\u8fd8\u9700\u8981\u4e0d\u65ad\u7ec3\u4e60\u624d\u80fd\u719f\u7ec3\u8fd0\u7528\u3002\u4e0b\u9762golang\u5b66\u4e60\u7f51\u7ed9\u5927\u5bb6\u5e26\u6765\u4e00\u4e2a\u6570\u636e\u5e93\u5f00\u53d1\u5b9e\u6218\uff0c\u624b\u628a\u624b\u6559\u5927\u5bb6\u5b66\u4e60\u300aredis\u4e2d\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u7aef\u53e3\u53f7 \u5bc6\u7801\u65b9\u6cd5\u300b\uff0c\u5728\u5b9e\u73b0\u529f\u80fd\u7684\u8fc7\u7a0b\u4e2d\u4e5f\u5e26\u5927\u5bb6\u91cd\u65b0\u6e29\u4e60\u76f8\u5173\u77e5\u8bc6\u70b9\uff0c\u6e29\u6545\u800c\u77e5\u65b0\uff0c\u56de\u5934\u770b\u770b\u8bf4\u4e0d\u5b9a\u53c8\u6709\u4e0d\u4e00\u6837\u7684\u611f\u609f\uff01<\/p>\n<p><span style=\"color: #ff0000\"><strong>windows\u4e2d<\/strong><\/span><\/p>\n<p><strong>1.\u627e\u5230redis\u6587\u4ef6\u7684\u4f4d\u7f6e, \u7f16\u8f91redis.windows.conf, \u5c06\u7aef\u53e3\u53f7\u6539\u62108888<\/strong><\/p>\n<p style=\"text-align: center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221231\/167248984463b02b746786e.jpg\" class=\"aligncenter\"><\/p>\n<p style=\"text-align: center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221231\/167248984463b02b749a93d.jpg\" class=\"aligncenter\"><\/p>\n<p><strong>2.\u6253\u5f00cmd, \u91cd\u542f\u542f\u52a8(\u5e26\u914d\u7f6e\u6587\u4ef6\u7684\u542f\u52a8)<\/strong><\/p>\n<p style=\"text-align: center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221231\/167248984463b02b74cb90e.jpg\" class=\"aligncenter\"><\/p>\n<p><strong>3.\u8fde\u63a5\u6d4b\u8bd5<\/strong><\/p>\n<p style=\"text-align: center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221231\/167248984563b02b750b110.jpg\" class=\"aligncenter\"><\/p>\n<p><span style=\"color: #ff0000\"><strong>liunx\u4e0b<\/strong><\/span><\/p>\n<p><strong>1.\u627e\u5230redis\u7684\u5b89\u88c5\u4f4d\u7f6e,\u4f8b\u5982\u6211\u7684\u662f \/usr\/local\/redis, \u627e\u5230redis.conf<\/strong><\/p>\n<p style=\"text-align: center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221231\/167248984563b02b753c9a5.jpg\" class=\"aligncenter\"><\/p>\n<p><strong>2. \u67e5\u627eport \u4fee\u6539\u7aef\u53e3\u53f7, \u67e5\u627erequirepass\u4fee\u6539\u5bc6\u7801(\u5bc6\u7801\u4fee\u6539\u628a\u524d\u9762\u6ce8\u91ca\u6253\u5f00)<\/strong><\/p>\n<p style=\"text-align: center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221231\/167248984563b02b757459e.jpg\" class=\"aligncenter\"><\/p>\n<p><strong>3.\u4fee\u6539\u7aef\u53e3,\u5bc6\u7801<\/strong><\/p>\n<p style=\"text-align: center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221231\/167248984563b02b75ac6a1.jpg\" class=\"aligncenter\"><\/p>\n<p><strong>4.\u91cd\u542f<\/strong><\/p>\n<pre>\n\/usr\/local\/redis\/bin\/redis-server \/usr\/local\/redis\/redis.conf<\/pre>\n<p>\u6ce8:\u5982\u679credis\u5df2\u7ecf\u542f\u52a8\u4e86, \u8981\u5148\u505c\u6389\u8fdb\u7a0b ,\u7136\u540e\u518d\u6267\u884c\u4e0a\u9762\u547d\u4ee4\u53bb\u91cd\u542f<\/p>\n<p style=\"text-align: center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221231\/167248984563b02b75def3e.jpg\" class=\"aligncenter\"><\/p>\n<p><strong>5.\u91cd\u65b0\u8f93\u5165\u7aef\u53e3\u53f7 ,\u5bc6\u7801\u8fdb\u5165<\/strong><\/p>\n<p style=\"text-align: center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221231\/167248984663b02b7620599.jpg\" class=\"aligncenter\"><\/p>\n<p>\u4ee5\u4e0a\u8fd9\u7bc7redis\u4e2d\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u7aef\u53e3\u53f7 \u5bc6\u7801\u65b9\u6cd5\u5c31\u662f\u5c0f\u7f16\u5206\u4eab\u7ed9\u5927\u5bb6\u7684\u5168\u90e8\u5185\u5bb9\u4e86\uff0c\u5e0c\u671b\u80fd\u7ed9\u5927\u5bb6\u4e00\u4e2a\u53c2\u8003\uff0c\u4e5f\u5e0c\u671b\u5927\u5bb6\u591a\u591a\u652f\u6301golang\u5b66\u4e60\u7f51\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>redis\u4e2d\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u7aef\u53e3&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-201239","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/201239","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=201239"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/201239\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=201239"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=201239"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=201239"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}