
redis
笨蛋的生活
多走走。笨蛋的生活有一天也会精彩万分
展开
-
redis缓存简单使用
一般情况下,redis用在项目中的缓存,或者在项目中使用redis分布式锁(针对服务器集群)做缓存时,一般用于大量需要查询的数据,把数据存放到缓存中,避免数据库的压力过大。我曾经的写法是1.先从redis里根据key查询value2.指定的key对应的value不存在然后去数据库里查询3.查出来了之后再把数据以同样的key+value+过期时间存到redis里4.直接根据从数据库里获取的数据进行操作拿到自己想要的数据,然后直接返回偶然在项目中看到的写法是,1.先从redis里根据原创 2021-01-18 23:27:33 · 1005 阅读 · 2 评论 -
FATAL CONFIG FILE ERROR Reading the configuration file, at line 335 rdb-del-sync-files
我在centos7上安装了两个redis,一个是5.0.8版本的,一个是6.0.1版本的,然后启动6.0.1版本的redis报如下错误:然后使用redis-server -v命令查看当前环境下的redis-server版本[root@localhost bin]# redis-server -v当前版本是5.0.8的,但是我是在6.0.1的server下要启动的,所以我的版本出现了不匹配,原因是我第一次安装redis-5.0.8的时候,写了环境变量,在执行redis-server,程..原创 2020-06-04 15:18:38 · 7239 阅读 · 0 评论 -
redis连接报错:MISCONF Redis is configured to save RDB snapshots, but it is currently not able to...
连接redis报错:MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting ...转载 2020-05-19 11:16:10 · 290 阅读 · 0 评论 -
make: *** No rule to make target “install”.。Stop
在centos7上安装redis时,在运行命令make PREFIX=/usr/localinstall时出现的解决办法1. 把我上述截图的执行命令的目录local改到我已经解压好的redis文件夹下[admin@localhost local]$ cd /home/admin/redis-6.0.12.重新在redis的目录下执行make PREFIX=/usr/local/ install命令[admin@localhost redis-6.0.1]$ sudo make .原创 2020-05-18 20:00:15 · 47028 阅读 · 4 评论 -
Centos7安装、配置、启动、关闭和卸载redis
1、安装通过如下命令来进行安装:1、下载redis安装包wget http://download.redis.io/releases/redis-5.0.7.tar.gz12、安装redis编译的c环境yum install gcc...转载 2020-05-18 19:43:32 · 11256 阅读 · 2 评论 -
CentOS7.x系统安装Redis6.0.1
文章目录1.下载Redis2.安装Redis2.1编译Redis2.2升级gcc版本2.3make installCentOS7.x安装Redis6.0.11.下载Redis下载Redis最新稳定版6.0.1,https://redis.i...转载 2020-05-11 15:25:41 · 1042 阅读 · 0 评论