redis 搭建主从
来源:互联网 发布:57是什么意思网络用语 编辑:程序博客网 时间:2024/05/19 03:29
redis 主:将主从redis配置文件redis.conf中的aemonize no 改为 yesjrhrpt01:/etc/redis# grep port redis.conf # Accept connections on the specified port, default is 6379.# If port 0 is specified Redis will not listen on a TCP socket.port 6379jrhrpt01:/etc/redis# grep slaveof redis.conf # Master-Slave replication. Use slaveof to make a Redis instance a copy of# slaveof <masterip> <masterport>redis 从:jrhrpt02:/etc/redis# grep slaveof redis.conf # Master-Slave replication. Use slaveof to make a Redis instance a copy of# slaveof <masterip> <masterport>slaveof 11.40.69.216 6379 ---redis 主# If the master is password protected (using the "requirepass" configuration# directive below) it is possible to tell the slave to authenticate before# starting the replication synchronization process, otherwise the master will# refuse the slave request.##masterauth <master-password>masterauth xxxxx启动redis:redis-server /etc/redis.conf测试:主test-redis:/root# cat a1.pl use Redis;my $r = Redis->new( server => "192.168.32.167:6379",reconnect => 1,every=>60); $r = Redis->new( password => 'xxxxx' ); $r->set('zhoucui','111222333'); $r->save; $r->quit;perl a1.pl从:test-redis2:/data01/redis# redis-server --/etc/redis.conf^Ctest-redis2:/data01/redis# redis-cli 127.0.0.1:6379> auth 'xxx'OK127.0.0.1:6379> get zhoucui"111222333"127.0.0.1:6379>
0 0
- Redis主从搭建
- redis 搭建主从
- redis主从服务器搭建
- ubantu 搭建 redis 主从
- redis 主从搭建
- redis 主从搭建
- redis主从复制搭建
- Redis主从服务器负载搭建
- redis-3.0主从搭建实践
- redis主从集群的搭建
- redis主从配置和php扩展搭建
- redis的主从高可用搭建
- liunx下搭建redis主从复制
- redis 主从master-slave搭建及测试
- redis主从复制及HA环境搭建
- Redis主从复制读写分离搭建
- Redis主从服务器同步搭建(基础篇)
- redis 3.2.8主从HA搭建
- fragment复用:多个activity共用一个Fragment
- 一个form表单实现提交多个action
- prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-gcc问题解决
- 【MySQL之字段类型(一)】MySQL中char和varchar的区别,以及varchar最大长度是多少?
- flex读取xml
- redis 搭建主从
- uva 10603倒水问题(搜索 隐式图的最短路 )
- java协变函数
- 《淘宝技术这十年》读书笔记 (四). 分布式时代和中间件
- LVM原理及PV、VG、LV、PE、LE关系图
- java复制大文件
- javascript中遍历List集合对象
- 浅谈形参和实参
- WebSpehre Message Broker 数据库操作