redis cluster 集群 安装 配置 详解

张映 发表于 2015-05-01

分类目录: nosql

标签:cluster, redis, 安装, 配置, 集群

Redis 集群是一个提供在多个Redis间节点间共享数据的程序集.redis3.0以前,只支持主从同步的,如果主的挂了,写入就成问题了。3.0出来后就可以很好帮我们解决这个问题。

目前redis 3.0还不稳定,如果要用在生产环境中,要慎重。

一,redis服务器说明

  1. 192.168.10.219 6379
  2. 192.168.10.219 6380
  3. 192.168.10.219 6381
  4. 192.168.10.220 6382
  5. 192.168.10.220 6383
  6. 192.168.10.220 6384
192.168.10.219 6379
192.168.10.219 6380
192.168.10.219 6381 192.168.10.220 6382
192.168.10.220 6383
192.168.10.220 6384

要让集群正常运作至少需要三个主节点,不过在刚开始试用集群功能时, 强烈建议使用六个节点: 其中三个为主节点, 而其余三个则是各个主节点的从节点。所有用二台机器,开6个redis进程,模拟6台机器。

二,安装ruby,rubygems

  1. # yum -y install gcc openssl-devel libyaml-devel libffi-devel readline-devel zlib-devel gdbm-devel ncurses-devel gcc-c++ automake autoconf
  2. # yum -y install ruby rubygems   //安装ruby rubygems
  3. //换源
  4. # gem source -l
  5. # gem source --remove http://rubygems.org/
  6. # gem sources -a http://ruby.taobao.org/
  7. # gem source -l
  8. # gem install redis --version 3.0.0  //安装gem_redis
  9. Successfully installed redis-3.0.0
  10. 1 gem installed
  11. Installing ri documentation for redis-3.0.0...
  12. Installing RDoc documentation for redis-3.0.0...
# yum -y install gcc openssl-devel libyaml-devel libffi-devel readline-devel zlib-devel gdbm-devel ncurses-devel gcc-c++ automake autoconf

# yum -y install ruby rubygems   //安装ruby rubygems

//换源
# gem source -l
# gem source --remove http://rubygems.org/
# gem sources -a http://ruby.taobao.org/
# gem source -l # gem install redis --version 3.0.0 //安装gem_redis
Successfully installed redis-3.0.0
1 gem installed
Installing ri documentation for redis-3.0.0...
Installing RDoc documentation for redis-3.0.0...

以前写过一篇ruby on rails的文章,请参考:centos ruby on rails apache mysql 安装配置详解

喜欢手动编译的人,可以参考这篇文章,安装ruby.

三,安装redis3.0.0

1,安装redis

  1. # wget http://download.redis.io/releases/redis-3.0.0.tar.gz
  2. # tar -xvzf redis-3.0.0.tar.gz
  3. # cd redis-3.0.0
  4. # make && make install
  5. # cd src
  6. # cp redis-trib.rb /usr/local/bin
  7. # mkdir /etc/redis
  8. # mkdir /var/log/redis
# wget http://download.redis.io/releases/redis-3.0.0.tar.gz
# tar -xvzf redis-3.0.0.tar.gz
# cd redis-3.0.0
# make && make install
# cd src
# cp redis-trib.rb /usr/local/bin # mkdir /etc/redis
# mkdir /var/log/redis

上述操作要先在二台机器上面都操作好。

2,配置redis

  1. [root@slave2 redis-3.0.0]#  vim redis.conf   //解压的根目录,有redis.conf,做以下修改
  2. port 6379
  3. pidfile /var/run/redis-6379.pid
  4. dbfilename dump-6379.rdb
  5. appendfilename "appendonly-6379.aof"
  6. cluster-config-file nodes-6379.conf
  7. cluster-enabled yes
  8. cluster-node-timeout 5000
  9. appendonly yes
[root@slave2 redis-3.0.0]#  vim redis.conf   //解压的根目录,有redis.conf,做以下修改
port 6379
pidfile /var/run/redis-6379.pid
dbfilename dump-6379.rdb
appendfilename "appendonly-6379.aof"
cluster-config-file nodes-6379.conf
cluster-enabled yes
cluster-node-timeout 5000
appendonly yes

