主服务master配置redis.conf: port 6379appendonly yescluster-enabled yescluster-config-file nodes.confcluster-node-timeout 5000daemonize yesslave-serve-stale ...
分类:
其他好文 时间:
2016-08-10 19:02:23
阅读次数:
373
环境描述: 主redis:192.168.10.1 6379从redis:192.168.10.2 6380 一、主从配置 1、将主从redis配置文件redis.conf中的aemonize no 改为 yes 2、修改从redis配置文件redis.conf中的port 6379 改为 6380 ...
分类:
其他好文 时间:
2016-08-05 16:08:22
阅读次数:
206
持久化:启动服务器存储数据到内存,通过持久化将内存的数据存储到硬盘。 rdb(快照),默认(时间有关,到时间就存储) 缺点:非法关闭会丢失数据 redis.conf 中 save 时间 次数 (多长时间操作多少次) dir ./ (存放目录) aof 方式,不默认(时间无关,操作一次存储一次) re ...
分类:
其他好文 时间:
2016-08-03 22:08:29
阅读次数:
253
[root@web01blog]#egrep-v"#|^$"/application/redis/conf/6379.confbind127.0.0.1#绑定的主机地址,不设置默认将处理所有请求protected-modeyes#3.2里的参数,是否开启保护模式,默认开启。要是配置里没有指定bind和密码。开启该参数后,redis只会本地进行访问,拒绝外部访问。..
分类:
其他好文 时间:
2016-07-31 00:29:42
阅读次数:
214
[root@web01blog]#egrep-v"#|^$"/application/redis/conf/6379.confbind127.0.0.1#绑定的主机地址,不设置默认将处理所有请求protected-modeyes#3.2里的参数,是否开启保护模式,默认开启。要是配置里没有指定bind和密码。开启该参数后,redis只会本地进行访问,拒绝外部访问。..
分类:
其他好文 时间:
2016-07-31 00:26:52
阅读次数:
1165
引言: Redis是基于内存的数据库,同时也提供了若干持久化的方案,允许用户把内存中的数据,写入本地文件系统,以备下次重启或者当机之后继续使用。本文将描述如何基于Redis来设置这些功能。 快照的设置 a. 设置Redis.conf配置文件 Redis快照写入的频率 save 900 1 save ...
分类:
其他好文 时间:
2016-07-29 21:11:35
阅读次数:
114
#redis配置文件示例
#当你需要为某个配置项指定内存大小的时候,必须要带上单位,
#通常的格式就是1k5gb4m等酱紫:
#
#1k=>1000bytes
#1kb=>1024bytes
#1m=>1000000bytes
#1mb=>1024*1024bytes
#1g=>1000000000bytes
#1gb=>1024*1024*1024bytes
#
#单位是不..
分类:
其他好文 时间:
2016-07-20 13:37:42
阅读次数:
142
版本3.2.1#Redisconfigurationfileexample.##Notethatinordertoreadtheconfigurationfile,Redismustbe#startedwiththefilepathasfirstargument:##./redis-server/path/to/redis.confredis的启动方法#Noteonunits:whenmemorysizeisneeded,itispossibletospecify#itintheusualfor..
分类:
其他好文 时间:
2016-07-19 19:05:58
阅读次数:
172
php.inisession.save_handle=redissession.save_path="tcp://10.1.100.152:6379?timeout=2&persistent=1&database=15&prefix=PHPREDIS_SESSION"redis参考http://www.runoob.com/redis/redis-conf.html
分类:
其他好文 时间:
2016-07-13 23:31:49
阅读次数:
173
上节讲到linux下redis安装和使用 redis 设置密码访问 你的redis在真实环境中不可以谁想访问就访问,所以,必须要设置密码。 设置密码的步骤如下: vi redis.conf #此文件默认在根目录下。 # requirepass foobared去掉注释,foobared改为自己的密码 ...
分类:
其他好文 时间:
2016-07-12 19:39:04
阅读次数:
137