如何让redis命令SLAVEOF为加密的redis master工作?(How to make redis comand SLAVEOF work for encrypted redis master?)
我用原始redis.conf分别启动了两个redis节点,我不想编辑它,但是我想使用redis命令(例如slaveof)动态配置redis节点。
如果redis节点没有'auth',即redis.conf中没有“requirepass”,则从属redis节点上的以下命令将起作用:
redis-server --slaveof redis-master 6379
其中redis-master是redis主节点的主机名。
但如果主服务器已加密,则无法使用。 我已经阅读了redis官方文档,没有任何帮助。 在我去反抗体之前,我想在这里听到你的意见。
I started two redis node separately with original redis.conf, which I don't want to edit it, however I want to use redis command, such as slaveof, to config redis nodes dynamically.
If redis nodes without 'auth', i.e. no "requirepass" in the redis.conf, the following command on the slave redis node will work:
redis-server --slaveof redis-master 6379
where redis-master is the hostname of the redis master node.
But this will not work if the master is encrypted. I've went through the redis official docs, nothing helps. Before I go for antirez, I want to hear from you here.
原文:https://stackoverflow.com/questions/39536615
满意答案
首先,状态应该定义
parameter
。 它可能是url
或params : {}
一部分params : {}
(或两者),但至少有一些......// params .state('customers',{ url:'/customers', params: { customerId : null } ... // url .state('customers',{ url:'/customers/:customerId', ... // url & params .state('customers',{ url:'/customers/:customerId', params: { customerId : 1 } // default value ...
有了这个,我们可以像这样创建ui-sref:
// instead of this <td><a ui-sref="orders({ctrl.cust.id})">View Orders</a></td> // we need object with name customerId and its value <td><a ui-sref="orders({customerId: ctrl.cust.id})">View Orders</a></td>
有关详细信息,请查看此问答:
如何使用ui-router中的ui-sref将参数传递给控制器
Firstly, state should define the
parameter
. It could be part ofurl
orparams : {}
(or both), but at least some...// params .state('customers',{ url:'/customers', params: { customerId : null } ... // url .state('customers',{ url:'/customers/:customerId', ... // url & params .state('customers',{ url:'/customers/:customerId', params: { customerId : 1 } // default value ...
Having this, we can create ui-sref like this:
// instead of this <td><a ui-sref="orders({ctrl.cust.id})">View Orders</a></td> // we need object with name customerId and its value <td><a ui-sref="orders({customerId: ctrl.cust.id})">View Orders</a></td>
For more details check this Q & A:
How to pass parameters using ui-sref in ui-router to controller
相关问答
更多在ui-sref中有表达式错误(Have a expression error in ui-sref)
ui-sref什么都不回应(ui-sref not respond anything)
Angular UI-Router wih空ui-sref并加载一次(Angular UI-Router wih empty ui-sref and load once)
Angular ui-sref href解决完成回调(Angular ui-sref href resolve completion callback)
使用来自ui-sref的参数动态更改ng-repeat过滤器(dynamically change ng-repeat filter using params from ui-sref)
动态ui-sref值(Dynamic ui-sref values)
Angular URL不起作用,但ui-sref的确如此(Angular URL's not working but ui-sref does)
Angular ui-sref,param删除了空格?(Angular ui-sref, param removes spaces? Workaround for it?)
来自变量/属性的ui-sref(ui-sref from variable / attribute)
如何将angular的ui-sref插入到链接的文本中?(How to insert angular's ui-sref into the text of a link?)
相关文章
更多基于linux下redis安装与配置
redis安装-redis集群管理
redis主从从架构搭建-redis集群管理
Redis概述
redis新增集群节点-redis集群管理
redis主从复制的原理-redis集群管理
redis sentinel(哨兵) 配置详解-redis集群管理
redis主从复制(读写分离)-redis集群管理
redis sentinel.conf详解-redis集群管理
基于window安装redis
最新问答
更多获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
如何通过引用返回对象?(How is returning an object by reference possible?)
矩阵如何存储在内存中?(How are matrices stored in memory?)
每个请求的Java新会话?(Java New Session For Each Request?)
css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
xcode语法颜色编码解释?(xcode syntax color coding explained?)
在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
Copyright ©2023 peixunduo.com All Rights Reserved.粤ICP备14003112号
本站部分内容来源于互联网,仅供学习和参考使用,请莫用于商业用途。如有侵犯你的版权,请联系我们(neng862121861#163.com),本站将尽快处理。谢谢合作!