3,copy配置文件,并修改端口

  1. # cp redis.conf /etc/redis/redis-6379.conf
  2. # cp redis.conf /etc/redis/redis-6380.conf
  3. # cp redis.conf /etc/redis/redis-6381.conf
  4. # scp redis.conf 192.168.10.220:/etc/redis/redis-6382.conf
  5. # scp redis.conf 192.168.10.220:/etc/redis/redis-6383.conf
  6. # scp redis.conf 192.168.10.220:/etc/redis/redis-6384.conf
  7. # sed -i "s/6379/6380/g" /etc/redis/redis-6380.conf
  8. # sed -i "s/6379/6381/g" /etc/redis/redis-6381.conf
  9. # sed -i "s/6379/6382/g" /etc/redis/redis-6382.conf
  10. # sed -i "s/6379/6383/g" /etc/redis/redis-6383.conf
  11. # sed -i "s/6379/6384/g" /etc/redis/redis-6384.conf
# cp redis.conf /etc/redis/redis-6379.conf
# cp redis.conf /etc/redis/redis-6380.conf
# cp redis.conf /etc/redis/redis-6381.conf # scp redis.conf 192.168.10.220:/etc/redis/redis-6382.conf
# scp redis.conf 192.168.10.220:/etc/redis/redis-6383.conf
# scp redis.conf 192.168.10.220:/etc/redis/redis-6384.conf # sed -i "s/6379/6380/g" /etc/redis/redis-6380.conf
# sed -i "s/6379/6381/g" /etc/redis/redis-6381.conf # sed -i "s/6379/6382/g" /etc/redis/redis-6382.conf
# sed -i "s/6379/6383/g" /etc/redis/redis-6383.conf
# sed -i "s/6379/6384/g" /etc/redis/redis-6384.conf

将配置文件分别copy到二台机器上,并替换端口:

  1. # cat redis-6380.conf |awk '{if($0 !~ /^$/ && $0 !~ /#/) {print $0}}' |grep 6380
  2. pidfile /var/run/redis-6380.pid
  3. port 6380
  4. dbfilename dump-6380.rdb
  5. appendfilename "appendonly-6380.aof"
  6. cluster-config-file nodes-6380.conf
# cat redis-6380.conf |awk '{if($0 !~ /^$/ && $0 !~ /#/) {print $0}}' |grep 6380
pidfile /var/run/redis-6380.pid
port 6380
dbfilename dump-6380.rdb
appendfilename "appendonly-6380.aof"
cluster-config-file nodes-6380.conf

有5处修改端口的地方

