CentOS 6.9/7通过yum安装指定版本的Redis

一、安装

// 安装依赖
# wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm && rpm -ivh epel-release-6-8.noarch.rpm
# yum install -y jemalloc
// 安装Redis
# wget http://www.rpmfind.net/linux/remi/enterprise/6/test/x86_64/redis-4.0.0-1.el6.remi.x86_64.rpm && rpm -ivh redis-4.0.0-1.el6.remi.x86_64.rpm

备注:http://www.rpmfind.net通过这个网站查找到的RPM包。

二、设置服务开机启动

# chkconfig redis on

三、服务常用操作

// 服务状态
# service redis status
// 服务启动
# service redis start
// 服务停止
# service redis stop
// 服务重启
# service redis restart

CentOS 7:

一、安装

// 安装依赖
# wget http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm && rpm -ivh epel-release-7-11.noarch.rpm
# yum install -y jemalloc
// 安装Redis
# wget http://www.rpmfind.net/linux/remi/enterprise/7/test/x86_64/redis-4.0.0-1.el7.remi.x86_64.rpm && rpm -ivh redis-4.0.0-1.el7.remi.x86_64.rpm

二、设置服务开机启动

# systemctl enable redis

三、服务常用操作

// 服务状态
# systemctl status redis
// 服务启动
# systemctl start redis
// 服务停止
# systemctl stop redis
// 服务重启
# systemctl restart redis

 

 

 

转载于:https://www.cnblogs.com/EasonJim/p/9021920.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值