{"id":67306,"date":"2025-05-10T10:04:27","date_gmt":"2025-05-10T02:04:27","guid":{"rendered":"https:\/\/fwq.ai\/blog\/67306\/"},"modified":"2025-05-10T10:04:27","modified_gmt":"2025-05-10T02:04:27","slug":"win10%e4%b8%8b%e9%80%9a%e8%bf%87ubuntu%e5%ae%89%e8%a3%85redis%e7%9a%84%e8%bf%87%e7%a8%8b-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/67306\/","title":{"rendered":"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b"},"content":{"rendered":"<p><b><\/b> <\/p>\n<h1>Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b<\/h1>\n<p><span style=\"cursor: pointer\"><i><\/i>\u6536\u85cf<\/span> <\/p>\n<p>\u672c\u7bc7\u6587\u7ae0\u4e3b\u8981\u662f\u7ed3\u5408\u6211\u4e4b\u524d\u9762\u8bd5\u7684\u5404\u79cd\u7ecf\u5386\u548c\u5b9e\u6218\u5f00\u53d1\u4e2d\u9047\u5230\u7684\u95ee\u9898\u89e3\u51b3\u7ecf\u9a8c\u6574\u7406\u7684\uff0c\u5e0c\u671b\u8fd9\u7bc7\u300aWin10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u300b\u5bf9\u4f60\u6709\u5f88\u5927\u5e2e\u52a9\uff01\u6b22\u8fce\u6536\u85cf\uff0c\u5206\u4eab\u7ed9\u66f4\u591a\u7684\u9700\u8981\u7684\u670b\u53cb\u5b66\u4e60~<\/p>\n<h3>\u73af\u5883<\/h3>\n<p><code>Win10<\/code><br \/><code>Ubuntu 18.04 LTS<\/code><br \/><code>Redis 6.0.6<\/code><\/p>\n<h2>Ubuntu\u5b89\u88c5<\/h2>\n<p>\u5728<code>Windows<\/code>\u7cfb\u7edf\u4e0b\u53ef\u4ee5\u6302\u8f7d<code>Linux<\/code>\u5b50\u7cfb\u7edf\uff0c\u901a\u8fc7<code>Windows<\/code>\u5546\u5e97<code>Microsoft Store<\/code>\u641c\u7d22<code>Ubuntu<\/code>\u5373\u53ef<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221229\/167232241863ad9d726447a.png\" class=\"aligncenter\" title=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe\" alt=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe\" \/><\/p>\n<p>\u5b89\u88c5<code>Ubuntu<\/code>\u9700\u8981\u5148\u6253\u5f00<code>Windows<\/code>\u529f\u80fd<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221229\/167232241863ad9d72b255a.png\" class=\"aligncenter\" title=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe1\" alt=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe1\" \/><\/p>\n<p>\u5b89\u88c5\u540e\u6253\u5f00<code>Ubuntu<\/code>\uff0c\u9700\u8981\u521b\u5efa\u4e00\u4e2a\u7528\u6237\u53ca\u5bc6\u7801<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221229\/167232241963ad9d730d338.png\" class=\"aligncenter\" title=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe2\" alt=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe2\" \/><\/p>\n<p>\u66f4\u6539<code>root<\/code>\u8d26\u53f7\u5bc6\u7801<\/p>\n<pre>sudo passwd<\/pre>\n<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221229\/167232241963ad9d735f6c0.png\" class=\"aligncenter\" title=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe3\" alt=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe3\" \/><\/p>\n<p>\u5207\u6362<code>root<\/code>\u7528\u6237\uff0c\u5bc6\u7801\u4e3a\u4e0a\u4e00\u6b65\u66f4\u6539\u7684\u5bc6\u7801<\/p>\n<pre>su root<\/pre>\n<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221229\/167232241963ad9d7394ff1.png\" class=\"aligncenter\" title=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe4\" alt=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe4\" \/><\/p>\n<h2>Redis\u5b89\u88c5<\/h2>\n<p>\u5207\u6362\u5230<code>\/usr\/local<\/code>\u76ee\u5f55\u65b0\u5efa<code>redis<\/code>\u76ee\u5f55\u5e76\u8d4b\u4e88\u6743\u9650\uff08\u81ea\u884c\u9009\u62e9\u5b89\u88c5\u76ee\u5f55\uff09<\/p>\n<pre>cd \/usr\/local \t\t\t\t\/\/ \u5207\u6362\u5230local\u76ee\u5f55\nmkdir redis \t\t\t\t\/\/ \u521b\u5efaredis\u76ee\u5f55\nchmod 777 redis\t\t\t\t\/\/ \u8d4b\u4e88\u6743\u9650\uff08\u5077\u61d2777\uff09\ncd redis\t\t\t\t\t\/\/ \u5207\u6362\u5230redis\u76ee\u5f55<\/pre>\n<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221229\/167232241963ad9d73e3531.png\" class=\"aligncenter\" title=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe5\" alt=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe5\" \/><\/p>\n<p>\u4e0b\u8f7d<code>Redis<\/code><\/p>\n<pre>wget http:\/\/download.redis.io\/releases\/redis-6.0.6.tar.gz<\/pre>\n<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221229\/167232242063ad9d74622d4.png\" class=\"aligncenter\" title=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe6\" alt=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe6\" \/><\/p>\n<p>\u89e3\u538b<code>Redis<\/code><\/p>\n<pre>tar -xzvf redis-6.0.6.tar.gz<\/pre>\n<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221229\/167232242063ad9d74b2132.png\" class=\"aligncenter\" title=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe7\" alt=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe7\" \/><\/p>\n<p>\u89e3\u538b\u540e\u5982\u4e0b\u6240\u793a<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221229\/167232242163ad9d75cd9fc.png\" class=\"aligncenter\" title=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe8\" alt=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe8\" \/><\/p>\n<p>\u5b89\u88c5<code>GCC<\/code>\u7f16\u8bd1\u5668\uff08\u7f16\u8bd1<code>Redis<\/code>\u6e90\u7801\uff09<\/p>\n<pre>sudo apt-get update\t\t\t\t\/\/ \u5237\u65b0\u672c\u5730\u7684\u8f6f\u4ef6\u5217\u8868\nsudo apt-get install gcc\t\t\/\/ \u5b89\u88c5gcc<\/pre>\n<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221229\/167232242263ad9d7609b42.png\" class=\"aligncenter\" title=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe9\" alt=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe9\" \/><\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221229\/167232242263ad9d76677ac.png\" class=\"aligncenter\" title=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe10\" alt=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe10\" \/><\/p>\n<p>\u5b89\u88c5<code>make<\/code>\uff08\u5b89\u88c5\u5de5\u5177\u548c\u4f9d\u8d56\u9879\u7684\u547d\u4ee4\u884c\u5de5\u5177\uff09<\/p>\n<pre>sudo apt-get install make<\/pre>\n<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221229\/167232242263ad9d76d069b.png\" class=\"aligncenter\" title=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe11\" alt=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe11\" \/><\/p>\n<p>\u6307\u5b9a\u8def\u5f84\u5b89\u88c5<code>Redis<\/code>\uff08<code>PREFIX<\/code>\u6307\u5b9a\u4e86\u5b89\u88c5\u8def\u5f84\uff09<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221229\/167232242363ad9d7759bd6.png\" class=\"aligncenter\" title=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe12\" alt=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe12\" \/><\/p>\n<p>\u51fa\u73b0\u5982\u4e0b\u7ed3\u679c\u5219\u5b89\u88c5\u6210\u529f\uff08\u53ef\u901a\u8fc7<code>ls<\/code>\u67e5\u770b\u662f\u5426\u5b58\u5728<code>bin<\/code>\u76ee\u5f55\uff0c\u5b58\u5728\u5219\u5b89\u88c5\u6210\u529f\uff09<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221229\/167232242463ad9d782da63.png\" class=\"aligncenter\" title=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe13\" alt=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe13\" \/><\/p>\n<p>\u5c06<code>redis<\/code>\u6e90\u7801\u4e2d\u7684\u914d\u7f6e\u6587\u4ef6<code>redis.conf<\/code>\u62f7\u8d1d\u5230\u81ea\u5df1\u7684\u5b89\u88c5\u76ee\u5f55\uff08<code>\/usr\/local\/redis<\/code>\uff09\u4e0b<\/p>\n<pre>cd \/usr\/local\/redis  \t\t\t\t\t\/\/ \u5207\u6362\u5230\u5b89\u88c5\u76ee\u5f55\ncp .\/redis-6.0.6\/redis.conf .\/ \t\t\t\/\/ \u62f7\u8d1d\u914d\u7f6e\u6587\u4ef6\u5230\u5f53\u524d\u76ee\u5f55<\/pre>\n<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221229\/167232242463ad9d7879f4a.png\" class=\"aligncenter\" title=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe14\" alt=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe14\" \/><\/p>\n<p>\u8fdb\u5165<code>bin<\/code>\u76ee\u5f55\u542f\u52a8<code>redis<\/code><\/p>\n<pre>cd bin\/\t\t\t\t\t\/\/ \u8fdb\u5165bin\u76ee\u5f55\n.\/redis-server\t\t\t\/\/ \u542f\u52a8redis<\/pre>\n<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221229\/167232242463ad9d78dd950.png\" class=\"aligncenter\" title=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe15\" alt=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe15\" \/><\/p>\n<p>\u5982\u4e0a\uff0c<code>redis<\/code>\u542f\u52a8\u540e\u8fde\u63a5<code>IP<\/code>\u4e3a<code>127.0.0.1<\/code>\uff0c\u7aef\u53e3\u4e3a<code>6379<\/code>\uff0c\u5982\u679c\u672c\u5730\u5b89\u88c5\u4e86<code>redis<\/code>\u53ef\u901a\u8fc7<code>cli<\/code>\u5de5\u5177\u7528\u5982\u4e0b\u547d\u4ee4\u6d4b\u8bd5\u8fde\u63a5<code>redis<\/code>\uff0c\u4e5f\u53ef\u81ea\u884c\u4f7f\u7528\u5176\u5b83\u5de5\u5177\u6d4b\u8bd5\u8fde\u63a5\uff08\u5982<code>RDM<\/code>\uff09<\/p>\n<pre>redis-cli.exe -h IP -p PORT<\/pre>\n<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221229\/167232242563ad9d7922aa5.png\" class=\"aligncenter\" title=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe16\" alt=\"Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u63d2\u56fe16\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Win10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b \u6536\u85cf \u672c\u7bc7\u6587\u7ae0\u4e3b\u8981\u662f\u7ed3\u5408\u6211\u4e4b\u524d\u9762\u8bd5\u7684\u5404\u79cd\u7ecf\u5386\u548c\u5b9e\u6218\u5f00\u53d1\u4e2d\u9047\u5230\u7684\u95ee\u9898\u89e3\u51b3\u7ecf\u9a8c\u6574\u7406\u7684\uff0c\u5e0c\u671b\u8fd9\u7bc7\u300aWin10\u4e0b\u901a\u8fc7Ubuntu\u5b89\u88c5Redis\u7684\u8fc7\u7a0b\u300b\u5bf9\u4f60\u6709\u5f88\u5927\u5e2e\u52a9\uff01\u6b22\u8fce\u6536\u85cf\uff0c\u5206\u4eab\u7ed9\u66f4\u591a\u7684\u9700\u8981\u7684\u670b\u53cb\u5b66\u4e60~ \u73af\u5883 Win10Ubuntu 18.04 LTSRedis 6.0.6 Ubuntu\u5b89\u88c5 \u5728Windows\u7cfb\u7edf\u4e0b\u53ef\u4ee5\u6302\u8f7dLinux\u5b50\u7cfb\u7edf\uff0c\u901a\u8fc7Windows\u5546\u5e97Microsoft Store\u641c\u7d22Ubuntu\u5373\u53ef \u5b89\u88c5Ubuntu\u9700\u8981\u5148\u6253\u5f00Windows\u529f\u80fd \u5b89\u88c5\u540e\u6253\u5f00Ubuntu\uff0c\u9700\u8981\u521b\u5efa\u4e00\u4e2a\u7528\u6237\u53ca\u5bc6\u7801 \u66f4\u6539root\u8d26\u53f7\u5bc6\u7801 sudo passwd \u5207\u6362root\u7528\u6237\uff0c\u5bc6\u7801\u4e3a\u4e0a\u4e00\u6b65\u66f4\u6539\u7684\u5bc6\u7801 su root Redis\u5b89\u88c5 \u5207\u6362\u5230\/usr\/local\u76ee\u5f55\u65b0\u5efaredis\u76ee\u5f55\u5e76\u8d4b\u4e88\u6743\u9650\uff08\u81ea\u884c\u9009\u62e9\u5b89\u88c5\u76ee\u5f55\uff09 cd \/usr\/local \/\/ \u5207\u6362\u5230local\u76ee\u5f55 mkdir redis \/\/ \u521b\u5efaredis\u76ee\u5f55 chmod 777 redis \/\/ \u8d4b\u4e88\u6743\u9650\uff08\u5077\u61d2777\uff09 cd redis \/\/ \u5207\u6362\u5230redis\u76ee\u5f55 \u4e0b\u8f7dRedis wget http:\/\/download.redis.io\/releases\/redis-6.0.6.tar.gz \u89e3\u538bRedis tar -xzvf redis-6.0.6.tar.gz \u89e3\u538b\u540e\u5982\u4e0b\u6240\u793a \u5b89\u88c5GCC\u7f16\u8bd1\u5668\uff08\u7f16\u8bd1Redis\u6e90\u7801\uff09 sudo apt-get update \/\/ \u5237\u65b0\u672c\u5730\u7684\u8f6f\u4ef6\u5217\u8868 sudo apt-get install [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-67306","post","type-post","status-publish","format-standard","hentry","category-os"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/67306","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=67306"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/67306\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=67306"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=67306"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=67306"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}