4,启动并查看redis

  1. # redis-server /etc/redis/redis-6379.conf > /var/log/redis/redis-6379.log 2>&1 &
  2. # redis-server /etc/redis/redis-6380.conf > /var/log/redis/redis-6380.log 2>&1 &
  3. # redis-server /etc/redis/redis-6381.conf > /var/log/redis/redis-6381.log 2>&1 &
  4. # redis-server /etc/redis/redis-6382.conf > /var/log/redis/redis-6382.log 2>&1 &
  5. # redis-server /etc/redis/redis-6383.conf > /var/log/redis/redis-6383.log 2>&1 &
  6. # redis-server /etc/redis/redis-6384.conf > /var/log/redis/redis-6384.log 2>&1 &
  7. # netstat -tpnl |grep redis
  8. tcp        0      0 0.0.0.0:6379                0.0.0.0:*                   LISTEN      7298/redis-server *
  9. tcp        0      0 0.0.0.0:6380                0.0.0.0:*                   LISTEN      7299/redis-server *
  10. tcp        0      0 0.0.0.0:6381                0.0.0.0:*                   LISTEN      7304/redis-server *
  11. tcp        0      0 0.0.0.0:16379               0.0.0.0:*                   LISTEN      7298/redis-server *
  12. tcp        0      0 0.0.0.0:16380               0.0.0.0:*                   LISTEN      7299/redis-server *
  13. tcp        0      0 0.0.0.0:16381               0.0.0.0:*                   LISTEN      7304/redis-server *
  14. tcp        0      0 :::6379                     :::*                        LISTEN      7298/redis-server *
  15. tcp        0      0 :::6380                     :::*                        LISTEN      7299/redis-server *
  16. tcp        0      0 :::6381                     :::*                        LISTEN      7304/redis-server *
  17. tcp        0      0 :::16379                    :::*                        LISTEN      7298/redis-server *
  18. tcp        0      0 :::16380                    :::*                        LISTEN      7299/redis-server *
  19. tcp        0      0 :::16381                    :::*                        LISTEN      7304/redis-server *
  20. [root@slave2 redis]# ll /etc/redis/
  21. 总用量 156
  22. -rw-r--r-- 1 root root     0 4月  30 23:54 appendonly-6379.aof
  23. -rw-r--r-- 1 root root     0 5月   1 00:08 appendonly-6380.aof
  24. -rw-r--r-- 1 root root     0 5月   1 00:08 appendonly-6381.aof
  25. -rw-r--r-- 1 root root    18 5月   1 00:08 dump-6379.rdb
  26. -rw-r--r-- 1 root root    18 5月   1 00:08 dump-6380.rdb
  27. -rw-r--r-- 1 root root    18 5月   1 00:08 dump-6381.rdb
  28. -rw-r--r-- 1 root root   763 5月   1 00:08 nodes-6379.conf
  29. -rw-r--r-- 1 root root   763 5月   1 00:08 nodes-6380.conf
  30. -rw-r--r-- 1 root root   763 5月   1 00:08 nodes-6381.conf
  31. -rw-r--r-- 1 root root 41412 4月  30 23:30 redis-6379.conf
  32. -rw-r--r-- 1 root root 41412 4月  30 23:39 redis-6380.conf
  33. -rw-r--r-- 1 root root 41412 4月  30 23:39 redis-6381.conf
# redis-server /etc/redis/redis-6379.conf > /var/log/redis/redis-6379.log 2>&1 &
# redis-server /etc/redis/redis-6380.conf > /var/log/redis/redis-6380.log 2>&1 &
# redis-server /etc/redis/redis-6381.conf > /var/log/redis/redis-6381.log 2>&1 & # redis-server /etc/redis/redis-6382.conf > /var/log/redis/redis-6382.log 2>&1 &
# redis-server /etc/redis/redis-6383.conf > /var/log/redis/redis-6383.log 2>&1 &
# redis-server /etc/redis/redis-6384.conf > /var/log/redis/redis-6384.log 2>&1 & # netstat -tpnl |grep redis
tcp 0 0 0.0.0.0:6379 0.0.0.0:* LISTEN 7298/redis-server *
tcp 0 0 0.0.0.0:6380 0.0.0.0:* LISTEN 7299/redis-server *
tcp 0 0 0.0.0.0:6381 0.0.0.0:* LISTEN 7304/redis-server *
tcp 0 0 0.0.0.0:16379 0.0.0.0:* LISTEN 7298/redis-server *
tcp 0 0 0.0.0.0:16380 0.0.0.0:* LISTEN 7299/redis-server *
tcp 0 0 0.0.0.0:16381 0.0.0.0:* LISTEN 7304/redis-server *
tcp 0 0 :::6379 :::* LISTEN 7298/redis-server *
tcp 0 0 :::6380 :::* LISTEN 7299/redis-server *
tcp 0 0 :::6381 :::* LISTEN 7304/redis-server *
tcp 0 0 :::16379 :::* LISTEN 7298/redis-server *
tcp 0 0 :::16380 :::* LISTEN 7299/redis-server *
tcp 0 0 :::16381 :::* LISTEN 7304/redis-server * [root@slave2 redis]# ll /etc/redis/
总用量 156
-rw-r--r-- 1 root root 0 4月 30 23:54 appendonly-6379.aof
-rw-r--r-- 1 root root 0 5月 1 00:08 appendonly-6380.aof
-rw-r--r-- 1 root root 0 5月 1 00:08 appendonly-6381.aof
-rw-r--r-- 1 root root 18 5月 1 00:08 dump-6379.rdb
-rw-r--r-- 1 root root 18 5月 1 00:08 dump-6380.rdb
-rw-r--r-- 1 root root 18 5月 1 00:08 dump-6381.rdb
-rw-r--r-- 1 root root 763 5月 1 00:08 nodes-6379.conf
-rw-r--r-- 1 root root 763 5月 1 00:08 nodes-6380.conf
-rw-r--r-- 1 root root 763 5月 1 00:08 nodes-6381.conf
-rw-r--r-- 1 root root 41412 4月 30 23:30 redis-6379.conf
-rw-r--r-- 1 root root 41412 4月 30 23:39 redis-6380.conf
-rw-r--r-- 1 root root 41412 4月 30 23:39 redis-6381.conf

