集群命令

[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 #: done

      Ready 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

  • # 是否执行重新分片计划

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 RVM

redis集群命令及常规操作的更多相关文章

  1. Redis集群命令行部署工具

    使用之前准备工作: 1)配置好与端口无关的公共redis.conf文件,和工具放在同一目录下 2)配置好与端口相关的模板redis-PORT.conf文件,也和工具放在同一目录下(部署时PORT会被替 ...

  2. redis集群搭建及常用操作

    前言: Redis 是一个高性能的key-value数据库. redis的出现,很大程度补偿了memcached这类key/value存储的不足,在部 分场合可以对关系数据库起到很好的补充作用.它提供 ...

  3. redis集群配置及python操作

    之前我们分析过喜马拉雅的爬取信息,使用分布式爬取,而且需要修改scrapy-redis的过滤算法为布隆过滤来减少redis内存占用,最后考虑这样还是不一定够,那么redis集群就是更好的一种选择方式了 ...

  4. Redis 集群会有写操作丢失吗?为什么?

    Redis 并不能保证数据的强一致性,这意味这在实际中集群在特定的条件下可能会丢失写操作.

  5. Redis集群部署及命令

    一.简介 redis集群是一个无中心的分布式Redis存储架构,可以在多个节点之间进行数据共享,解决了Redis高可用.可扩展等问题. redis集群提供了以下两个好处: 将数据自动切分(split) ...

  6. Redis 集群知识点及命令

    Redis 集群命令 备注 cluster nodes 查看集群包含的节点 cluster meet <ip> <port> 将 ip 和 port 所指定的节点添加到 nod ...

  7. python 操作redis集群

    一.连接redis集群 python的redis库是不支持集群操作的,推荐库:redis-py-cluster,一直在维护.还有一个rediscluster库,看GitHub上已经很久没更新了. 安装 ...

  8. Redis集群教程(Redis cluster tutorial)

    本博文翻译自Redis官网:http://redis.io/topics/cluster-tutorial        本文档以温和的方式介绍Redis集群,不使用复杂的方式来理解分布式系统的概念. ...

  9. Redis集群配置和常见异常解决

    前文 Redis的Cluster集群,是在分布式且开源环境下最佳的高可用解决方案,可以有效的解决服务器宕机下或高并发下,数据的完整性. 文档前提 Redis 3.0版本或更高版本.(3.0版本开始支持 ...

随机推荐

  1. Linux控制服务和守护进程

    目录 控制服务和守护进程 1.systemd 1.1.systemd简介 1.2.systemd的新特性 1.3.systemd的核心概念Unit 2.使用systemctl管理服务 控制服务和守护进 ...

  2. EditPlus 注册码在线生成

    虽然editplus现在不常用,但是它轻便,我还是很喜欢的,推荐一个注册码生成器,真是好好用 http://www.jb51.net/tools/editplus/ 点击链接输入自己想要的用户名,就能 ...

  3. ${var}与$var的区别,个人总结的看法

    ${var}  set variable 123 ${var}类似于变量值,相当于123 $var类似于变量名,指向对应的存储位置,相当于“123”,一般只有在rf关键字为断言的如“should be ...

  4. java内存模型中工作内存并不一定会同步主内存的情况分析

    其实是为了填之前的一个坑  在一个多线程的案例中出现了阻塞的情况. https://www.cnblogs.com/hetutu-5238/p/10477875.html   其中的第二个问题,即多个 ...

  5. UA池 代理IP池 scrapy的下载中间件

    # 一些概念 - 在scrapy中如何给所有的请求对象尽可能多的设置不一样的请求载体身份标识 - UA池,process_request(request) - 在scrapy中如何给发生异常的请求设置 ...

  6. django之反向解析和命名空间

    背景:当我们页面中存放的请求路径与url文件中的url一致时,如果url改了是不是所有的请求路径都要跟着改?显然不现实,这里我们就要用到反向解析. 如下图所示,输入url后会跳转到登录页面,输入用户名 ...

  7. 2020年一线大厂月薪35K的Python开发要求

    为什么程序员要在2020年学习Python? 如果你正在考虑学习 Python,但又不确定为什么要这样做的话,那么你可以看看以下的内容: 马蜂窝裁员竟然达到了40%, 前段时间猪厂.菊厂裁员被推到了风 ...

  8. .NET Core快速入门教程 4、使用VS Code进行C#代码调试的技巧

    一.前言 什么是代码调试? 通过调试可以让我们了解代码运行过程中的代码执行信息,比如变量的值等等.通常调试代码是为了方便我们发现代码中的bug. 本篇开发环境 1.操作系统: Windows 10 X ...

  9. idea配置jdk,maven,tomcat

    1.idea配置jdk  2.idea配置maven  3.idea配置tomcat

  10. 24 JavaScript对象访问器&JavaScript对象构造器

    ES5引入了Getter和Setter Getter和Setter允许定义对象访问器 JavaScript Getter(get关键字):获取对象属性 <script> var perso ...