centos7 安装最新版redis
1、安装最新版的 redisyum install -y http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
yum --enablerepo=remi install redis -y
2、查看版本
# 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
文档来源:51CTO技术博客https://blog.51cto.com/mydbs/3014470
页:
[1]