所有节点都启动成功,并不代表,他们就是集群了。

四,创建集群,并查看

1,创建redis集群

  1. # redis-trib.rb create --replicas 1 192.168.10.219:6379 192.168.10.219:6380 192.168.10.219:6381 192.168.10.220:6382 192.168.10.220:6383 192.168.10.220:6384
# redis-trib.rb create --replicas 1 192.168.10.219:6379 192.168.10.219:6380 192.168.10.219:6381 192.168.10.220:6382 192.168.10.220:6383 192.168.10.220:6384

2,查看redis集群状态

  1. [root@slave2 redis]# redis-trib.rb check 192.168.10.219:6379
  2. Connecting to node 192.168.10.219:6379: OK
  3. Connecting to node 192.168.10.220:6384: OK
  4. Connecting to node 192.168.10.219:6381: OK
  5. Connecting to node 192.168.10.220:6383: OK
  6. Connecting to node 192.168.10.220:6382: OK
  7. Connecting to node 192.168.10.219:6380: OK
  8. >>> Performing Cluster Check (using node 192.168.10.219:6379)
  9. M: d40d9a367c24784b0336c7b80fb4c87337e2cba6 192.168.10.219:6379
  10. slots:5461-10922 (5462 slots) master
  11. 1 additional replica(s)
  12. S: 5f00f163d0c0a540ea99daf004f55588a802327b 192.168.10.220:6384
  13. slots: (0 slots) slave
  14. replicates d40d9a367c24784b0336c7b80fb4c87337e2cba6
  15. S: b3b1a848987b5a87a06888e126d5c9b16f871ff5 192.168.10.219:6381
  16. slots: (0 slots) slave
  17. replicates d2eb5a8a77f87888792428aed4692dfb907e7a1d
  18. M: d2eb5a8a77f87888792428aed4692dfb907e7a1d 192.168.10.220:6383
  19. slots:10923-16383 (5461 slots) master
  20. 1 additional replica(s)
  21. M: a8eafe8b19d6a28c034917da13a43ce1230fe870 192.168.10.220:6382
  22. slots:0-5460 (5461 slots) master
  23. 1 additional replica(s)
  24. S: a87d207204a53ab599bf7f6ffb9d679d0eef4f25 192.168.10.219:6380
  25. slots: (0 slots) slave
  26. replicates a8eafe8b19d6a28c034917da13a43ce1230fe870
  27. [OK] All nodes agree about slots configuration.
  28. >>> Check for open slots...
  29. >>> Check slots coverage...
  30. [OK] All 16384 slots covered.
[root@slave2 redis]# redis-trib.rb check 192.168.10.219:6379
Connecting to node 192.168.10.219:6379: OK
Connecting to node 192.168.10.220:6384: OK
Connecting to node 192.168.10.219:6381: OK
Connecting to node 192.168.10.220:6383: OK
Connecting to node 192.168.10.220:6382: OK
Connecting to node 192.168.10.219:6380: OK
>>> Performing Cluster Check (using node 192.168.10.219:6379)
M: d40d9a367c24784b0336c7b80fb4c87337e2cba6 192.168.10.219:6379
slots:5461-10922 (5462 slots) master
1 additional replica(s)
S: 5f00f163d0c0a540ea99daf004f55588a802327b 192.168.10.220:6384
slots: (0 slots) slave
replicates d40d9a367c24784b0336c7b80fb4c87337e2cba6
S: b3b1a848987b5a87a06888e126d5c9b16f871ff5 192.168.10.219:6381
slots: (0 slots) slave
replicates d2eb5a8a77f87888792428aed4692dfb907e7a1d
M: d2eb5a8a77f87888792428aed4692dfb907e7a1d 192.168.10.220:6383
slots:10923-16383 (5461 slots) master
1 additional replica(s)
M: a8eafe8b19d6a28c034917da13a43ce1230fe870 192.168.10.220:6382
slots:0-5460 (5461 slots) master
1 additional replica(s)
S: a87d207204a53ab599bf7f6ffb9d679d0eef4f25 192.168.10.219:6380
slots: (0 slots) slave
replicates a8eafe8b19d6a28c034917da13a43ce1230fe870
[OK] All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
[OK] All 16384 slots covered.

