{"id":137,"date":"2022-02-06T05:02:01","date_gmt":"2022-02-05T21:02:01","guid":{"rendered":"http:\/\/nas.hepcloud.top:7000\/?p=137"},"modified":"2022-11-02T00:16:21","modified_gmt":"2022-11-01T16:16:21","slug":"%e7%be%a4%e6%99%96nas%e6%95%99%e7%a8%8b%e4%ba%94%e3%80%81%e5%88%a9%e7%94%a8docker%e5%ae%89%e8%a3%85ubuntu-21-04%e5%b9%b6%e5%9c%a8ubuntu%e4%b8%8a%e5%ae%89%e8%a3%85redis%e8%bf%9b%e8%a1%8c%e8%bf%9c","status":"publish","type":"post","link":"http:\/\/www.huerpu.cc:7000\/?p=137","title":{"rendered":"\u7fa4\u6656NAS docker\u7cfb\u5217\u6559\u7a0b(\u4e94)\u3001\u5229\u7528Docker\u5b89\u88c5Ubuntu-21.04\u5e76\u5728Ubuntu\u4e0a\u5b89\u88c5Redis\u8fdb\u884c\u8fdc\u7a0b\u8bbf\u95ee"},"content":{"rendered":"<h3>\u7fa4\u6656NAS\u6559\u7a0b(\u4e94)\u3001\u5229\u7528Docker\u5b89\u88c5Ubuntu-21.04\u5e76\u5728Ubuntu\u4e0a\u5b89\u88c5Redis\u8fdb\u884c\u8fdc\u7a0b\u8bbf\u95ee<\/h3>\n<p>\u7531\u4e8e\u4e0a\u8282\u6211\u4eec\u5b89\u88c5\u7684Ubuntu\u5b8c\u5168\u53ef\u4ee5\u5f53\u505a\u4e00\u4e2a\u670d\u52a1\u5668\u6765\u4f7f\u7528\uff0c\u8fd9\u4e2a\u53ef\u4ee5\u5b8c\u5168\u66ff\u4ee3\u963f\u91cc\u4e91\u7684ECS\u670d\u52a1\u5668\u7684\uff0c\u6240\u4ee5\u6211\u4eec\u62ff\u8fd9\u4e2a\u5b89\u88c5\u597d\u7684Ubuntu21.04\uff0c\u5728\u5b83\u4e0a\u9762\u641e\u4e00\u4e2aredis\uff0c\u5e76\u4e14\u8bbe\u7f6eredis\u53ef\u4ee5\u5916\u7f51\u8fde\u63a5\u3002<\/p>\n<h3>\u4e00\u3001\u524d\u671f\u51c6\u5907\u5de5\u4f5c<\/h3>\n<p>\u8bf7\u53c2\u8003\u4e0a\u8282\u7684\u6559\u7a0b\uff0c\u5b89\u88c5\u4e00\u4e2a\u6807\u51c6\u7684Ubuntu\u670d\u52a1\u5668\u7cfb\u7edf\uff0c\u8fd9\u91cc\u4e3a\u4e86\u8282\u7ea6\u65f6\u95f4\uff0c\u63d0\u524d\u5b89\u88c5\u597d\u4e86\u548cmyUbuntu\u4e00\u6a21\u4e00\u6837\u7684\u53e6\u5916\u4e00\u4e2aUbuntu\uff0c\u6211\u4eec\u628a\u5b83\u53eb\u505aredis-ubuntu-21.04\uff0c\u5982\u56fe\u6240\u793a\uff1a<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/02\/06\/84.png\" alt=\"img\" \/><\/p>\n<h3>\u4e8c\u3001\u8bbe\u7f6eredis\u5bb9\u5668\u5230\u5bbf\u4e3b\u673a\u7684\u7aef\u53e3\u6620\u5c04<\/h3>\n<p>\u8fd9\u91cc\u9664\u4e86\u6620\u5c04\u5bb9\u5668\u768422\u7aef\u53e3\uff0c\u8fd8\u6620\u5c04\u4e86\u5bb9\u5668\u91cc\u9762redis\u76846379\u7aef\u53e3\uff0c\u6620\u5c04\u5230\u5bbf\u4e3b\u673a\u4e0a\u76846381\u7aef\u53e3\uff0c\u5982\u56fe\u6240\u793a\uff1a<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/02\/06\/85.png\" alt=\"img\" \/><\/p>\n<h3>\u4e09\u3001\u5b89\u88c5redis<\/h3>\n<pre><code>#\u5347\u7ea7\u5b89\u88c5\u5305\napt update\n\n#\u8fdb\u884c\u5b89\u88c5\u5305\u7684\u66f4\u65b0\napt upgrade\n\n#\u5b89\u88c5vim\napt install vim\n\n#\u5b89\u88c5redis\napt install redis-server<\/code><\/pre>\n<h3>\u56db\u3001\u914d\u7f6eredis\u8fdc\u7a0b\u8bbf\u95ee<\/h3>\n<p>\u627e\u5230redis\u7684\u914d\u7f6e\u6587\u4ef6redis.config\uff0c\u8fdb\u884c\u914d\u7f6e\u5373\u53ef\u3002\u5982\u679c\u6709\u7248\u672c\u8def\u5f84\u548c\u672c\u6559\u7a0b\u4e0d\u5339\u914d\uff0c\u53ef\u4ee5\u4f7f\u7528whereis redis.config\u547d\u4ee4\u8fdb\u884c\u67e5\u627e\u5177\u4f53\u4f4d\u7f6e\u3002<\/p>\n<pre><code>vim \/etc\/redis\/redis.conf\n\n#\u4fee\u6539\u9879supervised\u6539\u4e3asystemd\nsupervised systemd\n\n#\u6ce8\u91ca\u6389bind 127.0.0.1 ::1\n#bind 127.0.0.1 ::1\n\n#\u8bbe\u7f6e\u8bbf\u95ee\u5bc6\u7801\nrequirepass 123456\n\n#\u4fee\u6539protected-mode\u4e3ayes\nprotected-mode  yes\n\n#\u542f\u52a8redis\nservice redis-server start<\/code><\/pre>\n<h3>\u4e94\u3001\u8def\u7531\u5668\u8bbe\u7f6eredis\u7684\u7aef\u53e3\u8f6c\u53d1\u5230\u5916\u7f51<\/h3>\n<table>\n<thead>\n<tr>\n<th>\u540d\u79f0<\/th>\n<th>\u534f\u8bae<\/th>\n<th>\u5916\u90e8\u7aef\u53e3<\/th>\n<th>\u5185\u90e8IP\u5730\u5740<\/th>\n<th>\u5185\u90e8\u7aef\u53e3<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>6380<\/td>\n<td>TCP<\/td>\n<td>6380<\/td>\n<td>192.168.31.19<\/td>\n<td>6380<\/td>\n<\/tr>\n<tr>\n<td>6381<\/td>\n<td>TCP<\/td>\n<td>6381<\/td>\n<td>192.168.31.19<\/td>\n<td>6381<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u540d\u79f0\u53ef\u4ee5\u968f\u4fbf\u586b\uff0c\u534f\u8bae\u9009\u62e9TCP\uff0c\u5916\u90e8\u7aef\u53e3\u662f\u5916\u7f51\u8bbf\u95ee\u7684\u7aef\u53e3\uff0c\u5185\u90e8IP\u5730\u5740\u662f\u7fa4\u6656\u7684\u672c\u5730IP\uff0c\u5185\u90e8\u7aef\u53e3\u662f\u5bb9\u5668\u66b4\u9732\u7ed9\u5bbf\u4e3b\u673a\u7684\u7aef\u53e3\u53f7\uff0c\u4e3a\u4e86\u65b9\u4fbf\u6211\u4eec\u5168\u90e8\u8bbe\u7f6e\u6210\u4e86\u7edf\u4e00\u76846380\u30016381\u3002<\/p>\n<h3>\u516d\u3001RDM(Redis Desktop Manager)\u8fdc\u7a0b\u8fde\u63a5<\/h3>\n<p>\u8fd9\u91ccRDM\u7684\u5b89\u88c5\u5c31\u4e0d\u505a\u5c55\u793a\u4e86\uff0c\u76f4\u63a5\u4e0a\u8fde\u63a5\u56fe\u7247:<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/02\/06\/86.png\" alt=\"img\" \/><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/02\/06\/87.png\" alt=\"img\" \/><\/p>\n<p>\u5f53\u7136\u4e5f\u53ef\u4ee5\u4f7f\u7528\u522b\u7684\u670d\u52a1\u5668\u8fdc\u7a0b\u547d\u4ee4\u884c\u8fdb\u884c\u8fde\u63a5\uff1a<\/p>\n<pre><code>redis-cli -h www.huerpu.cc -p 6381 -a 123456<\/code><\/pre>\n<p>\u5230\u6b64\u5927\u529f\u544a\u6210\uff0credis\u5c31\u53ef\u4ee5\u6109\u5feb\u7684\u5916\u7f51\u8bbf\u95ee\u5566\uff01<\/p>\n<h3>\u4e03\u3001\u8bbe\u7f6eredis\u5f00\u673a\u81ea\u542f\u52a8<\/h3>\n<p>\u8fd9\u91cc\u8bbe\u7f6e\u7684\u548cssh\u7684\u5f00\u673a\u81ea\u542f\u52a8\u7c7b\u4f3c\uff0c\u4e0d\u518d\u8d58\u8ff0\uff0c\u8d85\u7ea7\u7b80\u5355\u3002<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/02\/06\/88.png\" alt=\"img\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7fa4\u6656NAS\u6559\u7a0b(\u4e94)\u3001\u5229\u7528Docker\u5b89\u88c5Ubuntu-21.04\u5e76\u5728Ubuntu\u4e0a\u5b89\u88c5Redis\u8fdb\u884c\u8fdc\u7a0b\u8bbf\u95ee [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,10],"tags":[],"class_list":["post-137","post","type-post","status-publish","format-standard","hentry","category-nas","category-nas-docker"],"_links":{"self":[{"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/posts\/137","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=137"}],"version-history":[{"count":1,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/posts\/137\/revisions"}],"predecessor-version":[{"id":551,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/posts\/137\/revisions\/551"}],"wp:attachment":[{"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=137"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}