Redis3.2.12版本服务器迁移

1.新机器更新yum源

yum -y update

2.新机器安装redis数据库

yum install redis

3.新机器下载fedora的epel仓库

systemctl enable redis

4.将旧机器上的/etc/redis.conf拷贝到新机器的/config目录下

scp -r -P22 redis.config root@162.32.196.57:/config/redis.config

5.新机器启动并连接测试

redis-server /conf/redis.conf #按照指定的配置文件启动

※其他redis的命令

#redis服务端启动

方式1:redis-server

方式2:./redis-server &

方式3:systemctl start redis

方式4:service redis start

#redis服务端停止

systemctl stop redis

#redis开机自启动

systemctl enable redis

#redis客户端命令

redis-cli -a T***123

注意,密码是在redis.conf里面配置的,忘记的话可以去里面找

6.旧机器导出文件

BGSAVE #在客户端执行

7.将文件保存的文件传输到新机器中

scp -r -P22 /var/lib/dump.rdb root@182.62.197.97:/var/lib/dump.rdb

8.新机器上的redis重启,并检验是否导入

相关推荐
yyuuuzz4 分钟前
AI模型部署中的常见稳定性问题
运维·服务器·网络·数据库·人工智能·云计算·github
STDD5 分钟前
V Rising《夜族崛起》 专用服务器搭建教程
运维·服务器
Ameilide5 分钟前
Linux 应用软件编程 多任务并发
linux·运维·服务器
cjhbachelor8 分钟前
___信号
linux
liulilittle26 分钟前
什么是“单流”?一个服务器上能不能同时存在多个“单流”?
服务器·网络·tcp/ip·计算机网络·信息与通信·tcp·通信
无限进步_33 分钟前
【Linux】环境变量:系统运行参数的“备忘录”
linux·运维·服务器
YYRAN_ZZU35 分钟前
Ubuntu22.04搭建QEMU嵌入式开发环境全攻略
linux·嵌入式硬件·ubuntu
无忧.芙桃35 分钟前
Linux信号机制(上)
linux·运维·服务器
kongba00737 分钟前
WSL与VMware冲突
linux
utf8mb4安全女神1 小时前
怎么让服务器给自己的邮箱发消息【shell脚本】
linux·运维·服务器