到这儿,redis集群就配置成功了

五,测试redis集群

  1. # redis-cli -c -p 6379 -h 192.168.10.219   //在219登录
  2. 192.168.10.219:6379> set tank tank1    //设置测试值
  3. -> Redirected to slot [4407] located at 192.168.10.220:6382
  4. OK   //直接转向到220 6382端口,数据存到了220 6382,不过有点奇怪
  5. 192.168.10.220:6382> get tank   //可以取到值
  6. "tank1"
  7. [root@manage redis]# redis-cli -c -p 6383 -h 192.168.10.220  //220机器,6383端口
  8. 192.168.10.220:6383> get tank
  9. -> Redirected to slot [4407] located at 192.168.10.220:6382  //直接转向220 6382端口
  10. "tank1"
  11. [root@manage redis]# ps aux |grep redis //查看进程
  12. root      7310  0.2  0.9 137436  9724 pts/0    Sl   Apr30   0:09 redis-server *:6382 [cluster]
  13. root      7311  0.2  0.9 137436  9776 pts/0    Sl   Apr30   0:09 redis-server *:6383 [cluster]
  14. root      7316  0.2  0.9 137436  9944 pts/0    Sl   Apr30   0:10 redis-server *:6384 [cluster]
  15. root      7478  0.0  0.0 103256   812 pts/0    S+   00:56   0:00 grep redis
  16. [root@manage redis]# kill -9 7310  //关闭220 6382端口,看数据会不会丢失
  17. [root@slave2 redis]# redis-trib.rb check 192.168.10.219:6379  //查看集群情况,任何接口都行
  18. Connecting to node 192.168.10.219:6379: OK
  19. Connecting to node 192.168.10.220:6384: OK
  20. Connecting to node 192.168.10.219:6381: OK
  21. Connecting to node 192.168.10.220:6383: OK
  22. Connecting to node 192.168.10.219:6380: OK
  23. >>> Performing Cluster Check (using node 192.168.10.219:6379)
  24. M: d40d9a367c24784b0336c7b80fb4c87337e2cba6 192.168.10.219:6379
  25. slots:5461-10922 (5462 slots) master
  26. 1 additional replica(s)
  27. S: 5f00f163d0c0a540ea99daf004f55588a802327b 192.168.10.220:6384
  28. slots: (0 slots) slave
  29. replicates d40d9a367c24784b0336c7b80fb4c87337e2cba6
  30. S: b3b1a848987b5a87a06888e126d5c9b16f871ff5 192.168.10.219:6381
  31. slots: (0 slots) slave
  32. replicates d2eb5a8a77f87888792428aed4692dfb907e7a1d
  33. M: d2eb5a8a77f87888792428aed4692dfb907e7a1d 192.168.10.220:6383
  34. slots:10923-16383 (5461 slots) master
  35. 1 additional replica(s)
  36. M: a87d207204a53ab599bf7f6ffb9d679d0eef4f25 192.168.10.219:6380
  37. slots:0-5460 (5461 slots) master
  38. 0 additional replica(s)
  39. [OK] All nodes agree about slots configuration.
  40. >>> Check for open slots...
  41. >>> Check slots coverage...
  42. [OK] All 16384 slots covered.  //变成,三主二从了
  43. [root@slave2 redis]# redis-cli -c -p 6379 -h 192.168.10.219    //219登录
  44. 192.168.10.219:6379> get tank
  45. -> Redirected to slot [4407] located at 192.168.10.219:6380   //数据被转到了6380节点了
  46. "tank1"
