7ehost
全球服务器主机

CentOS系统中使用yum命令安装redis的方法

在linux CentOS系统中使用yum命令安装redis报错:

[root@localhost install]# yum install redis
Loaded plugins: fastestmirror
Setting up Install Process
Determining fastest mirrors
 * base: mirrors.skyshe.cn
 * extras: mirrors.163.com

这是因为,centos默认的安装源在官方centos.org上,而Redis在第三方的yum源里,所以无法安装,非官方的yum推荐用fedora的epel仓库

使用如下命令安装第三方库: yum install epel-release

再安装redis即可: yum install redis

使用service redis start命令启动redis服务端:

[root@localhost etc]# service redis start Redirecting to /bin/systemctl start redis.service

使用ps -ef | grep redis查看redis进程:

[root@localhost etc]# ps -ef | grep redis redis 47664 1 0 05:31 ? 00:00:00 /usr/bin/redis-server 127.0.0.1:6379 root 47808 45376 0 05:32 pts/0 00:00:00 grep –color=auto redis

未经允许不得转载:7eHost全球服务器资源 » CentOS系统中使用yum命令安装redis的方法

更好的更稳定的服务器

7EHOST从事服务器多年经验积累和风险预测,确保企业型服务能够满足我们大/小客户需求。所有机房电话,邮件,工单提供24/7/365全年全天候技术支持,服务器在线率99.99%。

联系我们联系我们