redis集群命令及常规操作
集群命令
[root@redis06 etc]# redis-cli --cluster help
Cluster Manager Commands:
create host1:port1 ... hostN:portN
--cluster-replicas <arg>
check host:port
info host:port
fix host:port
reshard host:port
--cluster-from <arg>
--cluster-to <arg>
--cluster-slots <arg>
--cluster-yes
--cluster-timeout <arg>
--cluster-pipeline <arg>
rebalance host:port
--cluster-weight <node1=w1...nodeN=wN>
--cluster-use-empty-masters
--cluster-timeout <arg>
--cluster-simulate
--cluster-pipeline <arg>
--cluster-threshold <arg>
add-node new_host:new_port existing_host:existing_port
--cluster-slave
--cluster-master-id <arg>
del-node host:port node_id
call host:port command arg arg .. arg
set-timeout host:port milliseconds
import host:port
--cluster-from <arg>
--cluster-copy
--cluster-replace
help For check, fix, reshard, del-node, set-timeout you can specify the host and port of any working node in the cluster.
对集群进行重新分片
重新分片并不会对正在运行的集群程序产生任何影响,重新分片操作基本上就是将某些主节点上的哈希槽移动到另外一些主节点上面,和创建集群一样
[root@redis01 etc]# redis-cli --cluster reshard 10.0.0.10: -a
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
>>> Performing Cluster Check (using node 10.0.0.10:)
M: bb273c158818c55f8f3ad0d0b2d971157fd56c90 10.0.0.10:
slots:[-] ( slots) master
additional replica(s)
S: ad58497a499e41df39d2f597e64beb046c5dc756 10.0.0.72:
slots: ( slots) slave
replicates fc80f137ccb33e09fe33f2e3364de00bbbc4e888
S: 97c7b9789303a8f1eb8f8516ab0d598c304635b8 10.0.0.71:
slots: ( slots) slave
replicates 5a6291fd3fb00119ae4828f5b86554fe4f35a1a7
M: fc80f137ccb33e09fe33f2e3364de00bbbc4e888 10.0.0.61:
slots:[-] ( slots) master
additional replica(s)
S: 312b3228330eff446e5c9c159182bcdcd61353c6 10.0.0.70:
slots: ( slots) slave
replicates bb273c158818c55f8f3ad0d0b2d971157fd56c90
M: 5a6291fd3fb00119ae4828f5b86554fe4f35a1a7 10.0.0.60:
slots:[-] ( slots) master
additional replica(s)
[OK] All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
[OK] All slots covered.
- #输入要移动的哈希槽数量
How many slots do you want to move (from to )? 1000#输入哈希槽移入的源主节点
What is the receiving node ID? 5a6291fd3fb00119ae4828f5b86554fe4f35a1a7
Please enter all the source node IDs.
Type 'all' to use all the nodes as source nodes for the hash slots.
Type 'done' once you entered all the source nodes IDs. - # 输入节点ID 如果输入all 表示从所有主节点移动槽位到指定节点ID,如果输入all,将直接移动哈希槽,输入done直接退出
Source node #: fc80f137ccb33e09fe33f2e3364de00bbbc4e888
Source node #: doneReady to move slots.
Source nodes:
M: fc80f137ccb33e09fe33f2e3364de00bbbc4e888 10.0.0.61:
slots:[-] ( slots) master
additional replica(s)
Destination node:
M: 5a6291fd3fb00119ae4828f5b86554fe4f35a1a7 10.0.0.60:
slots:[-] ( slots) master
additional replica(s)
Resharding plan:
Moving slot from fc80f137ccb33e09fe33f2e3364de00bbbc4e888
Moving slot from fc80f137ccb33e09fe33f2e3364de00bbbc4e888
Moving slot from fc80f137ccb33e09fe33f2e3364de00bbbc4e888
Moving slot from fc80f137ccb33e09fe33f2e3364de00bbbc4e888
Moving slot from fc80f137ccb33e09fe33f2e3364de00bbbc4e888
- # 输入节点ID 如果输入all 表示从所有主节点移动槽位到指定节点ID,如果输入all,将直接移动哈希槽,输入done直接退出
- # 是否执行重新分片计划
Do you want to proceed with the proposed reshard plan (yes/no)? yes
Moving slot 10923 from 10.0.0.61:6379 to 10.0.0.60:6379:
Moving slot 10924 from 10.0.0.61:6379 to 10.0.0.60:6379:
Moving slot 10925 from 10.0.0.61:6379 to 10.0.0.60:6379:
Moving slot 10926 from 10.0.0.61:6379 to 10.0.0.60:6379:
查看重新分片后的哈希槽分配情况
[root@redis01 etc]# redis-cli -c -h 10.0.0.10 -p -a cluster nodes
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
ad58497a499e41df39d2f597e64beb046c5dc756 10.0.0.72:@ slave fc80f137ccb33e09fe33f2e3364de00bbbc4e888 connected
97c7b9789303a8f1eb8f8516ab0d598c304635b8 10.0.0.71:@ slave 5a6291fd3fb00119ae4828f5b86554fe4f35a1a7 connected
bb273c158818c55f8f3ad0d0b2d971157fd56c90 10.0.0.10:@ myself,master - connected -
fc80f137ccb33e09fe33f2e3364de00bbbc4e888 10.0.0.61:@ master - connected - - -
312b3228330eff446e5c9c159182bcdcd61353c6 10.0.0.70:@ slave bb273c158818c55f8f3ad0d0b2d971157fd56c90 connected
5a6291fd3fb00119ae4828f5b86554fe4f35a1a7 10.0.0.60:@ master - connected -11922 目标节点的哈希槽分为了三部分,前两部分是从其他节点移动过来的
命令输出的解释:
- 节点 ID :例如 3fc783611028b1707fd65345e763befb36454d73 。
- ip:port :节点的 IP 地址和端口号, 例如 127.0.0.1:7000 , 其中 :0 表示的是客户端当前连接的 IP 地址和端口号。
- flags :节点的角色(例如 master 、 slave 、 myself )以及状态(例如 fail ,等等)。
- 如果节点是一个从节点的话, 那么跟在 flags 之后的将是主节点的节点 ID : 例如 127.0.0.1:7002 的主节点的节点 ID 就是 3c3a0c74aae0b56170ccb03a76b60cfe7dc1912e 。
- 集群最近一次向节点发送 PING 命令之后, 过去了多长时间还没接到回复。
- 节点最近一次返回 PONG 回复的时间。
- 节点的配置纪元(configuration epoch):详细信息请参考 Redis 集群规范 。
- 本节点的网络连接情况:例如 connected 。
- 节点目前包含的槽:例如 127.0.0.1:7001 目前包含号码为 5960 至 10921 的哈希槽。
注意:(1)旧版本使用redis-trib.rb reshard 127.0.0.1:6379移动哈希槽
(2)不能将主节点的哈希槽移动到从节点(从节点是只读的)
[root@redis01 etc]# redis-cli -c -h 10.0.0.10 -p -a
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
10.0.0.10:> quit
[root@redis01 etc]# redis-cli --cluster reshard 10.0.0.10: -a
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
>>> Performing Cluster Check (using node 10.0.0.10:)
M: bb273c158818c55f8f3ad0d0b2d971157fd56c90 10.0.0.10:
slots:[-] ( slots) master
additional replica(s)
S: ad58497a499e41df39d2f597e64beb046c5dc756 10.0.0.72:
slots: ( slots) slave
replicates fc80f137ccb33e09fe33f2e3364de00bbbc4e888
S: 97c7b9789303a8f1eb8f8516ab0d598c304635b8 10.0.0.71:
slots: ( slots) slave
replicates 5a6291fd3fb00119ae4828f5b86554fe4f35a1a7
M: fc80f137ccb33e09fe33f2e3364de00bbbc4e888 10.0.0.61:
slots:[-] ( slots) master
additional replica(s)
S: 312b3228330eff446e5c9c159182bcdcd61353c6 10.0.0.70:
slots: ( slots) slave
replicates bb273c158818c55f8f3ad0d0b2d971157fd56c90
M: 5a6291fd3fb00119ae4828f5b86554fe4f35a1a7 10.0.0.60:
slots:[-] ( slots) master
additional replica(s)
[OK] All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
[OK] All slots covered.
How many slots do you want to move (from to )?
What is the receiving node ID? 97c7b9789303a8f1eb8f8516ab0d598c304635b8
*** The specified node (97c7b9789303a8f1eb8f8516ab0d598c304635b8) is not known or not a master, please retry.
redis集群健康状态检查
[root@redis06 etc]# redis-cli --cluster check 10.0.0.72: -a
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
10.0.0.72: (ad58497a...) -> keys | slots | slaves.
10.0.0.60: (5a6291fd...) -> keys | slots | slaves.
10.0.0.10: (bb273c15...) -> keys | slots | slaves.
[OK] keys in masters.
0.00 keys per slot on average.
>>> Performing Cluster Check (using node 10.0.0.72:)
M: ad58497a499e41df39d2f597e64beb046c5dc756 10.0.0.72:
slots:[-],[-],[-] ( slots) master
additional replica(s)
M: 5a6291fd3fb00119ae4828f5b86554fe4f35a1a7 10.0.0.60:
slots:[-] ( slots) master
additional replica(s)
S: 97c7b9789303a8f1eb8f8516ab0d598c304635b8 10.0.0.71:
slots: ( slots) slave
replicates 5a6291fd3fb00119ae4828f5b86554fe4f35a1a7
M: bb273c158818c55f8f3ad0d0b2d971157fd56c90 10.0.0.10:
slots:[-] ( slots) master
additional replica(s)
S: 312b3228330eff446e5c9c159182bcdcd61353c6 10.0.0.70:
slots: ( slots) slave
replicates bb273c158818c55f8f3ad0d0b2d971157fd56c90
S: fc80f137ccb33e09fe33f2e3364de00bbbc4e888 10.0.0.61:
slots: ( slots) slave
replicates ad58497a499e41df39d2f597e64beb046c5dc756
[OK] All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
[OK] All slots covered.
当一组主、从节点都宕机时,会出现哈希槽无节点接管,导致集群不可用
# 将72和61这组节点宕机
[root@redis06 etc]# redis-cli -c -h 10.0.0.61 -p -a shutdown [root@redis06 etc]# redis-cli -c -h 10.0.0.72 -p -a shutdown # 检测集群状态
[root@redis06 etc]# redis-cli --cluster check 10.0.0.71: -a Could not connect to Redis at 10.0.0.61:: Connection refused
Could not connect to Redis at 10.0.0.72:: Connection refused
10.0.0.70: (312b3228...) -> keys | slots | slaves.
10.0.0.60: (5a6291fd...) -> keys | slots | slaves.
[OK] keys in masters.
0.00 keys per slot on average.
>>> Performing Cluster Check (using node 10.0.0.71:)
S: 97c7b9789303a8f1eb8f8516ab0d598c304635b8 10.0.0.71:
slots: ( slots) slave
replicates 5a6291fd3fb00119ae4828f5b86554fe4f35a1a7
M: 312b3228330eff446e5c9c159182bcdcd61353c6 10.0.0.70:
slots:[-] ( slots) master
additional replica(s)
M: 5a6291fd3fb00119ae4828f5b86554fe4f35a1a7 10.0.0.60:
slots:[-] ( slots) master
additional replica(s)
S: bb273c158818c55f8f3ad0d0b2d971157fd56c90 10.0.0.10:
slots: ( slots) slave
replicates 312b3228330eff446e5c9c159182bcdcd61353c6
[OK] All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
[ERR] Not all slots are covered by nodes. 查看集群信息
[root@redis06 etc]# redis-cli -c -h 10.0.0.10 -p -a cluster info cluster_state:fail
cluster_slots_assigned:
cluster_slots_ok:
cluster_slots_pfail:
cluster_slots_fail:
cluster_known_nodes:
cluster_size:
cluster_current_epoch:
cluster_my_epoch:
cluster_stats_messages_ping_sent:
cluster_stats_messages_pong_sent:
cluster_stats_messages_sent:
cluster_stats_messages_ping_received:
cluster_stats_messages_pong_received:
cluster_stats_messages_fail_received:
cluster_stats_messages_update_received:
cluster_stats_messages_received: 在10这台服务器上设置一个键
[root@redis01 etc]# redis-cli -c -h 10.0.0.10 -p -a 10.0.0.10:> set foo bar
(error) CLUSTERDOWN The cluster is down
故障节点重新上线
[root@redis06 etc]# redis-server redis.conf
[root@redis06 etc]# ss -lntp
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 10.0.0.72: *:* users:(("redis-server",pid=,fd=))
LISTEN *: *:* users:(("sshd",pid=,fd=))
LISTEN 127.0.0.1: *:* users:(("master",pid=,fd=))
LISTEN 10.0.0.72: *:* users:(("redis-server",pid=,fd=))
LISTEN ::: :::* users:(("vsftpd",pid=,fd=))
LISTEN ::: :::* users:(("sshd",pid=,fd=))
LISTEN ::: :::* users:(("master",pid=,fd=)) [root@redis03 etc]# redis-server redis.conf
[root@redis03 etc]# ss -lntp
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 10.0.0.61: *:* users:(("redis-server",pid=,fd=))
LISTEN *: *:* users:(("sshd",pid=,fd=))
LISTEN 10.0.0.61: *:* users:(("redis-server",pid=,fd=))
LISTEN ::: :::* users:(("sshd",pid=,fd=)) # 再次检测 [root@redis06 etc]# redis-cli --cluster check 10.0.0.71: -a
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
10.0.0.70: (312b3228...) -> keys | slots | slaves.
10.0.0.60: (5a6291fd...) -> keys | slots | slaves.
10.0.0.61: (fc80f137...) -> keys | slots | slaves.
[OK] keys in masters.
0.00 keys per slot on average.
>>> Performing Cluster Check (using node 10.0.0.71:)
S: 97c7b9789303a8f1eb8f8516ab0d598c304635b8 10.0.0.71:
slots: ( slots) slave
replicates 5a6291fd3fb00119ae4828f5b86554fe4f35a1a7
M: 312b3228330eff446e5c9c159182bcdcd61353c6 10.0.0.70:
slots:[-] ( slots) master
additional replica(s)
M: 5a6291fd3fb00119ae4828f5b86554fe4f35a1a7 10.0.0.60:
slots:[-] ( slots) master
additional replica(s)
S: bb273c158818c55f8f3ad0d0b2d971157fd56c90 10.0.0.10:
slots: ( slots) slave
replicates 312b3228330eff446e5c9c159182bcdcd61353c6
M: fc80f137ccb33e09fe33f2e3364de00bbbc4e888 10.0.0.61:
slots:[-],[-],[-] ( slots) master
additional replica(s)
S: ad58497a499e41df39d2f597e64beb046c5dc756 10.0.0.72:
slots: ( slots) slave
replicates fc80f137ccb33e09fe33f2e3364de00bbbc4e888
[OK] All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
[OK] All slots covered.
集群扩容和缩容和哈希槽操作命令
# 将 ip 和 port 所指定的节点添加到集群中
CLUSTER MEET <ip> <port>
# 从集群中移除 node_id 指定的节点
CLUSTER FORGET <node_id> 将当前节点设置为 node_id 指定的节点的从节点 CLUSTER REPLICATE <node_id> 、将节点的配置文件保存到硬盘里面 CLUSTER SAVECONFIG 、将一个或多个槽(slot)指派(assign)给当前节点 CLUSTER ADDSLOTS <slot> [slot ...] 、移除一个或多个槽对当前节点的指派 CLUSTER DELSLOTS <slot> [slot ...] 、 移除指派给当前节点的所有槽,让当前节点变成一个没有指派任何槽的节点 CLUSTER FLUSHSLOTS 、将槽 slot 指派给 node_id 指定的节点,如果槽已经指派给另一个节点,那么先让另一个节点删除该槽>,然后再进行指派 CLUSTER SETSLOT <slot> NODE <node_id> 、将本节点的槽 slot 迁移到 node_id 指定的节点中 CLUSTER SETSLOT <slot> MIGRATING <node_id> 、从 node_id 指定的节点中导入槽 slot 到本节点 CLUSTER SETSLOT <slot> IMPORTING <node_id> 、取消对槽 slot 的导入(import)或者迁移(migrate) CLUSTER SETSLOT <slot> STABLE 、计算键 key 应该被放置在哪个槽上 CLUSTER KEYSLOT <key> 、返回槽 slot 目前包含的键值对数量 CLUSTER COUNTKEYSINSLOT <slot> 、返回 count 个 slot 槽中的键 CLUSTER GETKEYSINSLOT <slot> <count>
测试从节点是否能进行故障切换
# 停掉一个主节点
[root@redis06 etc]# redis-cli -c -h 10.0.0.61 -p -a shutdown
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
[root@redis06 etc]# ss -lntp
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 10.0.0.72: *:* users:(("redis-server",pid=,fd=))
LISTEN *: *:* users:(("sshd",pid=,fd=))
LISTEN 127.0.0.1: *:* users:(("master",pid=,fd=))
LISTEN 10.0.0.72: *:* users:(("redis-server",pid=,fd=))
LISTEN ::: :::* users:(("vsftpd",pid=,fd=))
LISTEN ::: :::* users:(("sshd",pid=,fd=))
LISTEN ::: :::* users:(("master",pid=,fd=))
[root@redis06 etc]# redis-cli -c -h 10.0.0.61 -p -a cluster nodes
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
Could not connect to Redis at 10.0.0.61:: Connection refused
#查看集群状态 [root@redis06 etc]# redis-cli -c -h 10.0.0.72 -p -a cluster nodes
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
5a6291fd3fb00119ae4828f5b86554fe4f35a1a7 10.0.0.60:@ master - connected -
ad58497a499e41df39d2f597e64beb046c5dc756 10.0.0.72:@ myself,master - connected - - -
97c7b9789303a8f1eb8f8516ab0d598c304635b8 10.0.0.71:@ slave 5a6291fd3fb00119ae4828f5b86554fe4f35a1a7 connected
bb273c158818c55f8f3ad0d0b2d971157fd56c90 10.0.0.10:@ master - connected -
312b3228330eff446e5c9c159182bcdcd61353c6 10.0.0.70:@ slave bb273c158818c55f8f3ad0d0b2d971157fd56c90 connected
fc80f137ccb33e09fe33f2e3364de00bbbc4e888 10.0.0.61:@ master,fail - disconnected
宕机节点恢复
[root@redis03 etc]# ss -lntp
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN *: *:* users:(("sshd",pid=,fd=))
LISTEN ::: :::* users:(("sshd",pid=,fd=))
[root@redis03 etc]# redis-server redis.conf
[root@redis03 etc]# ss -lntp
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 10.0.0.61: *:* users:(("redis-server",pid=,fd=))
LISTEN *: *:* users:(("sshd",pid=,fd=))
LISTEN 10.0.0.61: *:* users:(("redis-server",pid=,fd=))
LISTEN ::: :::* users:(("sshd",pid=,fd=))
查看集群状态
[OK] All slots covered.
[root@redis06 etc]# redis-cli --cluster check 10.0.0.72: -a
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
10.0.0.72: (ad58497a...) -> keys | slots | slaves.
10.0.0.60: (5a6291fd...) -> keys | slots | slaves.
10.0.0.10: (bb273c15...) -> keys | slots | slaves.
[OK] keys in masters.
0.00 keys per slot on average.
>>> Performing Cluster Check (using node 10.0.0.72:)
M: ad58497a499e41df39d2f597e64beb046c5dc756 10.0.0.72:
slots:[-],[-],[-] ( slots) master
additional replica(s)
M: 5a6291fd3fb00119ae4828f5b86554fe4f35a1a7 10.0.0.60:
slots:[-] ( slots) master
additional replica(s)
S: 97c7b9789303a8f1eb8f8516ab0d598c304635b8 10.0.0.71:
slots: ( slots) slave
replicates 5a6291fd3fb00119ae4828f5b86554fe4f35a1a7
M: bb273c158818c55f8f3ad0d0b2d971157fd56c90 10.0.0.10:
slots:[-] ( slots) master
additional replica(s)
S: 312b3228330eff446e5c9c159182bcdcd61353c6 10.0.0.70:
slots: ( slots) slave
replicates bb273c158818c55f8f3ad0d0b2d971157fd56c90
S: fc80f137ccb33e09fe33f2e3364de00bbbc4e888 10.0.0.61:
slots: ( slots) slave
replicates ad58497a499e41df39d2f597e64beb046c5dc756
[OK] All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
[OK] All slots covered.
计数器测试集群一致性
consistency-test.rb创建了多个计数器(默认为 个), 并通过发送 INCR key 命令来增加这些计数器的值。在增加计数器值的同时, consistency-test.rb 还执行以下操作: 每次使用 INCR key 命令更新一个计数器时, 应用会记录下计数器执行 INCR key 命令之后应该有的值。 举个例子, 如果计数器的起始值为 , 而这次是程序第 次向它发送 INCR key 命令, 那么计数器的值应该是 。
在每次发送 INCR key 命令之前, 程序会随机从集群中读取一个计数器的值, 并将它与自己记录的值进行对比, 看两个值是否相同。 换句话说, 这个程序是一个一致性检查器(consistency checker):
如果集群在执行 INCR key 命令的过程中, 丢失了某条 INCR key 命令, 又或者多执行了某条客户端没有确认到的 INCR key 命令, 那么检查器将察觉到这一点
-----在前一种情况中, consistency-test.rb 记录的计数器值将比集群记录的计数器值要大; 而在后一种情况中, consistency-test.rb 记录的计数器值将比集群记录的计数器值要小。
安装ruby
[root@redis06 etc]# yum install -y ruby ruby-devel rubygems rpm-build
[root@redis06 etc]# ruby -v
ruby 2.0.0p648 (2015-12-16) [x86_64-linux]
报错,需要安装高版本ruby
[root@redis06 etc]# gem install redis
Fetching: redis-4.1..gem (%)
ERROR: Error installing redis:
redis requires Ruby version >= 2.3..
使用rvm安装ruby
[root@redis01 etc]# curl -sSL https://get.rvm.io | bash -s stable
curl: () TCP connection reset by peer [root@redis01 etc]# gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
gpg: directory `/root/.gnupg' created
gpg: new configuration file `/root/.gnupg/gpg.conf' created
gpg: WARNING: options in `/root/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/root/.gnupg/secring.gpg' created
gpg: keyring `/root/.gnupg/pubring.gpg' created
gpg: requesting key D39DC0E3 from hkp server keys.gnupg.net
gpg: requesting key 39499BDB from hkp server keys.gnupg.net
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: key D39DC0E3: public key "Michal Papis (RVM signing) <mpapis@gmail.com>" imported
gpg: key 39499BDB: public key "Piotr Kuczynski <piotr.kuczynski@gmail.com>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed:
gpg: imported: (RSA: ) [root@redis01 etc]# curl -sSL https://get.rvm.io | bash -s stable
Downloading https://github.com/rvm/rvm/archive/1.29.9.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.29.9/1.29.9.tar.gz.asc
gpg: Signature made Wed Jul :: AM EDT using RSA key ID 39499BDB
gpg: Good signature from "Piotr Kuczynski <piotr.kuczynski@gmail.com>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 7D2B AF1C F37B 13E2 069D 105B D0E7 9BDB
GPG verified '/usr/local/rvm/archives/rvm-1.29.9.tgz'
Creating group 'rvm'
Installing RVM to /usr/local/rvm/
Installation of RVM in /usr/local/rvm/ is almost complete: * First you need to add all users that will be using rvm to 'rvm' group,
and logout - login again, anyone using rvm will be operating with `umask u=rwx,g=rwx,o=rx`. * To start using RVM you need to run `source /etc/profile.d/rvm.sh`
in all your open shell windows, in rare cases you need to reopen all shell windows.
* Please do NOT forget to add your users to the rvm group.
The installer no longer auto-adds root or users to the rvm group. Admins must do this.
Also, please note that group memberships are ONLY evaluated at login time.
This means that users must log out then back in before group membership takes effect!
Thanks for installing RVMredis集群命令及常规操作的更多相关文章
- Redis集群命令行部署工具
使用之前准备工作: 1)配置好与端口无关的公共redis.conf文件,和工具放在同一目录下 2)配置好与端口相关的模板redis-PORT.conf文件,也和工具放在同一目录下(部署时PORT会被替 ...
- redis集群搭建及常用操作
前言: Redis 是一个高性能的key-value数据库. redis的出现,很大程度补偿了memcached这类key/value存储的不足,在部 分场合可以对关系数据库起到很好的补充作用.它提供 ...
- redis集群配置及python操作
之前我们分析过喜马拉雅的爬取信息,使用分布式爬取,而且需要修改scrapy-redis的过滤算法为布隆过滤来减少redis内存占用,最后考虑这样还是不一定够,那么redis集群就是更好的一种选择方式了 ...
- Redis 集群会有写操作丢失吗?为什么?
Redis 并不能保证数据的强一致性,这意味这在实际中集群在特定的条件下可能会丢失写操作.
- Redis集群部署及命令
一.简介 redis集群是一个无中心的分布式Redis存储架构,可以在多个节点之间进行数据共享,解决了Redis高可用.可扩展等问题. redis集群提供了以下两个好处: 将数据自动切分(split) ...
- Redis 集群知识点及命令
Redis 集群命令 备注 cluster nodes 查看集群包含的节点 cluster meet <ip> <port> 将 ip 和 port 所指定的节点添加到 nod ...
- python 操作redis集群
一.连接redis集群 python的redis库是不支持集群操作的,推荐库:redis-py-cluster,一直在维护.还有一个rediscluster库,看GitHub上已经很久没更新了. 安装 ...
- Redis集群教程(Redis cluster tutorial)
本博文翻译自Redis官网:http://redis.io/topics/cluster-tutorial 本文档以温和的方式介绍Redis集群,不使用复杂的方式来理解分布式系统的概念. ...
- Redis集群配置和常见异常解决
前文 Redis的Cluster集群,是在分布式且开源环境下最佳的高可用解决方案,可以有效的解决服务器宕机下或高并发下,数据的完整性. 文档前提 Redis 3.0版本或更高版本.(3.0版本开始支持 ...
随机推荐
- php头像上传插件
最近找到了一个比较简单实用的php头像上传插件,兼容IE8及以上等主流浏览器,分享给大家.效果如下: 1.首页效果图:默认显示默认图片. 2.点击图片(拥有裁剪框,可以拖动.缩放.裁剪头像等功能,注意 ...
- ES-windows版本设置远程访问
1,官网下载 2,下载完解压 3,修改配置文件 elasticsearch.yml network.host: 0.0.0.0http.port: 9200transport.host: localh ...
- Git管理代码
使用Git管理代码 1. 分支管理模式 首先,master分支应该是非常稳定的,开发都在dev分支上,每个人都有自己的分支,时不时地往dev分支上合并就可以了.完成测试后,再把dev分支合并到mast ...
- 洛谷 P1076 寻宝(模拟 && 剪枝)
嗯... 题目链接:https://www.luogu.org/problem/P1076 这道题的题意首先太难理解...并且细节太多... 可以用b[i][j]记录每个指示牌上的数字,a[i][j] ...
- dubbo-admin监控台的搭建
一.dubbo-admin dubbo-admin是dubbo的控制台web程序,可以利用浏览器对dubbo进行性能监控.服务治理.降级.分组以及一些参数的设置.2.6版本及以前打包后是一个war包, ...
- Codeforces 1313C.Skyscrapers
题目链接 题意是给你一个数组,问你如何建造,使得每个点都不小于其左右的点,包括不相邻的点 分析题意,容易得知,就是找一个点两侧的不上升序列且带修,那我们就分别从头跑一遍,从尾跑一遍,两者相加就是每个点 ...
- python网络爬虫之解析网页的XPath(爬取Path职位信息)[三]
目录 前言 XPath的使用方法 XPath爬取数据 后言 @(目录) 前言 本章同样是解析网页,不过使用的解析技术为XPath. 相对于之前的BeautifulSoup,我感觉还行,也是一个比较常用 ...
- C#加密解密(AES)-AESHelper
原文地址:https://ken.io/note/csharp-aesencrypt using System; namespace Encrypt { public class AESHelper ...
- 中山纪中Day1--普及
早上一起,扑面是瓢泼的大雨.跨过千山万水,来到纪中门前,毅然以一种大无畏的英雄气概跨进了考场. 面对四道神题.然后,我成功过五关斩六将,A掉了2道题!!! 收获:优先队列(大.小根堆) T1:APPL ...
- Kafka .net 开发入门
Kafka安装 首先我们需要在windows服务器上安装kafka以及zookeeper,有关zookeeper的介绍将会在后续进行讲解. 在网上可以找到相应的安装方式,我采用的是腾讯云服务器,借鉴的 ...