# redis-cli -c -p 6379 -h 192.168.10.219   //在219登录
192.168.10.219:6379> set tank tank1 //设置测试值
-> Redirected to slot [4407] located at 192.168.10.220:6382
OK //直接转向到220 6382端口,数据存到了220 6382,不过有点奇怪
192.168.10.220:6382> get tank //可以取到值
"tank1" [root@manage redis]# redis-cli -c -p 6383 -h 192.168.10.220 //220机器,6383端口
192.168.10.220:6383> get tank
-> Redirected to slot [4407] located at 192.168.10.220:6382 //直接转向220 6382端口
"tank1" [root@manage redis]# ps aux |grep redis //查看进程
root 7310 0.2 0.9 137436 9724 pts/0 Sl Apr30 0:09 redis-server *:6382 [cluster]
root 7311 0.2 0.9 137436 9776 pts/0 Sl Apr30 0:09 redis-server *:6383 [cluster]
root 7316 0.2 0.9 137436 9944 pts/0 Sl Apr30 0:10 redis-server *:6384 [cluster]
root 7478 0.0 0.0 103256 812 pts/0 S+ 00:56 0:00 grep redis [root@manage redis]# kill -9 7310 //关闭220 6382端口,看数据会不会丢失 [root@slave2 redis]# redis-trib.rb check 192.168.10.219:6379 //查看集群情况,任何接口都行
Connecting to node 192.168.10.219:6379: OK
Connecting to node 192.168.10.220:6384: OK
Connecting to node 192.168.10.219:6381: OK
Connecting to node 192.168.10.220:6383: OK
Connecting to node 192.168.10.219:6380: OK
>>> Performing Cluster Check (using node 192.168.10.219:6379)
M: d40d9a367c24784b0336c7b80fb4c87337e2cba6 192.168.10.219:6379
slots:5461-10922 (5462 slots) master
1 additional replica(s)
S: 5f00f163d0c0a540ea99daf004f55588a802327b 192.168.10.220:6384
slots: (0 slots) slave
replicates d40d9a367c24784b0336c7b80fb4c87337e2cba6
S: b3b1a848987b5a87a06888e126d5c9b16f871ff5 192.168.10.219:6381
slots: (0 slots) slave
replicates d2eb5a8a77f87888792428aed4692dfb907e7a1d
M: d2eb5a8a77f87888792428aed4692dfb907e7a1d 192.168.10.220:6383
slots:10923-16383 (5461 slots) master
1 additional replica(s)
M: a87d207204a53ab599bf7f6ffb9d679d0eef4f25 192.168.10.219:6380
slots:0-5460 (5461 slots) master
0 additional replica(s)
[OK] All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
[OK] All 16384 slots covered. //变成,三主二从了 [root@slave2 redis]# redis-cli -c -p 6379 -h 192.168.10.219 //219登录
192.168.10.219:6379> get tank
-> Redirected to slot [4407] located at 192.168.10.219:6380 //数据被转到了6380节点了
"tank1"

经测试,集群是可用的。

http://blog.51yip.com/nosql/1725.html

