CentOS7 Linux yum安装Redis的方法
发表于:2024-09-25 作者:千家信息网编辑
千家信息网最后更新 2024年09月25日,这篇文章主要介绍了CentOS7 Linux yum安装Redis的方法的相关知识,内容详细易懂,操作简单快捷,具有一定借鉴价值,相信大家阅读完这篇CentOS7 Linux yum安装Redis的方
千家信息网最后更新 2024年09月25日CentOS7 Linux yum安装Redis的方法
这篇文章主要介绍了CentOS7 Linux yum安装Redis的方法的相关知识,内容详细易懂,操作简单快捷,具有一定借鉴价值,相信大家阅读完这篇CentOS7 Linux yum安装Redis的方法文章都会有所收获,下面我们一起来看看吧。
1. 安装redis
下载fedora的epel仓库
yum install epel-release
安装redis数据库
yum install redis
安装完毕后,使用下面的命令启动redis服务
# 启动redisservice redis start# 停止redisservice redis stop# 查看redis运行状态service redis status# 查看redis进程ps -ef | grep redis
设置redis为开机自动启动
chkconfig redis on
进入redis服务
# 进入本机redisredis-cli# 列出所有keykeys *
防火墙开放相应端口
# 开启6379/sbin/iptables -I INPUT -p tcp --dport 6379 -j ACCEPT# 保存/etc/rc.d/init.d/iptables save# centos 7下执行service iptables save
2.修改redis默认端口和密码
打开配置文件
vi /etc/redis.conf
修改默认端口,查找 port 6379 修改为相应端口即可
修改默认密码,查找 requirepass 修你的密码
停止redis服务并指定配置文件重新启动
service redis stopredis-server /etc/redis.conf &
使用端口登陆
redis-cli -h 127.0.0.1 -p 6379
使用密码验证
auth 123
3.远程连接redis
需要修改/etc/redis.conf
# 打开redis配置文件vi /etc/redis.conf# 找到 bind 127.0.0.1 将其注释# 找到 protected-mode yes 将其改为protected-mode no
重启服务
service redis stopredis-server /etc/redis.conf &
如果修改了如上配置还是无法远程连接,请检查端口是否开放,网络是否连通,密码是否正确
关于"CentOS7 Linux yum安装Redis的方法"这篇文章的内容就介绍到这里,感谢各位的阅读!相信大家对"CentOS7 Linux yum安装Redis的方法"知识都有一定的了解,大家如果还想学习更多知识,欢迎关注行业资讯频道。
端口
密码
方法
服务
配置
文件
知识
内容
篇文章
开放
仓库
价值
命令
如上
操作简单
数据
数据库
文章
易懂
更多
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
云服务器网络安全怎么规划
关系数据库属于大数据技术吗
长川科技互联网公司
在线sql转数据库模型
美团用什么软件开发的
相关软件开发培训内容
远程服务器文件传错了
计算机网络安全及防范的必要性
标记多维数据库
火绒安全服务器异常该怎么办
物业与计算机网络技术哪个好
彩虹六号日本东部服务器
南瑞内存数据库
三国杀测试服无法连接服务器
数据库核心技术有哪些
数据库中清空表数据
高级web软件开发
出名的软件开发公司
达梦安装创建数据库实例失败
oracle数据库常用单词汇总
互联网理财科技
杭州广告设计软件开发
联想ibm服务器售后电话
小趴服务器炸了
修改数据库名的存储过程命令是
镇江私有服务器哪个厂家质量好
网络技术挑战赛之无线技术
法院的网络安全
网络安全购物英语作文
php数据库条件输出