我正在尝试在Centos 6.5(x64)上安装Redis,其中包含以下行:
yum install redis
但是我正在关注屏幕:
[root@NodeJs ~]# yum install redis Loaded plugins: fastestmirror Setting up Install Process Loading mirror speeds from cached hostfile * base: nl.mirror.eurid.eu * epel: nl.mirror.eurid.eu * extras: mirror.denit.net * updates: nl.mirror.eurid.eu Resolving Dependencies --> Running transaction check ---> Package redis.x86_64 0:2.8.14-2.el7 will be installed --> Processing Dependency: systemd for package: redis-2.8.14-2.el7.x86_64 --> Processing Dependency: systemd for package: redis-2.8.14-2.el7.x86_64 --> Processing Dependency: libjemalloc.so.1()(64bit) for package: redis-2.8.14-2.el7.x86_64 --> Running transaction check ---> Package jemalloc.x86_64 0:3.6.0-1.el7 will be installed ---> Package redis.x86_64 0:2.8.14-2.el7 will be installed --> Processing Dependency: systemd for package: redis-2.8.14-2.el7.x86_64 --> Processing Dependency: systemd for package: redis-2.8.14-2.el7.x86_64 --> Finished Dependency Resolution Error: Package: redis-2.8.14-2.el7.x86_64 (epel) Requires: systemd You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest
我该如何解决这个问题?
您安装了EL7的EPEL存储库,但您实际上正在运行EL6。 删除epel-release软件包,即sudo yum search epel && sudo yum remove epel-release ,并将其replace为正确的软件包。
根据本文档, Redis可以通过发布以下命令安装在CentOS6上:
// --- Compiling --- $ wget http://download.redis.io/releases/redis-2.8.3.tar.gz $ tar xzvf redis-2.8.3.tar.gz $ cd redis-2.8.3 $ make $ make install // --- or using yum --- $ rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm $ rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-6.rpm $ yum --enablerepo=remi,remi-test install redis
这是我在CentOS 6.5上更新Redis(2.4.10)的成功经验。
首先,确保安装了以下Repos EPEL和REMI :
sudo rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm sudo rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-6.rpm
在REMI回购中检查Redis的版本:(截至2015年6月,版本为2.8.13 )
yum --enablerepo=remi info redis
然后从EPEL回购安装相关的依赖关系( jemalloc ):
sudo yum --enablerepo=epel install jemalloc
在安装之前,您应该停止旧的Redis守护进程:
sudo service redis stop
然后安装更新版本的Redis:
sudo yum --enablerepo=remi install redis
如果需要,编辑Redisconfiguration文件:
sudo vi /etc/redis.conf
重新启动Redis守护进程,并使其在重新启动时自动启动:
sudo service redis start sudo chkconfig redis on
最后,检查当前安装的Redis的版本:
redis-cli info | grep redis_version
EPEL redis包是过时的,在RHEL6上,您可以使用Remi的存储库: http : //rpms.famillecollet.com/ 。 他们是最新的,也是从3.0和2.8版本的最新版本。
在这里看看最新的软件包的描述。