redis cluster 集群 安装 配置 详解的更多相关文章

  1. hadoop1.2.1+zk-3.4.5+hbase-0.94.1集群安装过程详解

    hadoop1.2.1+zk-3.4.5+hbase-0.94.1集群安装过程详解 一,环境: 1,主机规划: 集群中包括3个节点:hadoop01为Master,其余为Salve,节点之间局域网连接 ...

  2. 2、Redis 底层原理:Cluster 集群部署与详解

    Redis 简介 Redis 提供数据缓存服务,内部数据都存在内存中,所以访问速度非常快. 早期,Redis 单应用服务亦能满足企业的需求.之后,业务量的上升,单机的读写能力满足不了业务的需求,技术上 ...

  3. rocketmq集群、配置详解和常用命令

    集群原文地址: http://www.cnblogs.com/520playboy/p/6716235.html 常用命令原文地址: http://www.cnblogs.com/gmq-sh/p/6 ...

  4. Redis3.0.7 cluster/集群 安装配置教程

    1.前言 环境:CentOS-6.7-i386-LiveDVD 安装的CentOs系统 节点: 6个节点,3个主节点.3个从节点(由于redis默认需要3个主节点,如果想每个主节点有一个从节点,这是最 ...

  5. Elasticsearch集群节点配置详解

    注意:如果是在局域网中运行elasticsearch集群也是很简单的,只要cluster.name设置一致,并且机器在同一网段下,启动的es会自动发现对方,组成集群. 2.elasticsearch- ...

  6. RabbitMQ 集群安装过程详解

    一.安装Erlang 1.rabbitMQ是基于erlang的,所以首先必须配置erlang环境. 从erlang官网下载 otp 18.3.下载链接:http://erlang.org/downlo ...

  7. CentOS下Redis 2.2.14安装配置详解(转载)

    一. 下载redis最新版本2.2.14 cd /usr/local/src wget –c http://redis.googlecode.com/files/redis-2.2.14.tar.gz ...

  8. 深入分析redis cluster 集群

    深入分析redis cluster 集群安装配置详解 下面小编来为各位介绍一篇深入分析redis cluster 集群安装配置详解,如果你希望做数据库集群就可以来看看此文章的哦. http://rub ...

  9. centos6下redis cluster集群部署过程

    一般来说,redis主从和mysql主从目的差不多,但redis主从配置很简单,主要在从节点配置文件指定主节点ip和端口,比如:slaveof 192.168.10.10 6379,然后启动主从,主从 ...

随机推荐

  1. 2019.10.28sql注入工具

    SQLMAP工具的使用 sql注入工具:明小子 啊D 萝卜头 穿山甲 sqlmap等等 开源自动化注入利用工具,支持12中数据库,在/plugins中可以看到支持的数据库种类 支持的注入类型:bool ...

  2. Firefox 的User Agent 将移除 CPU 架构信息

    Mozilla 计划从 Firefox 的 User Agent(用户代理)和几个支持的 API 中移除 CPU 架构信息,以减少 Firefox 用户的“数字指纹”.Web 浏览器会自动向用户在应用 ...

  3. automake中Makefile.am和configure.ac的格式及编译过程

    step1:写Makefile.am step2:执行autoscan,会生成configurae.scan,修改configure.scan内容之后,命名为configure.ac step3:执行 ...

  4. echo(),print(),print_r()的区别?

    echo可以一次输出多个值,多个值之间用逗号分隔.echo是语言结构(language construct),而并不是真正的函数,因此不能作为表达式的一部分使用.echo是php的内部指令,不是函数, ...

  5. Highcharts基本名词解释

    1.Highcharts基本组成: 2.名词解释 lang 语言文字对象 所有Highcharts文字相关的设置 chart 图表 图表区.图形区和通用图表配置选项 colors 颜色 图表数据列颜色 ...

  6. 兼容系列-IE678的兼容

    1. 最简单的CSS Hack 区分 IE6 . IE7 .IE8 css .color{ background-color: #CC00FF; /*所有浏览器都会显示为紫色*/ background ...

  7. Kendo UI for jQuery使用教程:方法和事件

    [Kendo UI for jQuery最新试用版下载] Kendo UI目前最新提供Kendo UI for jQuery.Kendo UI for Angular.Kendo UI Support ...

  8. Greenplum 日常维护

    1. 数据库启动:gpstart 常用可选参数: -a : 直接启动,不提示终端用户输入确认 -m:只启动master 实例,主要在故障处理时使用 2. 数据库停止:gpstop: 常用可选参数:-a ...

  9. 一种sqlor的拆分

    原脚本declare @Phone nvarchar(50)declare @CompanyNO nvarchar(50)set @Phone='13914124223'set @CompanyNO= ...

  10. Java中 DecimalFormat 用法详解

    我们经常要将数字进行格式化,比如取2位小数,这是最常见的.Java 提供DecimalFormat类,帮你用最快的速度将数字格式化为你需要的样子.下面是一个例子: import java.text.D ...