Redis安装配置记录
来源:互联网 发布:帝国cms写进销存系统 编辑:程序博客网 时间:2024/05/17 08:11
Redis用来替代ehcahce,memcache等缓存模块,最好不过了,安装和配置redis的资料网络上很多,
这里就大概的写一下我遇到的一些问题。
1.(error) MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error.
Redis被配置为保存数据库快照,但它目前不能持久化到硬盘。用来修改集合数据的命令不能用。请查看Redis日志的详细错误信息。
原因:
强制关闭Redis快照导致不能持久化。
解决方案:
运行config set stop-writes-on-bgsave-error no 命令后,关闭配置项stop-writes-on-bgsave-error解决该问题。
root@atwl:/usr/local/redis/bin# ./redis-cli127.0.0.1:6379> config set stop-writes-on-bgsave-error noOK127.0.0.1:6379> lpush myColour "red"(integer) 1
2. 客户端连接一直报错:redis.clients.jedis.exceptions.JedisConnectionException:java.net.ConnectException: Connection refused: connect
原来是redis默认只能localhost登录,所以需要开启远程登录。解决方法如下:
在redis的配置文件redis.conf中,找到#bind localhost注释掉。
3、我的操作系统是centos,由于防火墙没有开放6379端口,导致连接超时
firewall-cmd --permanent --zone=public --add-port=6379/tcpfirewall-cmd --permanent --zone=public --remove-port=6379/tcp 禁用端口
4、(error) MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error.
Redis被配置为保存数据库快照,但它目前不能持久化到硬盘。用来修改集合数据的命令不能用。请查看Redis日志的详细错误信息。
原因:
强制关闭Redis快照导致不能持久化。
解决方案:
运行config set stop-writes-on-bgsave-error no 命令后,关闭配置项stop-writes-on-bgsave-error解决该问题。
root@atwl:/usr/local/redis/bin# ./redis-cli127.0.0.1:6379> config set stop-writes-on-bgsave-error noOK127.0.0.1:6379> lpush myColour "red"(integer) 1
- Redis安装配置记录
- CentOS 6.6下Redis安装配置记录
- CentOS 6.6下Redis安装配置记录
- CentOS 6.6下Redis安装配置记录
- redis安装【记录】
- CentOS安装Redis记录
- CentOS安装Redis记录
- Redis安装使用记录
- 安装redis记录一下~
- centos7安装redis记录
- #redis redis-php安装配置
- 安装redis和配置redis
- 【redis】centOS安装配置redis
- redis的windows安装记录
- Redis安装和使用记录
- Redis 安装手札记录 Linux
- redis-cluster安装部署记录
- 记录一下 linux安装redis
- 跟Google 学代码Building Apps with Connectivity & the Cloud【连接无线设备】
- Android开发笔记(一百一十七)app省电方略
- CSS.Div总结
- zookeeper-ubuntu单机版安装
- compileSdkVersion, minSdkVersion 和 targetSdkVersion 的作用
- Redis安装配置记录
- Javascript中文变量及dat.gui的使用
- 对于网络上python多继承误区的记录
- 线索二叉树的生成及遍历
- Android实用视图动画及工具系列之三:表情加载动画和失败加载动画,人物加载动画
- Service和远程控制
- 根据一个规律文本提取出数据框
- SG 函数 hdu1524 & poj 2425 hdu1524 A Chess Game
- 二叉排序树