redis 离线安装redis

Last updated on November 20, 2024 am

🧙 Questions

给centos7离线安装redis

☄️ Ideas

下载redis安装包
https://rpmfind.net/linux/rpm2html/search.php?query=redis%28x86-64%29&submit=Search+...&system=&arch=
redis-5.0.14-1.el7.remi.x86_64.rpm
https://rpmfind.net/linux/remi/enterprise/7/remi/x86_64/redis-5.0.14-1.el7.remi.x86_64.rpm

sudo rpm -ivh /tmp/redis/redis*
修改配置
sudo vi /etc/redis.conf
# redis后台运行
daemonized yes

# 关闭保护模式
protected-mode no

# 注释掉
# bind 127.0.0.1

# 修改密码
requirepass ispong2022

# maxmemory
maxmemory 8gb

# 设置端口号
port 6379

# 开启事件
notify-keyspace-events Ex
开机自启

默认端口号:6379

sudo systemctl start redis
sudo systemctl enable redis
sudo systemctl status redis
sudo systemctl stop redis
查看服务是否启动
ps aux | grep redis
使用命令行链接测试
redis-cli -h 127.0.0.1 -p 6379
redis-cli -h 127.0.0.1 -p 6379 -a ispong2022
select 1
set test 1
get test

redis 离线安装redis
https://ispong.isxcode.com/spring/redis/redis 离线安装redis/
Author
ispong
Posted on
July 5, 2024
Licensed under