小标
2019-01-03
来源 :
阅读 1140
评论 0
摘要:本文主要向大家介绍Linux运维知识之Linux CentOS 7安装Redis服务器教程了,通过具体的内容向大家展现,希望对大家学习Linux运维知识有所帮助。
本文主要向大家介绍Linux运维知识之Linux CentOS 7安装Redis服务器教程了,通过具体的内容向大家展现,希望对大家学习Linux运维知识有所帮助。
说明:redis的缩写是REmote DIctionary Server。它是最流行的开源,高级key-value存储系统。这里说下CentOS 7上安装redis服务器方法。
项目地址://redis.io/
安装
一、安装EPEL repo
这里用的CentOS x86_64操作系统架构,所以我将仅使用适用于x86_64的epel repo软件包。请根据您的操作系统架构(EPEL URL)搜索epel repo软件包
yum install wget
wget -r --no-parent -A 'epel-release-*.rpm' //dl.fedoraproject.org/pub/epel/7/x86_64/e/
rpm -Uvh dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-*.rpm
之后将会在/etc/yum.repos.d中创建两个epel的repo文件。分别是epel.repo和epel-testing.repo。
二、安装Redis服务器
1、yum安装redis服务器
yum install redis
两个重要的redis服务器配置文件的路径/etc/redis.conf和/etc/redis-sentinel.conf。
2、启动redis服务器
systemctl start redis.service
3、检查redis服务器的运行状态
systemctl status redis.service
4、测试Redis的安装
redis-cli ping
如果返回结果PONG,则安装成功。
三、redis服务器相关命令
systemctl start redis.service #启动redis服务器
systemctl stop redis.service #停止redis服务器
systemctl restart redis.service #重新启动redis服务器
systemctl status redis.service #获取redis服务器的运行状态
systemctl enable redis.service #开机启动redis服务器
systemctl disable redis.service #开机禁用redis服务器
四、Redis服务器监听端口
Redis Server默认侦听端口号6379,可使用SS命令查看。
ss -nlp|grep redis
本文由职坐标整理并发布,希望对同学们有所帮助。了解更多详情请关注系统运维Linux频道!
喜欢 | 0
不喜欢 | 0
您输入的评论内容中包含违禁敏感词
我知道了

请输入正确的手机号码
请输入正确的验证码
您今天的短信下发次数太多了,明天再试试吧!
我们会在第一时间安排职业规划师联系您!
您也可以联系我们的职业规划师咨询:
版权所有 职坐标-一站式AI+学习就业服务平台 沪ICP备13042190号-4
上海海同信息科技有限公司 Copyright ©2015 www.zhizuobiao.com,All Rights Reserved.
沪公网安备 31011502005948号