评论

收藏

[NoSQL] centos7 安装最新版redis

数据库 数据库 发布于:2021-07-08 15:31 | 阅读数:588 | 评论:0

  1、安装最新版的 redis 
yum install -y http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
yum --enablerepo=remi install redis -y
  
2、查看版本
[root@centos7_jump223 ~]# redis-server -v
Redis server v=6.2.4 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=6b9ff9cb3b70c87a
  3、配置redis
vi /etc/redis.conf
protected-mode yes
port 6379
tcp-backlog 511
timeout 0
tcp-keepalive 300
daemonize no
pidfile /var/run/redis_6379.pid
loglevel notice
logfile /var/log/redis/redis.log
databases 16 
save "" 
dir /u01/redis/data
#appendfsync everysec
appendfsync no
requirepass admin2021
  4、启动redis
/bin/systemctl start redis.service
  5、关闭redis 
/bin/systemctl stop redis.service
  6、登陆redis
redis-cli -a admin2021
  
关注下面的标签,发现更多相似文章