分享

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

 昵称54185769 2018-06-14

一、安装

// 安装依赖
# 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./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.通过这个网站查找到的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./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
复制代码

 

 

 

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多